OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
6 #define CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ | 6 #define CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 // ErrorHandler was created with. | 32 // ErrorHandler was created with. |
33 // | 33 // |
34 // IMPORTANT NOTE: | 34 // IMPORTANT NOTE: |
35 // | 35 // |
36 // If you are not doing anything in OnDispatched/OnDispatchFailed, make sure | 36 // If you are not doing anything in OnDispatched/OnDispatchFailed, make sure |
37 // you call TakeNoAction(). This is necessary for ensuring the instance is | 37 // you call TakeNoAction(). This is necessary for ensuring the instance is |
38 // not leaked. | 38 // not leaked. |
39 // | 39 // |
40 class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> { | 40 class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> { |
41 public: | 41 public: |
42 virtual SSLCertErrorHandler* AsSSLCertErrorHandler() { return NULL; } | 42 virtual SSLCertErrorHandler* AsSSLCertErrorHandler(); |
43 | 43 |
44 // Find the appropriate SSLManager for the net::URLRequest and begin handling | 44 // Find the appropriate SSLManager for the net::URLRequest and begin handling |
45 // this error. | 45 // this error. |
46 // | 46 // |
47 // Call on UI thread. | 47 // Call on UI thread. |
48 void Dispatch(); | 48 void Dispatch(); |
49 | 49 |
50 // Available on either thread. | 50 // Available on either thread. |
51 const GURL& request_url() const { return request_url_; } | 51 const GURL& request_url() const { return request_url_; } |
52 | 52 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 const std::string main_frame_origin_; | 151 const std::string main_frame_origin_; |
152 | 152 |
153 // A flag to make sure we notify the net::URLRequest exactly once. | 153 // A flag to make sure we notify the net::URLRequest exactly once. |
154 // Should only be accessed on the IO thread | 154 // Should only be accessed on the IO thread |
155 bool request_has_been_notified_; | 155 bool request_has_been_notified_; |
156 | 156 |
157 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); | 157 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); |
158 }; | 158 }; |
159 | 159 |
160 #endif // CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ | 160 #endif // CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
OLD | NEW |