| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/ssl/ssl_manager.h" | 5 #include "chrome/browser/ssl/ssl_manager.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/browser/load_from_memory_cache_details.h" | 9 #include "chrome/browser/load_from_memory_cache_details.h" |
| 10 #include "chrome/browser/net/url_request_tracking.h" | 10 #include "chrome/browser/net/url_request_tracking.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 request, | 80 request, |
| 81 info->resource_type(), | 81 info->resource_type(), |
| 82 info->frame_origin(), | 82 info->frame_origin(), |
| 83 info->main_frame_origin(), | 83 info->main_frame_origin(), |
| 84 cert_error, | 84 cert_error, |
| 85 cert, | 85 cert, |
| 86 ui_loop), | 86 ui_loop), |
| 87 &SSLCertErrorHandler::Dispatch)); | 87 &SSLCertErrorHandler::Dispatch)); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void SSLManager::DidDisplayInsecureContent() { |
| 91 policy()->DidDisplayInsecureContent(controller_->GetActiveEntry()); |
| 92 } |
| 93 |
| 94 void SSLManager::DidRunInsecureContent(const std::string& security_origin) { |
| 95 policy()->DidRunInsecureContent(security_origin); |
| 96 } |
| 97 |
| 90 // static | 98 // static |
| 91 bool SSLManager::ShouldStartRequest(ResourceDispatcherHost* rdh, | 99 bool SSLManager::ShouldStartRequest(ResourceDispatcherHost* rdh, |
| 92 URLRequest* request, | 100 URLRequest* request, |
| 93 MessageLoop* ui_loop) { | 101 MessageLoop* ui_loop) { |
| 94 ResourceDispatcherHostRequestInfo* info = | 102 ResourceDispatcherHostRequestInfo* info = |
| 95 ResourceDispatcherHost::InfoForRequest(request); | 103 ResourceDispatcherHost::InfoForRequest(request); |
| 96 DCHECK(info); | 104 DCHECK(info); |
| 97 | 105 |
| 98 // We cheat here and talk to the SSLPolicy on the IO thread because we need | 106 // We cheat here and talk to the SSLPolicy on the IO thread because we need |
| 99 // to respond synchronously to avoid delaying all network requests... | 107 // to respond synchronously to avoid delaying all network requests... |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 } | 325 } |
| 318 | 326 |
| 319 if (ca_name) { | 327 if (ca_name) { |
| 320 // TODO(wtc): should we show the root CA's name instead? | 328 // TODO(wtc): should we show the root CA's name instead? |
| 321 *ca_name = l10n_util::GetStringF( | 329 *ca_name = l10n_util::GetStringF( |
| 322 IDS_SECURE_CONNECTION_EV_CA, | 330 IDS_SECURE_CONNECTION_EV_CA, |
| 323 UTF8ToWide(cert.issuer().organization_names[0])); | 331 UTF8ToWide(cert.issuer().organization_names[0])); |
| 324 } | 332 } |
| 325 return true; | 333 return true; |
| 326 } | 334 } |
| OLD | NEW |