diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-28 00:46:52 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-28 00:46:52 +0000 |
commit | 5ef4512ef92e56f2f560f3066536d83d1e460e8b (patch) | |
tree | b36b676887e552b43918aedcb5f034ba42ee63bd /chrome | |
parent | 85cf8957bbd4427f045632a25316db70aab98b70 (diff) | |
download | chromium_src-5ef4512ef92e56f2f560f3066536d83d1e460e8b.zip chromium_src-5ef4512ef92e56f2f560f3066536d83d1e460e8b.tar.gz chromium_src-5ef4512ef92e56f2f560f3066536d83d1e460e8b.tar.bz2 |
Remove ChromeURLRequestContext::IsExternal().
It doesn't appear to be used anywhere.
BUG=68766
TEST=none
Review URL: http://codereview.chromium.org/6273018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72906 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
4 files changed, 15 insertions, 41 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index 6d3c147..d3850df 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -816,10 +816,6 @@ const std::string& ChromeURLRequestContext::GetUserAgent( return webkit_glue::GetUserAgent(url); } -bool ChromeURLRequestContext::IsExternal() const { - return false; -} - void ChromeURLRequestContext::OnAcceptLanguageChange( const std::string& accept_language) { CheckCurrentlyOnIOThread(); diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h index a920a0a..40e1341 100644 --- a/chrome/browser/net/chrome_url_request_context.h +++ b/chrome/browser/net/chrome_url_request_context.h @@ -95,10 +95,6 @@ class ChromeURLRequestContext : public net::URLRequestContext { return prerender_manager_.get(); } - // Returns true if this context is an external request context, like - // ChromeFrame. - virtual bool IsExternal() const; - protected: virtual ~ChromeURLRequestContext(); diff --git a/chrome/browser/renderer_host/render_message_filter.cc b/chrome/browser/renderer_host/render_message_filter.cc index 338c64f..0f66493 100644 --- a/chrome/browser/renderer_host/render_message_filter.cc +++ b/chrome/browser/renderer_host/render_message_filter.cc @@ -532,7 +532,7 @@ void RenderMessageFilter::OnGetRawCookies( // TODO(ananta) We need to support retreiving raw cookies from external // hosts. if (!ChildProcessSecurityPolicy::GetInstance()->CanReadRawCookies( - render_process_id_) || context->IsExternal()) { + render_process_id_)) { ViewHostMsg_GetRawCookies::WriteReplyParams( reply_msg, std::vector<webkit_glue::WebCookie>()); @@ -1555,12 +1555,10 @@ void SetCookieCompletion::RunWithParams(const Tuple1<int>& params) { context_->cookie_store()->SetCookieWithOptions(url_, cookie_line_, options); } - if (!context_->IsExternal()) { - CallRenderViewHostContentSettingsDelegate( - render_process_id_, render_view_id_, - &RenderViewHostDelegate::ContentSettings::OnCookieChanged, - url_, cookie_line_, options, blocked_by_policy); - } + CallRenderViewHostContentSettingsDelegate( + render_process_id_, render_view_id_, + &RenderViewHostDelegate::ContentSettings::OnCookieChanged, + url_, cookie_line_, options, blocked_by_policy); delete this; } @@ -1591,17 +1589,15 @@ void GetCookiesCompletion::RunWithParams(const Tuple1<int>& params) { cookies = cookie_store()->GetCookies(url_); ViewHostMsg_GetCookies::WriteReplyParams(reply_msg_, cookies); filter_->Send(reply_msg_); - if (!context_->IsExternal()) { - net::CookieMonster* cookie_monster = - context_->cookie_store()->GetCookieMonster(); - net::CookieList cookie_list = - cookie_monster->GetAllCookiesForURLWithOptions( - url_, net::CookieOptions()); - CallRenderViewHostContentSettingsDelegate( - render_process_id_, render_view_id_, - &RenderViewHostDelegate::ContentSettings::OnCookiesRead, - url_, cookie_list, result != net::OK); - } + net::CookieMonster* cookie_monster = + context_->cookie_store()->GetCookieMonster(); + net::CookieList cookie_list = + cookie_monster->GetAllCookiesForURLWithOptions( + url_, net::CookieOptions()); + CallRenderViewHostContentSettingsDelegate( + render_process_id_, render_view_id_, + &RenderViewHostDelegate::ContentSettings::OnCookiesRead, + url_, cookie_list, result != net::OK); delete this; } else { // Ignore the policy result. We only waited on the policy result so that diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index 3d9221a..7621b76 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -200,14 +200,6 @@ std::vector<int> GetAllNetErrorCodes() { #pragma optimize( "", off ) #endif -// Temporary experiment to help track down http://crbug.com/68766. -// This should crash if called with an invalid ChromeURLRequestContext. -// TODO(eroman): Delete this when experiment is complete. -void CheckContextForBug68766(net::URLRequestContext* context) { - if (context) - static_cast<ChromeURLRequestContext*>(context)->IsExternal(); -} - #if defined(OS_WIN) #pragma optimize( "", on ) #pragma warning (default: 4748) @@ -368,8 +360,6 @@ void ResourceDispatcherHost::BeginRequest( ChromeURLRequestContext* context = filter_->GetURLRequestContext( request_id, request_data.resource_type); - CheckContextForBug68766(context); - // Might need to resolve the blob references in the upload data. if (request_data.upload_data && context) { context->blob_storage_context()->controller()-> @@ -1092,10 +1082,7 @@ void ResourceDispatcherHost::OnGetCookies( if (!RenderViewForRequest(request, &render_process_id, &render_view_id)) return; - ChromeURLRequestContext* context = - static_cast<ChromeURLRequestContext*>(request->context()); - if (context->IsExternal()) - return; + net::URLRequestContext* context = request->context(); net::CookieMonster* cookie_monster = context->cookie_store()->GetCookieMonster(); @@ -1338,7 +1325,6 @@ void ResourceDispatcherHost::BeginRequestInternal(net::URLRequest* request) { } if (!defer_start) { - CheckContextForBug68766(request->context()); InsertIntoResourceQueue(request, *info); } } |