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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 std::string SSLBlockingPage::GetHTMLContentsV2() { | 420 std::string SSLBlockingPage::GetHTMLContentsV2() { |
421 base::DictionaryValue loadTimeData; | 421 base::DictionaryValue loadTimeData; |
422 base::string16 url(ASCIIToUTF16(request_url_.host())); | 422 base::string16 url(ASCIIToUTF16(request_url_.host())); |
423 bool rtl = base::i18n::IsRTL(); | 423 bool rtl = base::i18n::IsRTL(); |
424 loadTimeData.SetString("textDirection", rtl ? "rtl" : "ltr"); | 424 loadTimeData.SetString("textDirection", rtl ? "rtl" : "ltr"); |
425 if (rtl) | 425 if (rtl) |
426 base::i18n::WrapStringWithLTRFormatting(&url); | 426 base::i18n::WrapStringWithLTRFormatting(&url); |
427 webui::SetFontAndTextDirection(&loadTimeData); | 427 webui::SetFontAndTextDirection(&loadTimeData); |
428 | 428 |
429 // Shared values for both the overridable and non-overridable versions. | 429 // Shared values for both the overridable and non-overridable versions. |
| 430 loadTimeData.SetBoolean("ssl", true); |
430 loadTimeData.SetBoolean("overridable", overridable_ && !strict_enforcement_); | 431 loadTimeData.SetBoolean("overridable", overridable_ && !strict_enforcement_); |
431 loadTimeData.SetString( | 432 loadTimeData.SetString( |
432 "tabTitle", l10n_util::GetStringUTF16(IDS_SSL_V2_TITLE)); | 433 "tabTitle", l10n_util::GetStringUTF16(IDS_SSL_V2_TITLE)); |
433 loadTimeData.SetString( | 434 loadTimeData.SetString( |
434 "heading", l10n_util::GetStringUTF16(IDS_SSL_V2_HEADING)); | 435 "heading", l10n_util::GetStringUTF16(IDS_SSL_V2_HEADING)); |
435 loadTimeData.SetString( | 436 loadTimeData.SetString( |
436 "primaryParagraph", | 437 "primaryParagraph", |
437 l10n_util::GetStringFUTF16(IDS_SSL_V2_PRIMARY_PARAGRAPH, url)); | 438 l10n_util::GetStringFUTF16(IDS_SSL_V2_PRIMARY_PARAGRAPH, url)); |
438 loadTimeData.SetString( | 439 loadTimeData.SetString( |
439 "openDetails", | 440 "openDetails", |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 // sure we don't clear the captive portal flag, since the interstitial was | 653 // sure we don't clear the captive portal flag, since the interstitial was |
653 // potentially caused by the captive portal. | 654 // potentially caused by the captive portal. |
654 captive_portal_detected_ = captive_portal_detected_ || | 655 captive_portal_detected_ = captive_portal_detected_ || |
655 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); | 656 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); |
656 // Also keep track of non-HTTP portals and error cases. | 657 // Also keep track of non-HTTP portals and error cases. |
657 captive_portal_no_response_ = captive_portal_no_response_ || | 658 captive_portal_no_response_ = captive_portal_no_response_ || |
658 (results->result == captive_portal::RESULT_NO_RESPONSE); | 659 (results->result == captive_portal::RESULT_NO_RESPONSE); |
659 } | 660 } |
660 #endif | 661 #endif |
661 } | 662 } |
OLD | NEW |