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

Side by Side Diff: components/security_interstitials/content/security_interstitial_page.cc

Issue 2898593002: WebView: choose loud vs. quiet interstitial (Closed)
Patch Set: Rebase, fix merge conflicts Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "components/security_interstitials/content/security_interstitial_page.h " 5 #include "components/security_interstitials/content/security_interstitial_page.h "
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 *controller_->GetPrefService(), on_show_extended_reporting_pref_exists_, 98 *controller_->GetPrefService(), on_show_extended_reporting_pref_exists_,
99 on_show_extended_reporting_pref_value_); 99 on_show_extended_reporting_pref_value_);
100 } 100 }
101 } 101 }
102 102
103 base::string16 SecurityInterstitialPage::GetFormattedHostName() const { 103 base::string16 SecurityInterstitialPage::GetFormattedHostName() const {
104 return security_interstitials::common_string_util::GetFormattedHostName( 104 return security_interstitials::common_string_util::GetFormattedHostName(
105 request_url_); 105 request_url_);
106 } 106 }
107 107
108 int SecurityInterstitialPage::GetHTMLTemplateId() {
109 return IDR_SECURITY_INTERSTITIAL_HTML;
110 }
111
108 std::string SecurityInterstitialPage::GetHTMLContents() { 112 std::string SecurityInterstitialPage::GetHTMLContents() {
109 base::DictionaryValue load_time_data; 113 base::DictionaryValue load_time_data;
110 PopulateInterstitialStrings(&load_time_data); 114 PopulateInterstitialStrings(&load_time_data);
111 webui::SetLoadTimeDataDefaults( 115 webui::SetLoadTimeDataDefaults(
112 controller()->GetApplicationLocale(), &load_time_data); 116 controller()->GetApplicationLocale(), &load_time_data);
113 std::string html = ResourceBundle::GetSharedInstance() 117 std::string html = ResourceBundle::GetSharedInstance()
114 .GetRawDataResource(IDR_SECURITY_INTERSTITIAL_HTML) 118 .GetRawDataResource(GetHTMLTemplateId())
115 .as_string(); 119 .as_string();
116 webui::AppendWebUiCssTextDefaults(&html); 120 webui::AppendWebUiCssTextDefaults(&html);
117 return webui::GetI18nTemplateHtml(html, &load_time_data); 121 return webui::GetI18nTemplateHtml(html, &load_time_data);
118 } 122 }
119 123
120 } // security_interstitials 124 } // security_interstitials
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698