diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-02 00:35:58 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-02 00:35:58 +0000 |
commit | 347867b7b712fb62a5340da298b69f30e3443c49 (patch) | |
tree | 1f17c40edbd22ec9037755b7d0524cc757499e22 /chrome/browser/ssl | |
parent | 04e29603179d6f28ee6c83c4ff134879ead1549d (diff) | |
download | chromium_src-347867b7b712fb62a5340da298b69f30e3443c49.zip chromium_src-347867b7b712fb62a5340da298b69f30e3443c49.tar.gz chromium_src-347867b7b712fb62a5340da298b69f30e3443c49.tar.bz2 |
Split ExtraRequestInfo out of ResourceDispatcherHost so it isn't cluttering up
that header file. I added documentation and split out the accessors according
to Google-style.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/179046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25133 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl')
-rw-r--r-- | chrome/browser/ssl/ssl_error_handler.cc | 15 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_manager.cc | 28 |
2 files changed, 22 insertions, 21 deletions
diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/chrome/browser/ssl/ssl_error_handler.cc index ed04c6fb..13fce6c 100644 --- a/chrome/browser/ssl/ssl_error_handler.cc +++ b/chrome/browser/ssl/ssl_error_handler.cc @@ -6,6 +6,7 @@ #include "base/message_loop.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" +#include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "chrome/browser/ssl/ssl_cert_error_handler.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_util.h" @@ -30,10 +31,10 @@ SSLErrorHandler::SSLErrorHandler(ResourceDispatcherHost* rdh, request_has_been_notified_(false) { DCHECK(MessageLoop::current() != ui_loop); - ResourceDispatcherHost::ExtraRequestInfo* info = - ResourceDispatcherHost::ExtraInfoForRequest(request); - request_id_.child_id = info->child_id; - request_id_.request_id = info->request_id; + ResourceDispatcherHostRequestInfo* info = + ResourceDispatcherHost::InfoForRequest(request); + request_id_.child_id = info->child_id(); + request_id_.request_id = info->request_id(); if (!ResourceDispatcherHost::RenderViewForRequest(request, &render_process_host_id_, @@ -178,9 +179,9 @@ void SSLErrorHandler::CompleteStartRequest(FilterPolicy::Type filter_policy) { DLOG(INFO) << "CompleteStartRequest() url: " << request->url().spec(); // The request should not have been started (SUCCESS is the initial state). DCHECK(request->status().status() == URLRequestStatus::SUCCESS); - ResourceDispatcherHost::ExtraRequestInfo* info = - ResourceDispatcherHost::ExtraInfoForRequest(request); - info->filter_policy = filter_policy; + ResourceDispatcherHostRequestInfo* info = + ResourceDispatcherHost::InfoForRequest(request); + info->set_filter_policy(filter_policy); request->Start(); } request_has_been_notified_ = true; diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc index 63e590d..73c3b02 100644 --- a/chrome/browser/ssl/ssl_manager.cc +++ b/chrome/browser/ssl/ssl_manager.cc @@ -69,8 +69,8 @@ void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh, DLOG(INFO) << "OnSSLCertificateError() cert_error: " << cert_error << " url: " << request->url().spec(); - ResourceDispatcherHost::ExtraRequestInfo* info = - ResourceDispatcherHost::ExtraInfoForRequest(request); + ResourceDispatcherHostRequestInfo* info = + ResourceDispatcherHost::InfoForRequest(request); DCHECK(info); // A certificate error occurred. Construct a SSLCertErrorHandler object and @@ -78,9 +78,9 @@ void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh, ui_loop->PostTask(FROM_HERE, NewRunnableMethod(new SSLCertErrorHandler(rdh, request, - info->resource_type, - info->frame_origin, - info->main_frame_origin, + info->resource_type(), + info->frame_origin(), + info->main_frame_origin(), cert_error, cert, ui_loop), @@ -91,26 +91,26 @@ void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh, bool SSLManager::ShouldStartRequest(ResourceDispatcherHost* rdh, URLRequest* request, MessageLoop* ui_loop) { - ResourceDispatcherHost::ExtraRequestInfo* info = - ResourceDispatcherHost::ExtraInfoForRequest(request); + ResourceDispatcherHostRequestInfo* info = + ResourceDispatcherHost::InfoForRequest(request); DCHECK(info); // We cheat here and talk to the SSLPolicy on the IO thread because we need // to respond synchronously to avoid delaying all network requests... if (!SSLPolicy::IsMixedContent(request->url(), - info->resource_type, - info->filter_policy, - info->frame_origin)) + info->resource_type(), + info->filter_policy(), + info->frame_origin())) return true; ui_loop->PostTask(FROM_HERE, NewRunnableMethod(new SSLMixedContentHandler(rdh, request, - info->resource_type, - info->frame_origin, - info->main_frame_origin, - info->child_id, + info->resource_type(), + info->frame_origin(), + info->main_frame_origin(), + info->child_id(), ui_loop), &SSLMixedContentHandler::Dispatch)); return false; |