diff options
Diffstat (limited to 'chrome')
4 files changed, 16 insertions, 7 deletions
diff --git a/chrome/browser/automation/automation_profile_impl.cc b/chrome/browser/automation/automation_profile_impl.cc index 51923ae..02e2cc1 100644 --- a/chrome/browser/automation/automation_profile_impl.cc +++ b/chrome/browser/automation/automation_profile_impl.cc @@ -21,7 +21,6 @@ class AutomationURLRequestContext : public URLRequestContext { cookie_policy_.set_type(original_context->cookie_policy()->type()); force_tls_state_ = original_context->force_tls_state(); // ftp_auth_cache_ = original_context->ftp_auth_cache(); - blacklist_ = original_context->blacklist(); accept_language_ = original_context->accept_language(); accept_charset_ = original_context->accept_charset(); referrer_charset_ = original_context->referrer_charset(); diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h index 9dc0393..debee5c 100644 --- a/chrome/browser/net/chrome_url_request_context.h +++ b/chrome/browser/net/chrome_url_request_context.h @@ -8,8 +8,10 @@ #include "chrome/common/pref_service.h" #include "net/url_request/url_request_context.h" -class Profile; +class Blacklist; class CommandLine; +class Profile; + namespace net { class ProxyConfig; } @@ -69,6 +71,9 @@ class ChromeURLRequestContext : public URLRequestContext, virtual bool AllowSendingCookies(const URLRequest* request) const; + // Gets the Privacy Blacklist, if any for this context. + const Blacklist* blacklist() const { return blacklist_; } + private: // Private constructor, use the static factory methods instead. This is // expected to be called on the UI thread. @@ -114,6 +119,7 @@ private: scoped_ptr<SQLitePersistentCookieStore> cookie_db_; PrefService* prefs_; + const Blacklist* blacklist_; bool is_media_; bool is_off_the_record_; }; diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index 0ea39ca..a626f06 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -22,6 +22,7 @@ #include "chrome/browser/download/save_file_manager.h" #include "chrome/browser/external_protocol_handler.h" #include "chrome/browser/in_process_webkit/webkit_thread.h" +#include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/plugin_service.h" #include "chrome/browser/privacy_blacklist/blacklist.h" #include "chrome/browser/profile.h" @@ -364,10 +365,11 @@ void ResourceDispatcherHost::BeginRequest( int route_id) { ChildProcessInfo::ProcessType process_type = receiver_->type(); int process_id = receiver_->GetProcessId(); - URLRequestContext* context = - receiver_->GetRequestContext(request_id, request_data); + ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>( + receiver_->GetRequestContext(request_id, request_data)); if (!context) - context = Profile::GetDefaultRequestContext(); + context = static_cast<ChromeURLRequestContext*>( + Profile::GetDefaultRequestContext()); if (is_shutdown_ || !ShouldServiceRequest(process_type, process_id, request_data)) { diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 5cb59a1..be61cf3 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -15,6 +15,7 @@ #include "chrome/browser/chrome_thread.h" #include "chrome/browser/extensions/extension_message_service.h" #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h" +#include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/net/dns_global.h" #include "chrome/browser/plugin_service.h" #include "chrome/browser/profile.h" @@ -434,8 +435,9 @@ void ResourceMessageFilter::OnMsgCreateWidget(int opener_id, void ResourceMessageFilter::OnSetCookie(const GURL& url, const GURL& first_party_for_cookies, const std::string& cookie) { - URLRequestContext* context = url.SchemeIs(chrome::kExtensionScheme) ? - extensions_request_context_.get() : request_context_.get(); + ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>( + url.SchemeIs(chrome::kExtensionScheme) ? + extensions_request_context_.get() : request_context_.get()); if (context->cookie_policy()->CanSetCookie(url, first_party_for_cookies)) { if (context->blacklist()) { Blacklist::Match* match = context->blacklist()->findMatch(url); |