Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: content/browser/ssl/ssl_manager.cc

Issue 9406001: Factor out ResourceDispatcherHost dependent code around SSLManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reflects wtc's review Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« content/browser/ssl/ssl_manager.h ('K') | « content/browser/ssl/ssl_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/ssl/ssl_manager.cc
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc
index 44e5df98418c89728fb2b6d54717acfab0e13321..f4d82db97ccd26f40aa6b94937adce010ebe8b9a 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,6 +11,7 @@
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/renderer_host/resource_request_details.h"
#include "content/browser/ssl/ssl_cert_error_handler.h"
+#include "content/browser/ssl/ssl_error_handler.h"
wtc 2012/02/24 00:44:38 Nit: this is already included by ssl_manager.h.
Takashi Toyoshima 2012/02/28 20:55:43 Done.
#include "content/browser/ssl/ssl_policy.h"
#include "content/browser/ssl/ssl_request_info.h"
#include "content/browser/tab_contents/navigation_entry_impl.h"
@@ -31,26 +32,24 @@ using content::SSLStatus;
using content::WebContents;
// static
-void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh,
- net::URLRequest* request,
+void SSLManager::OnSSLCertificateError(SSLErrorHandler::Delegate* delegate,
+ const content::GlobalRequestID& id,
const net::SSLInfo& ssl_info,
bool fatal) {
+ DCHECK(delegate);
DVLOG(1) << "OnSSLCertificateError() cert_error: "
<< net::MapCertStatusToNetError(ssl_info.cert_status)
- << " url: " << request->url().spec()
+ << " instance_id: " << id.child_id << "," << id.request_id
wtc 2012/02/24 00:44:38 Nit: update "instance_id" in this comment. Perhap
Takashi Toyoshima 2012/02/28 20:55:43 Done.
+ << " url: " << delegate->URLForSSLRequest(id)
<< " cert_status: " << std::hex << ssl_info.cert_status;
- ResourceDispatcherHostRequestInfo* info =
- ResourceDispatcherHost::InfoForRequest(request);
-
// A certificate error occurred. Construct a SSLCertErrorHandler object and
// hand it over to the UI thread for processing.
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&SSLCertErrorHandler::Dispatch,
- new SSLCertErrorHandler(rdh,
- request,
- info->resource_type(),
+ new SSLCertErrorHandler(delegate,
+ id,
ssl_info,
fatal)));
}
« content/browser/ssl/ssl_manager.h ('K') | « content/browser/ssl/ssl_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698