| Index: components/policy/core/browser/url_blacklist_manager.cc
|
| diff --git a/components/policy/core/browser/url_blacklist_manager.cc b/components/policy/core/browser/url_blacklist_manager.cc
|
| index 4e39e4e58a29d6adf47142c768c26a2334c0ba09..7643c3c0a390d23d365bf15e636b3f61b2b87381 100644
|
| --- a/components/policy/core/browser/url_blacklist_manager.cc
|
| +++ b/components/policy/core/browser/url_blacklist_manager.cc
|
| @@ -17,9 +17,7 @@
|
| #include "components/policy/core/common/policy_pref_names.h"
|
| #include "components/pref_registry/pref_registry_syncable.h"
|
| #include "net/base/filename_util.h"
|
| -#include "net/base/load_flags.h"
|
| #include "net/base/net_errors.h"
|
| -#include "net/url_request/url_request.h"
|
| #include "url/url_constants.h"
|
| #include "url/url_parse.h"
|
|
|
| @@ -489,22 +487,22 @@ bool URLBlacklistManager::IsURLBlocked(const GURL& url) const {
|
| return blacklist_->IsURLBlocked(url);
|
| }
|
|
|
| -bool URLBlacklistManager::IsRequestBlocked(
|
| - const net::URLRequest& request, int* reason) const {
|
| +bool URLBlacklistManager::IsRequestBlocked(const GURL& url,
|
| + bool is_request_for_frame,
|
| + int* reason) const {
|
| DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
|
| #if !defined(OS_IOS)
|
| // TODO(joaodasilva): iOS doesn't set these flags. http://crbug.com/338283
|
| - int filter_flags = net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME;
|
| - if ((request.load_flags() & filter_flags) == 0)
|
| + if (!is_request_for_frame)
|
| return false;
|
| #endif
|
|
|
| bool block = false;
|
| - if (override_blacklist_.Run(request.url(), &block, reason))
|
| + if (override_blacklist_.Run(url, &block, reason))
|
| return block;
|
|
|
| *reason = net::ERR_BLOCKED_BY_ADMINISTRATOR;
|
| - return IsURLBlocked(request.url());
|
| + return IsURLBlocked(url);
|
| }
|
|
|
| // static
|
|
|