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

Side by Side Diff: chrome/browser/ssl/ssl_cert_error_handler.cc

Issue 7111013: Move most of the core SSL code from chrome to content. The UI code that's specific to Chrome (i.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ssl/ssl_cert_error_handler.h"
6
7 #include "chrome/browser/ssl/ssl_manager.h"
8 #include "chrome/browser/ssl/ssl_policy.h"
9 #include "content/browser/renderer_host/resource_dispatcher_host.h"
10 #include "net/base/x509_certificate.h"
11
12 SSLCertErrorHandler::SSLCertErrorHandler(
13 ResourceDispatcherHost* rdh,
14 net::URLRequest* request,
15 ResourceType::Type resource_type,
16 int cert_error,
17 net::X509Certificate* cert)
18 : SSLErrorHandler(rdh, request, resource_type),
19 cert_error_(cert_error) {
20 DCHECK(request == resource_dispatcher_host_->GetURLRequest(request_id_));
21
22 // We cannot use the request->ssl_info(), it's not been initialized yet, so
23 // we have to set the fields manually.
24 ssl_info_.cert = cert;
25 ssl_info_.SetCertError(cert_error);
26 }
27
28 SSLCertErrorHandler* SSLCertErrorHandler::AsSSLCertErrorHandler() {
29 return this;
30 }
31
32 void SSLCertErrorHandler::OnDispatchFailed() {
33 CancelRequest();
34 }
35
36 void SSLCertErrorHandler::OnDispatched() {
37 manager_->policy()->OnCertError(this);
38 }
39
40 SSLCertErrorHandler::~SSLCertErrorHandler() {}
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_cert_error_handler.h ('k') | chrome/browser/ssl/ssl_client_auth_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698