diff options
author | idanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 18:02:23 +0000 |
---|---|---|
committer | idanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 18:02:23 +0000 |
commit | eaadd905fd0d3e3e0496f229a5aaa3e3982002a4 (patch) | |
tree | 7174b1009f01eb2ee982c1d834c4d052ff916904 /net/url_request/url_request_context.h | |
parent | c86d472e35440254cf860f40c40aaaf45992bfdc (diff) | |
download | chromium_src-eaadd905fd0d3e3e0496f229a5aaa3e3982002a4.zip chromium_src-eaadd905fd0d3e3e0496f229a5aaa3e3982002a4.tar.gz chromium_src-eaadd905fd0d3e3e0496f229a5aaa3e3982002a4.tar.bz2 |
Privacy Blacklist SketelonAdded code hooks to serve as place holders for the implementationof the privacy blacklist. The --privacy-blacklist option was addedwhich will eventually is used to activate the code.This is work-in-progress code which effectively makes a couple morepointer-checks when the --privacy-blacklist is not specified. Whenit is specified, some of the blacklist code is executed but theblacklist is always empty and therefore has no impact on browsing.
BUG=none
TEST=Blacklist*
Review URL: http://codereview.chromium.org/119313
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19033 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_context.h')
-rw-r--r-- | net/url_request/url_request_context.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 2c9f6fa..374af90 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -23,6 +23,8 @@ class HostResolver; class HttpTransactionFactory; class ProxyService; } +class Blacklist; +class URLRequest; // Subclass to provide application-specific context for URLRequest instances. class URLRequestContext : @@ -34,7 +36,8 @@ class URLRequestContext : http_transaction_factory_(NULL), ftp_transaction_factory_(NULL), cookie_store_(NULL), - force_tls_state_(NULL) { + force_tls_state_(NULL), + blacklist_(NULL) { } net::HostResolver* host_resolver() const { @@ -67,6 +70,9 @@ class URLRequestContext : // Gets the FTP authentication cache for this context. net::FtpAuthCache* ftp_auth_cache() { return &ftp_auth_cache_; } + // Gets the Privacy Blacklist, if any for this context. + const Blacklist* blacklist() { return blacklist_; } + // Gets the value of 'Accept-Charset' header field. const std::string& accept_charset() const { return accept_charset_; } @@ -87,6 +93,19 @@ class URLRequestContext : referrer_charset_ = charset; } + // Called for each cookie returning for the given request. A pointer to + // the cookie is passed so that it can be modified. Returns true if the + // cookie was not dropped (it could still be modified though). + virtual bool interceptCookie(const URLRequest* request, std::string* cookie) { + return true; + } + + // Called before adding cookies to sent requests. Allows overriding + // requests to block sending of cookies. + virtual bool allowSendingCookies(const URLRequest* request) const { + return true; + } + protected: friend class base::RefCountedThreadSafe<URLRequestContext>; @@ -102,6 +121,7 @@ class URLRequestContext : net::CookiePolicy cookie_policy_; net::ForceTLSState* force_tls_state_;; net::FtpAuthCache ftp_auth_cache_; + const Blacklist* blacklist_; std::string accept_language_; std::string accept_charset_; // The charset of the referrer where this request comes from. It's not |