Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: chrome/browser/ssl/ssl_blocking_page.cc

Issue 319193002: Update the malware interstitial to have the new layout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes for mattm Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 std::string SSLBlockingPage::GetHTMLContentsV2() { 418 std::string SSLBlockingPage::GetHTMLContentsV2() {
419 base::DictionaryValue loadTimeData; 419 base::DictionaryValue loadTimeData;
420 base::string16 url(ASCIIToUTF16(request_url_.host())); 420 base::string16 url(ASCIIToUTF16(request_url_.host()));
421 bool rtl = base::i18n::IsRTL(); 421 bool rtl = base::i18n::IsRTL();
422 loadTimeData.SetString("textDirection", rtl ? "rtl" : "ltr"); 422 loadTimeData.SetString("textDirection", rtl ? "rtl" : "ltr");
423 if (rtl) 423 if (rtl)
424 base::i18n::WrapStringWithLTRFormatting(&url); 424 base::i18n::WrapStringWithLTRFormatting(&url);
425 webui::SetFontAndTextDirection(&loadTimeData); 425 webui::SetFontAndTextDirection(&loadTimeData);
426 426
427 // Shared values for both the overridable and non-overridable versions. 427 // Shared values for both the overridable and non-overridable versions.
428 loadTimeData.SetBoolean("ssl", true);
428 loadTimeData.SetBoolean("overridable", overridable_ && !strict_enforcement_); 429 loadTimeData.SetBoolean("overridable", overridable_ && !strict_enforcement_);
429 loadTimeData.SetString( 430 loadTimeData.SetString(
430 "tabTitle", l10n_util::GetStringUTF16(IDS_SSL_V2_TITLE)); 431 "tabTitle", l10n_util::GetStringUTF16(IDS_SSL_V2_TITLE));
431 loadTimeData.SetString( 432 loadTimeData.SetString(
432 "heading", l10n_util::GetStringUTF16(IDS_SSL_V2_HEADING)); 433 "heading", l10n_util::GetStringUTF16(IDS_SSL_V2_HEADING));
433 loadTimeData.SetString( 434 loadTimeData.SetString(
434 "primaryParagraph", 435 "primaryParagraph",
435 l10n_util::GetStringFUTF16(IDS_SSL_V2_PRIMARY_PARAGRAPH, url)); 436 l10n_util::GetStringFUTF16(IDS_SSL_V2_PRIMARY_PARAGRAPH, url));
436 loadTimeData.SetString( 437 loadTimeData.SetString(
437 "openDetails", 438 "openDetails",
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 // sure we don't clear the captive portal flag, since the interstitial was 646 // sure we don't clear the captive portal flag, since the interstitial was
646 // potentially caused by the captive portal. 647 // potentially caused by the captive portal.
647 captive_portal_detected_ = captive_portal_detected_ || 648 captive_portal_detected_ = captive_portal_detected_ ||
648 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); 649 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL);
649 // Also keep track of non-HTTP portals and error cases. 650 // Also keep track of non-HTTP portals and error cases.
650 captive_portal_no_response_ = captive_portal_no_response_ || 651 captive_portal_no_response_ = captive_portal_no_response_ ||
651 (results->result == captive_portal::RESULT_NO_RESPONSE); 652 (results->result == captive_portal::RESULT_NO_RESPONSE);
652 } 653 }
653 #endif 654 #endif
654 } 655 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698