blob: 801dbc65c961166a9d9ebcb38e58543350045a9d [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/previews/core/test_previews_decider.h"
namespace previews {
TestPreviewsDecider::TestPreviewsDecider(bool allow_previews)
: allow_previews_(allow_previews) {}
TestPreviewsDecider::~TestPreviewsDecider() {}
bool TestPreviewsDecider::ShouldAllowPreviewAtECT(
const net::URLRequest& request,
previews::PreviewsType type,
net::EffectiveConnectionType effective_connection_type_threshold,
const std::vector<std::string>& host_blacklist_from_server,
bool ignore_long_term_black_list_rules) const {
return allow_previews_;
}
bool TestPreviewsDecider::ShouldAllowPreview(
const net::URLRequest& request,
previews::PreviewsType type) const {
return allow_previews_;
}
bool TestPreviewsDecider::IsURLAllowedForPreview(const net::URLRequest& request,
PreviewsType type) const {
return allow_previews_;
}
} // namespace previews