| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sha1.h" | 9 #include "base/sha1.h" |
| 10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 } | 307 } |
| 308 strings.SetString("errorType", ""); | 308 strings.SetString("errorType", ""); |
| 309 } | 309 } |
| 310 | 310 |
| 311 strings.SetString("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr"); | 311 strings.SetString("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr"); |
| 312 | 312 |
| 313 base::StringPiece html( | 313 base::StringPiece html( |
| 314 ResourceBundle::GetSharedInstance().GetRawDataResource( | 314 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 315 resource_id)); | 315 resource_id)); |
| 316 | 316 |
| 317 return jstemplate_builder::GetI18nTemplateHtml(html, &strings); | 317 return webui::GetI18nTemplateHtml(html, &strings); |
| 318 } | 318 } |
| 319 | 319 |
| 320 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { | 320 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { |
| 321 int cert_id = content::CertStore::GetInstance()->StoreCert( | 321 int cert_id = content::CertStore::GetInstance()->StoreCert( |
| 322 ssl_info_.cert, web_contents_->GetRenderProcessHost()->GetID()); | 322 ssl_info_.cert, web_contents_->GetRenderProcessHost()->GetID()); |
| 323 | 323 |
| 324 entry->GetSSL().security_style = | 324 entry->GetSSL().security_style = |
| 325 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; | 325 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; |
| 326 entry->GetSSL().cert_id = cert_id; | 326 entry->GetSSL().cert_id = cert_id; |
| 327 entry->GetSSL().cert_status = ssl_info_.cert_status; | 327 entry->GetSSL().cert_status = ssl_info_.cert_status; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 "moreInfo1", "moreInfo2", "moreInfo3", "moreInfo4", "moreInfo5" | 398 "moreInfo1", "moreInfo2", "moreInfo3", "moreInfo4", "moreInfo5" |
| 399 }; | 399 }; |
| 400 int i; | 400 int i; |
| 401 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { | 401 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { |
| 402 strings->SetString(keys[i], extra_info[i]); | 402 strings->SetString(keys[i], extra_info[i]); |
| 403 } | 403 } |
| 404 for (; i < 5; i++) { | 404 for (; i < 5; i++) { |
| 405 strings->SetString(keys[i], ""); | 405 strings->SetString(keys[i], ""); |
| 406 } | 406 } |
| 407 } | 407 } |
| OLD | NEW |