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 #include "chrome/browser/ssl/ssl_blocking_page.h" | 5 #include "chrome/browser/ssl/ssl_blocking_page.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) { | 108 void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) { |
109 const net::SSLInfo& ssl_info = handler_->ssl_info(); | 109 const net::SSLInfo& ssl_info = handler_->ssl_info(); |
110 int cert_id = CertStore::GetInstance()->StoreCert( | 110 int cert_id = CertStore::GetInstance()->StoreCert( |
111 ssl_info.cert, tab()->render_view_host()->process()->id()); | 111 ssl_info.cert, tab()->render_view_host()->process()->id()); |
112 | 112 |
113 entry->ssl().set_security_style(SECURITY_STYLE_AUTHENTICATION_BROKEN); | 113 entry->ssl().set_security_style(SECURITY_STYLE_AUTHENTICATION_BROKEN); |
114 entry->ssl().set_cert_id(cert_id); | 114 entry->ssl().set_cert_id(cert_id); |
115 entry->ssl().set_cert_status(ssl_info.cert_status); | 115 entry->ssl().set_cert_status(ssl_info.cert_status); |
116 entry->ssl().set_security_bits(ssl_info.security_bits); | 116 entry->ssl().set_security_bits(ssl_info.security_bits); |
117 NotificationService::current()->Notify( | 117 NotificationService::current()->Notify( |
118 NotificationType::SSL_VISIBLE_STATE_CHANGED, | 118 content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, |
119 Source<NavigationController>(&tab()->controller()), | 119 Source<NavigationController>(&tab()->controller()), |
120 NotificationService::NoDetails()); | 120 NotificationService::NoDetails()); |
121 } | 121 } |
122 | 122 |
123 void SSLBlockingPage::CommandReceived(const std::string& command) { | 123 void SSLBlockingPage::CommandReceived(const std::string& command) { |
124 if (command == "1") { | 124 if (command == "1") { |
125 Proceed(); | 125 Proceed(); |
126 } else { | 126 } else { |
127 DontProceed(); | 127 DontProceed(); |
128 } | 128 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 "moreInfo1", "moreInfo2", "moreInfo3", "moreInfo4", "moreInfo5" | 170 "moreInfo1", "moreInfo2", "moreInfo3", "moreInfo4", "moreInfo5" |
171 }; | 171 }; |
172 int i; | 172 int i; |
173 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { | 173 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { |
174 strings->SetString(keys[i], extra_info[i]); | 174 strings->SetString(keys[i], extra_info[i]); |
175 } | 175 } |
176 for (; i < 5; i++) { | 176 for (; i < 5; i++) { |
177 strings->SetString(keys[i], ""); | 177 strings->SetString(keys[i], ""); |
178 } | 178 } |
179 } | 179 } |
OLD | NEW |