OLD | NEW |
1 // Copyright (c) 2012 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_ERROR_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
6 #define CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ | 6 #define CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 public: | 53 public: |
54 // Called when SSLErrorHandler decides to cancel the request because of | 54 // Called when SSLErrorHandler decides to cancel the request because of |
55 // the SSL error. | 55 // the SSL error. |
56 virtual void CancelSSLRequest(const content::GlobalRequestID& id, | 56 virtual void CancelSSLRequest(const content::GlobalRequestID& id, |
57 int error, | 57 int error, |
58 const net::SSLInfo* ssl_info) = 0; | 58 const net::SSLInfo* ssl_info) = 0; |
59 | 59 |
60 // Called when SSLErrorHandler decides to continue the request despite the | 60 // Called when SSLErrorHandler decides to continue the request despite the |
61 // SSL error. | 61 // SSL error. |
62 virtual void ContinueSSLRequest(const content::GlobalRequestID& id) = 0; | 62 virtual void ContinueSSLRequest(const content::GlobalRequestID& id) = 0; |
| 63 |
| 64 protected: |
| 65 virtual ~Delegate() {} |
63 }; | 66 }; |
64 | 67 |
65 virtual SSLCertErrorHandler* AsSSLCertErrorHandler(); | 68 virtual SSLCertErrorHandler* AsSSLCertErrorHandler(); |
66 | 69 |
67 // Find the appropriate SSLManager for the net::URLRequest and begin handling | 70 // Find the appropriate SSLManager for the net::URLRequest and begin handling |
68 // this error. | 71 // this error. |
69 // | 72 // |
70 // Call on UI thread. | 73 // Call on UI thread. |
71 void Dispatch(); | 74 void Dispatch(); |
72 | 75 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 const ResourceType::Type resource_type_; | 163 const ResourceType::Type resource_type_; |
161 | 164 |
162 // A flag to make sure we notify the net::URLRequest exactly once. | 165 // A flag to make sure we notify the net::URLRequest exactly once. |
163 // Should only be accessed on the IO thread | 166 // Should only be accessed on the IO thread |
164 bool request_has_been_notified_; | 167 bool request_has_been_notified_; |
165 | 168 |
166 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); | 169 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); |
167 }; | 170 }; |
168 | 171 |
169 #endif // CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ | 172 #endif // CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
OLD | NEW |