| 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/build_time.h" | 7 #include "base/build_time.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 } | 412 } |
| 413 | 413 |
| 414 std::string SSLBlockingPage::GetHTMLContents() { | 414 std::string SSLBlockingPage::GetHTMLContents() { |
| 415 base::DictionaryValue load_time_data; | 415 base::DictionaryValue load_time_data; |
| 416 base::string16 url(ASCIIToUTF16(request_url_.host())); | 416 base::string16 url(ASCIIToUTF16(request_url_.host())); |
| 417 if (base::i18n::IsRTL()) | 417 if (base::i18n::IsRTL()) |
| 418 base::i18n::WrapStringWithLTRFormatting(&url); | 418 base::i18n::WrapStringWithLTRFormatting(&url); |
| 419 webui::SetFontAndTextDirection(&load_time_data); | 419 webui::SetFontAndTextDirection(&load_time_data); |
| 420 | 420 |
| 421 // Shared values for both the overridable and non-overridable versions. | 421 // Shared values for both the overridable and non-overridable versions. |
| 422 load_time_data.SetBoolean("ssl", true); | 422 load_time_data.SetString("type", "SSL"); |
| 423 load_time_data.SetBoolean("overridable", overridable_); | 423 load_time_data.SetBoolean("overridable", overridable_); |
| 424 load_time_data.SetString( | 424 load_time_data.SetString( |
| 425 "tabTitle", l10n_util::GetStringUTF16(IDS_SSL_V2_TITLE)); | 425 "tabTitle", l10n_util::GetStringUTF16(IDS_SSL_V2_TITLE)); |
| 426 load_time_data.SetString( | 426 load_time_data.SetString( |
| 427 "heading", l10n_util::GetStringUTF16(IDS_SSL_V2_HEADING)); | 427 "heading", l10n_util::GetStringUTF16(IDS_SSL_V2_HEADING)); |
| 428 | 428 |
| 429 base::Time now = base::Time::NowFromSystemTime(); | 429 base::Time now = base::Time::NowFromSystemTime(); |
| 430 bool bad_clock = IsErrorDueToBadClock(now, cert_error_); | 430 bool bad_clock = IsErrorDueToBadClock(now, cert_error_); |
| 431 if (bad_clock) { | 431 if (bad_clock) { |
| 432 load_time_data.SetString("primaryParagraph", | 432 load_time_data.SetString("primaryParagraph", |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 for (; i < 5; i++) { | 668 for (; i < 5; i++) { |
| 669 strings->SetString(keys[i], std::string()); | 669 strings->SetString(keys[i], std::string()); |
| 670 } | 670 } |
| 671 } | 671 } |
| 672 | 672 |
| 673 void SSLBlockingPage::OnGotHistoryCount(bool success, | 673 void SSLBlockingPage::OnGotHistoryCount(bool success, |
| 674 int num_visits, | 674 int num_visits, |
| 675 base::Time first_visit) { | 675 base::Time first_visit) { |
| 676 num_visits_ = num_visits; | 676 num_visits_ = num_visits; |
| 677 } | 677 } |
| OLD | NEW |