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

Unified Diff: net/base/network_delegate.h

Issue 1692503002: Functionality to allow blacklist and whitelist of custom schemes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another variable set as const Created 4 years, 9 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: net/base/network_delegate.h
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index 07371371054719555164ca380a1b1cd0c5fc53e8..133407c4e3f0a2f904656a163a5799a816c7e593 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -55,6 +55,15 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
};
typedef base::Callback<void(AuthRequiredResponse)> AuthCallback;
+ // Indicates if the URL was defined in blacklist, in whitelist or is not
bartfab (slow) 2016/03/10 13:49:42 Nit: URLs are not "defined" in the blacklist/white
+ // present in either lists as defined in URLBlacklist and URLWhitelist
+ // policies.
+ enum URLBlacklistState {
+ URL_IN_WHITELIST,
+ URL_IN_BLACKLIST,
+ URL_NEUTRAL_STATE,
+ };
+
virtual ~NetworkDelegate() {}
// Notification interface called by the network stack. Note that these
@@ -119,6 +128,10 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const GURL& target_url,
const GURL& referrer_url) const;
+ // This function is to be used to check if the |url| is defined in
+ // blacklist or whitelist policy.
+ virtual URLBlacklistState GetURLBlacklistState(const GURL& url) const;
+
private:
// This is the interface for subclasses of NetworkDelegate to implement. These
// member functions will be called by the respective public notification

Powered by Google App Engine
This is Rietveld 408576698