Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: components/policy/core/browser/url_blacklist_manager.cc

Issue 1134733004: Remove LOAD_SUB_FRAME load flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to atwilson's comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..8409fc9303959dfbf04898a3cc0ae0377f336212 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,16 @@ bool URLBlacklistManager::IsURLBlocked(const GURL& url) const {
return blacklist_->IsURLBlocked(url);
}
-bool URLBlacklistManager::IsRequestBlocked(
- const net::URLRequest& request, int* reason) const {
+bool URLBlacklistManager::ShouldBlockRequestForFrame(const GURL& url,
+ 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)
- 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
« no previous file with comments | « components/policy/core/browser/url_blacklist_manager.h ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698