| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "content/browser/renderer_host/global_request_id.h" | 13 #include "content/browser/renderer_host/global_request_id.h" |
| 14 #include "content/browser/ssl/ssl_manager.h" | 14 #include "content/browser/ssl/ssl_manager.h" |
| 15 #include "content/common/content_export.h" |
| 15 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 16 #include "webkit/glue/resource_type.h" | 17 #include "webkit/glue/resource_type.h" |
| 17 | 18 |
| 18 class ResourceDispatcherHost; | 19 class ResourceDispatcherHost; |
| 19 class SSLCertErrorHandler; | 20 class SSLCertErrorHandler; |
| 20 class TabContents; | 21 class TabContents; |
| 21 | 22 |
| 22 namespace net { | 23 namespace net { |
| 23 class URLRequest; | 24 class URLRequest; |
| 24 } // namespace net | 25 } // namespace net |
| (...skipping 23 matching lines...) Expand all Loading... |
| 48 void Dispatch(); | 49 void Dispatch(); |
| 49 | 50 |
| 50 // Available on either thread. | 51 // Available on either thread. |
| 51 const GURL& request_url() const { return request_url_; } | 52 const GURL& request_url() const { return request_url_; } |
| 52 | 53 |
| 53 // Available on either thread. | 54 // Available on either thread. |
| 54 ResourceType::Type resource_type() const { return resource_type_; } | 55 ResourceType::Type resource_type() const { return resource_type_; } |
| 55 | 56 |
| 56 // Cancels the associated net::URLRequest. | 57 // Cancels the associated net::URLRequest. |
| 57 // This method can be called from OnDispatchFailed and OnDispatched. | 58 // This method can be called from OnDispatchFailed and OnDispatched. |
| 58 void CancelRequest(); | 59 CONTENT_EXPORT void CancelRequest(); |
| 59 | 60 |
| 60 // Continue the net::URLRequest ignoring any previous errors. Note that some | 61 // Continue the net::URLRequest ignoring any previous errors. Note that some |
| 61 // errors cannot be ignored, in which case this will result in the request | 62 // errors cannot be ignored, in which case this will result in the request |
| 62 // being canceled. | 63 // being canceled. |
| 63 // This method can be called from OnDispatchFailed and OnDispatched. | 64 // This method can be called from OnDispatchFailed and OnDispatched. |
| 64 void ContinueRequest(); | 65 void ContinueRequest(); |
| 65 | 66 |
| 66 // Cancels the associated net::URLRequest and mark it as denied. The renderer | 67 // Cancels the associated net::URLRequest and mark it as denied. The renderer |
| 67 // processes such request in a special manner, optionally replacing them | 68 // processes such request in a special manner, optionally replacing them |
| 68 // with alternate content (typically frames content is replaced with a | 69 // with alternate content (typically frames content is replaced with a |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 const ResourceType::Type resource_type_; | 135 const ResourceType::Type resource_type_; |
| 135 | 136 |
| 136 // A flag to make sure we notify the net::URLRequest exactly once. | 137 // A flag to make sure we notify the net::URLRequest exactly once. |
| 137 // Should only be accessed on the IO thread | 138 // Should only be accessed on the IO thread |
| 138 bool request_has_been_notified_; | 139 bool request_has_been_notified_; |
| 139 | 140 |
| 140 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); | 141 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); |
| 141 }; | 142 }; |
| 142 | 143 |
| 143 #endif // CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ | 144 #endif // CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
| OLD | NEW |