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

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

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.h
diff --git a/components/policy/core/browser/url_blacklist_manager.h b/components/policy/core/browser/url_blacklist_manager.h
index aed642b2001086d1b87f496736aa7a26e14733a2..03e44ad19b79e213330309126b7315fe42d9f296 100644
--- a/components/policy/core/browser/url_blacklist_manager.h
+++ b/components/policy/core/browser/url_blacklist_manager.h
@@ -27,10 +27,6 @@ class ListValue;
class SequencedTaskRunner;
}
-namespace net {
-class URLRequest;
-}
-
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -161,14 +157,17 @@ class POLICY_EXPORT URLBlacklistManager {
// from the IO thread.
bool IsURLBlocked(const GURL& url) const;
- // Returns true if |request| is blocked by the current blacklist.
- // Only main frame and sub frame requests may be blocked; other sub resources
- // or background downloads (e.g. extensions updates, sync, etc) are not
- // filtered. The sync signin page is also not filtered.
+ // Returns true if a request for |url| is blocked by the current blacklist.
+ //
+ // Should only be called for requests for frames (Main frames or subframes).
+ // Other subresources or background downloads (e.g. extensions updates, sync,
+ // etc) should not be filtered. The sync signin page will also not be
+ // filtered.
+ //
// |reason| is populated with the exact reason for blocking the url if and
// only if the return value is true otherwise it is left untouched.
// Must be called from the IO thread.
- bool IsRequestBlocked(const net::URLRequest& request, int* reason) const;
+ bool ShouldBlockRequestForFrame(const GURL& url, int* reason) const;
// Replaces the current blacklist. Must be called on the IO thread.
// Virtual for testing.
« no previous file with comments | « chrome/browser/policy/url_blacklist_manager_unittest.cc ('k') | components/policy/core/browser/url_blacklist_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698