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

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

Issue 600153004: Refactor SafeBrowsing and SSL interstitials to have a type variable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698