OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_error_handler.h" | 5 #include "chrome/browser/ssl/ssl_error_handler.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 // WebContentsObserver: | 100 // WebContentsObserver: |
101 void NavigationStopped() override { | 101 void NavigationStopped() override { |
102 // Deletes |this|. | 102 // Deletes |this|. |
103 web_contents_->RemoveUserData(UserDataKey()); | 103 web_contents_->RemoveUserData(UserDataKey()); |
104 } | 104 } |
105 | 105 |
106 void NavigationEntryCommitted( | 106 void NavigationEntryCommitted( |
107 const content::LoadCommittedDetails& /* load_details */) override { | 107 const content::LoadCommittedDetails& /* load_details */) override { |
108 web_contents_->GetMainFrame()->AddMessageToConsole( | 108 web_contents_->GetMainFrame()->AddMessageToConsole( |
109 content::CONSOLE_MESSAGE_LEVEL_LOG, | 109 content::CONSOLE_MESSAGE_LEVEL_INFO, |
110 base::StringPrintf( | 110 base::StringPrintf( |
111 "Redirecting navigation %s -> %s because the server presented a " | 111 "Redirecting navigation %s -> %s because the server presented a " |
112 "certificate valid for %s but not for %s. To disable such " | 112 "certificate valid for %s but not for %s. To disable such " |
113 "redirects launch Chrome with the following flag: " | 113 "redirects launch Chrome with the following flag: " |
114 "--disable-features=SSLCommonNameMismatchHandling", | 114 "--disable-features=SSLCommonNameMismatchHandling", |
115 request_url_hostname_.c_str(), suggested_url_hostname_.c_str(), | 115 request_url_hostname_.c_str(), suggested_url_hostname_.c_str(), |
116 suggested_url_hostname_.c_str(), request_url_hostname_.c_str())); | 116 suggested_url_hostname_.c_str(), request_url_hostname_.c_str())); |
117 web_contents_->RemoveUserData(UserDataKey()); | 117 web_contents_->RemoveUserData(UserDataKey()); |
118 } | 118 } |
119 | 119 |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 network_time::NetworkTimeTracker* tracker = | 538 network_time::NetworkTimeTracker* tracker = |
539 g_config.Pointer()->network_time_tracker(); | 539 g_config.Pointer()->network_time_tracker(); |
540 ssl_errors::ClockState clock_state = ssl_errors::GetClockState(now, tracker); | 540 ssl_errors::ClockState clock_state = ssl_errors::GetClockState(now, tracker); |
541 if (clock_state == ssl_errors::CLOCK_STATE_FUTURE || | 541 if (clock_state == ssl_errors::CLOCK_STATE_FUTURE || |
542 clock_state == ssl_errors::CLOCK_STATE_PAST) { | 542 clock_state == ssl_errors::CLOCK_STATE_PAST) { |
543 ShowBadClockInterstitial(now, clock_state); | 543 ShowBadClockInterstitial(now, clock_state); |
544 return; // |this| is deleted after showing the interstitial. | 544 return; // |this| is deleted after showing the interstitial. |
545 } | 545 } |
546 ShowSSLInterstitial(); | 546 ShowSSLInterstitial(); |
547 } | 547 } |
OLD | NEW |