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

Side by Side Diff: content/browser/ssl/ssl_cert_error_handler.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_
6 #define CONTENT_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_ 6 #define CONTENT_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "content/browser/ssl/ssl_error_handler.h" 11 #include "content/browser/ssl/ssl_error_handler.h"
12 #include "content/public/browser/global_request_id.h"
wtc 2012/02/24 00:44:38 This is already included by ssl_error_handler.h.
Takashi Toyoshima 2012/02/28 20:55:43 Done.
12 #include "net/base/ssl_info.h" 13 #include "net/base/ssl_info.h"
13 14
14 // A CertError represents an error that occurred with the certificate in an 15 // A CertError represents an error that occurred with the certificate in an
15 // SSL session. A CertError object exists both on the IO thread and on the UI 16 // SSL session. A CertError object exists both on the IO thread and on the UI
16 // thread and allows us to cancel/continue a request it is associated with. 17 // thread and allows us to cancel/continue a request it is associated with.
17 class SSLCertErrorHandler : public SSLErrorHandler { 18 class SSLCertErrorHandler : public SSLErrorHandler {
18 public: 19 public:
19 // Construct on the IO thread. 20 // Construct on the IO thread.
20 SSLCertErrorHandler(ResourceDispatcherHost* rdh, 21 SSLCertErrorHandler(Delegate* delegate,
21 net::URLRequest* request, 22 const content::GlobalRequestID& id,
22 ResourceType::Type resource_type,
23 const net::SSLInfo& ssl_info, 23 const net::SSLInfo& ssl_info,
24 bool fatal); 24 bool fatal);
25 25
26 virtual SSLCertErrorHandler* AsSSLCertErrorHandler() OVERRIDE; 26 virtual SSLCertErrorHandler* AsSSLCertErrorHandler() OVERRIDE;
27 27
28 // These accessors are available on either thread 28 // These accessors are available on either thread
29 const net::SSLInfo& ssl_info() const { return ssl_info_; } 29 const net::SSLInfo& ssl_info() const { return ssl_info_; }
30 int cert_error() const { return cert_error_; } 30 int cert_error() const { return cert_error_; }
31 bool fatal() const { return fatal_; } 31 bool fatal() const { return fatal_; }
32 32
33 protected: 33 protected:
34 // SSLErrorHandler methods 34 // SSLErrorHandler methods
35 virtual void OnDispatchFailed() OVERRIDE; 35 virtual void OnDispatchFailed() OVERRIDE;
36 virtual void OnDispatched() OVERRIDE; 36 virtual void OnDispatched() OVERRIDE;
37 37
38 private: 38 private:
39 virtual ~SSLCertErrorHandler(); 39 virtual ~SSLCertErrorHandler();
40 40
41 // These read-only members may be accessed on any thread. 41 // These read-only members may be accessed on any thread.
42 const net::SSLInfo ssl_info_; 42 const net::SSLInfo ssl_info_;
43 const int cert_error_; // The error we represent. 43 const int cert_error_; // The error we represent.
44 const bool fatal_; // True if the error is from a host requiring 44 const bool fatal_; // True if the error is from a host requiring
45 // certificate errors to be fatal. 45 // certificate errors to be fatal.
46 46
47 DISALLOW_COPY_AND_ASSIGN(SSLCertErrorHandler); 47 DISALLOW_COPY_AND_ASSIGN(SSLCertErrorHandler);
48 }; 48 };
49 49
50 #endif // CONTENT_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_ 50 #endif // CONTENT_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698