diff options
author | mef@chromium.org <mef@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-17 18:01:40 +0000 |
---|---|---|
committer | mef@chromium.org <mef@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-17 18:01:40 +0000 |
commit | e6d017658f1f60b06eebff1b0ac5ba6751b8daa7 (patch) | |
tree | 570100639ba4ce142591694b297b0218d55e54a5 /net/base/network_delegate.h | |
parent | 8fcb7fa663d0ec60859e931c01929baa64ee47e4 (diff) | |
download | chromium_src-e6d017658f1f60b06eebff1b0ac5ba6751b8daa7.zip chromium_src-e6d017658f1f60b06eebff1b0ac5ba6751b8daa7.tar.gz chromium_src-e6d017658f1f60b06eebff1b0ac5ba6751b8daa7.tar.bz2 |
ChannelID-less Connections in Chrome should be more granular.
Added enum PrivacyMode (Enabled/Disabled) to mark connections which should not use ChannelID even if it is globally enabled.
PrivacyMode is enabled if user blocks sending or saving cookies to/from particular server, taking in account third party cookie settings as well. See crbug.com/223191 for design doc.
Segmented client socket pools according to privacy mode setting used for particular connection (added 'pm/' prefix to pool key. Introduced SpdySessionKey structure and added PrivacyMode to the key of SpdySessionPool.
Added propagation of Privacy Mode setting from Web Sockets. Added check of Privacy Mode to predictor and pre-connect logic.
BUG=223191
TEST=unit_tests gtest_filter=ChromeNetworkDelegatePrivacyModeTest*
Review URL: https://chromiumcodereview.appspot.com/13008028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/network_delegate.h')
-rw-r--r-- | net/base/network_delegate.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h index 0d99d02..9c2913d 100644 --- a/net/base/network_delegate.h +++ b/net/base/network_delegate.h @@ -97,6 +97,8 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe { bool CanAccessFile(const URLRequest& request, const base::FilePath& path) const; bool CanThrottleRequest(const URLRequest& request) const; + bool CanEnablePrivacyMode(const GURL& url, + const GURL& first_party_for_cookies) const; int NotifyBeforeSocketStreamConnect(SocketStream* socket, const CompletionCallback& callback); @@ -225,6 +227,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe { // request is overloaded or down. virtual bool OnCanThrottleRequest(const URLRequest& request) const = 0; + // Returns true if the given |url| has to be requested over connection that + // is not tracked by the server. Usually is false, unless user privacy + // settings block cookies from being get or set. + virtual bool OnCanEnablePrivacyMode( + const GURL& url, + const GURL& first_party_for_cookies) const; + // Called before a SocketStream tries to connect. virtual int OnBeforeSocketStreamConnect( SocketStream* socket, const CompletionCallback& callback) = 0; |