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 #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/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/browser_thread.h" | 9 #include "chrome/browser/browser_thread.h" |
10 #include "chrome/browser/load_from_memory_cache_details.h" | 10 #include "chrome/browser/load_from_memory_cache_details.h" |
11 #include "chrome/browser/net/url_request_tracking.h" | 11 #include "chrome/browser/net/url_request_tracking.h" |
12 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/browser/renderer_host/resource_request_details.h" | 13 #include "chrome/browser/renderer_host/resource_request_details.h" |
14 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 14 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
15 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" | 15 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" |
16 #include "chrome/browser/ssl/ssl_cert_error_handler.h" | 16 #include "chrome/browser/ssl/ssl_cert_error_handler.h" |
17 #include "chrome/browser/ssl/ssl_policy.h" | 17 #include "chrome/browser/ssl/ssl_policy.h" |
18 #include "chrome/browser/ssl/ssl_request_info.h" | 18 #include "chrome/browser/ssl/ssl_request_info.h" |
19 #include "chrome/browser/tab_contents/navigation_controller.h" | 19 #include "chrome/browser/tab_contents/navigation_controller.h" |
20 #include "chrome/browser/tab_contents/navigation_entry.h" | 20 #include "chrome/browser/tab_contents/navigation_entry.h" |
21 #include "chrome/browser/tab_contents/provisional_load_details.h" | 21 #include "chrome/browser/tab_contents/provisional_load_details.h" |
22 #include "chrome/browser/tab_contents/tab_contents.h" | 22 #include "chrome/browser/tab_contents/tab_contents.h" |
23 #include "chrome/common/notification_service.h" | 23 #include "chrome/common/notification_service.h" |
24 #include "chrome/common/pref_names.h" | |
25 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
26 #include "net/base/cert_status_flags.h" | 25 #include "net/base/cert_status_flags.h" |
27 | 26 |
28 // static | 27 // static |
29 void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh, | 28 void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh, |
30 net::URLRequest* request, | 29 net::URLRequest* request, |
31 int cert_error, | 30 int cert_error, |
32 net::X509Certificate* cert) { | 31 net::X509Certificate* cert) { |
33 DVLOG(1) << "OnSSLCertificateError() cert_error: " << cert_error | 32 DVLOG(1) << "OnSSLCertificateError() cert_error: " << cert_error |
34 << " url: " << request->url().spec(); | 33 << " url: " << request->url().spec(); |
(...skipping 229 matching lines...) Loading... |
264 | 263 |
265 policy()->UpdateEntry(entry, controller_->tab_contents()); | 264 policy()->UpdateEntry(entry, controller_->tab_contents()); |
266 | 265 |
267 if (!entry->ssl().Equals(original_ssl_status)) { | 266 if (!entry->ssl().Equals(original_ssl_status)) { |
268 NotificationService::current()->Notify( | 267 NotificationService::current()->Notify( |
269 NotificationType::SSL_VISIBLE_STATE_CHANGED, | 268 NotificationType::SSL_VISIBLE_STATE_CHANGED, |
270 Source<NavigationController>(controller_), | 269 Source<NavigationController>(controller_), |
271 NotificationService::NoDetails()); | 270 NotificationService::NoDetails()); |
272 } | 271 } |
273 } | 272 } |
OLD | NEW |