Chromium Code Reviews| 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 db1763304ac07141b4ec12de41b81444d095da4f..64d0fca087c245af5fc10a73e7b662d0a24d825f 100644 |
| --- a/components/policy/core/browser/url_blacklist_manager.h |
| +++ b/components/policy/core/browser/url_blacklist_manager.h |
| @@ -21,6 +21,7 @@ |
| #include "components/policy/policy_export.h" |
| #include "components/prefs/pref_change_registrar.h" |
| #include "components/url_matcher/url_matcher.h" |
| +#include "net/base/network_delegate.h" |
| #include "url/gurl.h" |
| class PrefService; |
| @@ -62,12 +63,16 @@ class POLICY_EXPORT URLBlacklist { |
| // Returns true if the URL is blocked. |
| bool IsURLBlocked(const GURL& url) const; |
| + net::NetworkDelegate::URLBlacklistState |
| + GetURLBlacklistState(const GURL& url) const; |
|
Andrew T Wilson (Slow)
2016/05/02 09:32:11
consider wrapping after the ( rather than after th
igorcov
2016/05/02 13:29:08
Done.
|
| + |
| // Returns the number of items in the list. |
| size_t Size() const; |
| // Splits a URL filter into its components. A GURL isn't used because these |
| // can be invalid URLs e.g. "google.com". |
| - // Returns false if the URL couldn't be parsed. |
| + // Returns false if the URL couldn't be parsed. In case false is returned, |
| + // the values of output parameters are undefined. |
| // The |host| is preprocessed so it can be passed to URLMatcher for the |
| // appropriate condition. |
| // The optional username and password are ignored. |
| @@ -76,6 +81,7 @@ class POLICY_EXPORT URLBlacklist { |
| // |port| is 0 if none is explicitly defined. |
| // |path| does not include query parameters. |
| // |query| contains the query parameters ('?' not included). |
| + // All arguments are mandatory. |
| static bool FilterToComponents(SegmentURLCallback segment_url, |
| const std::string& filter, |
| std::string* scheme, |
| @@ -160,6 +166,9 @@ class POLICY_EXPORT URLBlacklistManager { |
| // from the IO thread. |
| bool IsURLBlocked(const GURL& url) const; |
| + net::NetworkDelegate::URLBlacklistState |
| + GetURLBlacklistState(const GURL& url) const; |
| + |
| // 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). |