| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SSL_SSL_MANAGER_H_ | 6 #define CHROME_BROWSER_SSL_SSL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // will adjust the security UI and either call |Cancel| or | 336 // will adjust the security UI and either call |Cancel| or |
| 337 // |ContinueDespiteLastError| on the URLRequest. | 337 // |ContinueDespiteLastError| on the URLRequest. |
| 338 // | 338 // |
| 339 // Called on the IO thread. | 339 // Called on the IO thread. |
| 340 static void OnSSLCertificateError(ResourceDispatcherHost* resource_dispatcher, | 340 static void OnSSLCertificateError(ResourceDispatcherHost* resource_dispatcher, |
| 341 URLRequest* request, | 341 URLRequest* request, |
| 342 int cert_error, | 342 int cert_error, |
| 343 net::X509Certificate* cert, | 343 net::X509Certificate* cert, |
| 344 MessageLoop* ui_loop); | 344 MessageLoop* ui_loop); |
| 345 | 345 |
| 346 // Called when a mixed-content sub-resource request has been detected. The | 346 // Called before a URL request is about to be started. Returns false if the |
| 347 // request is not started yet. The SSLManager will make a decision on whether | 347 // resource request should be delayed while we figure out what to do. We use |
| 348 // to filter that request's content (with the filter_policy flag). | 348 // this function as the entry point for our mixed content detection. |
| 349 // |
| 349 // TODO(jcampan): Implement a way to just cancel the request. This is not | 350 // TODO(jcampan): Implement a way to just cancel the request. This is not |
| 350 // straight-forward as canceling a request that has not been started will | 351 // straight-forward as canceling a request that has not been started will |
| 351 // not remove from the pending_requests_ of the ResourceDispatcherHost. | 352 // not remove from the pending_requests_ of the ResourceDispatcherHost. |
| 352 // Called on the IO thread. | 353 // Called on the IO thread. |
| 353 static void OnMixedContentRequest(ResourceDispatcherHost* resource_dispatcher, | 354 static bool ShouldStartRequest(ResourceDispatcherHost* resource_dispatcher, |
| 354 URLRequest* request, | 355 URLRequest* request, |
| 355 MessageLoop* ui_loop); | 356 MessageLoop* ui_loop); |
| 356 | 357 |
| 357 // Called by CertError::Dispatch to kick off processing of the cert error by | 358 // Called by CertError::Dispatch to kick off processing of the cert error by |
| 358 // the SSL manager. The error originated from the ResourceDispatcherHost. | 359 // the SSL manager. The error originated from the ResourceDispatcherHost. |
| 359 // | 360 // |
| 360 // Called on the UI thread. | 361 // Called on the UI thread. |
| 361 void OnCertError(CertError* error); | 362 void OnCertError(CertError* error); |
| 362 | 363 |
| 363 // Called by MixedContentHandler::Dispatch to kick off processing of the | 364 // Called by MixedContentHandler::Dispatch to kick off processing of the |
| 364 // mixed-content resource request. The info originated from the | 365 // mixed-content resource request. The info originated from the |
| 365 // ResourceDispatcherHost. | 366 // ResourceDispatcherHost. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 SSLHostState* ssl_host_state_; | 462 SSLHostState* ssl_host_state_; |
| 462 | 463 |
| 463 // The list of messages that should be displayed (in info bars) when the page | 464 // The list of messages that should be displayed (in info bars) when the page |
| 464 // currently loading had loaded. | 465 // currently loading had loaded. |
| 465 std::vector<SSLMessageInfo> pending_messages_; | 466 std::vector<SSLMessageInfo> pending_messages_; |
| 466 | 467 |
| 467 DISALLOW_COPY_AND_ASSIGN(SSLManager); | 468 DISALLOW_COPY_AND_ASSIGN(SSLManager); |
| 468 }; | 469 }; |
| 469 | 470 |
| 470 #endif // CHROME_BROWSER_SSL_SSL_MANAGER_H_ | 471 #endif // CHROME_BROWSER_SSL_SSL_MANAGER_H_ |
| OLD | NEW |