OLD | NEW |
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" |
11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "components/grit/components_resources.h" |
12 #include "components/prefs/pref_service.h" | 13 #include "components/prefs/pref_service.h" |
13 #include "components/safe_browsing_db/safe_browsing_prefs.h" | 14 #include "components/safe_browsing_db/safe_browsing_prefs.h" |
14 #include "components/security_interstitials/content/security_interstitial_contro
ller_client.h" | 15 #include "components/security_interstitials/content/security_interstitial_contro
ller_client.h" |
15 #include "components/security_interstitials/core/common_string_util.h" | 16 #include "components/security_interstitials/core/common_string_util.h" |
16 #include "components/security_interstitials/core/metrics_helper.h" | 17 #include "components/security_interstitials/core/metrics_helper.h" |
17 #include "content/public/browser/interstitial_page.h" | 18 #include "content/public/browser/interstitial_page.h" |
18 #include "content/public/browser/page_navigator.h" | 19 #include "content/public/browser/page_navigator.h" |
19 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
20 #include "grit/components_resources.h" | |
21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
22 #include "ui/base/webui/jstemplate_builder.h" | 22 #include "ui/base/webui/jstemplate_builder.h" |
23 #include "ui/base/webui/web_ui_util.h" | 23 #include "ui/base/webui/web_ui_util.h" |
24 | 24 |
25 namespace security_interstitials { | 25 namespace security_interstitials { |
26 | 26 |
27 SecurityInterstitialPage::SecurityInterstitialPage( | 27 SecurityInterstitialPage::SecurityInterstitialPage( |
28 content::WebContents* web_contents, | 28 content::WebContents* web_contents, |
29 const GURL& request_url, | 29 const GURL& request_url, |
30 std::unique_ptr<SecurityInterstitialControllerClient> controller) | 30 std::unique_ptr<SecurityInterstitialControllerClient> controller) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 webui::SetLoadTimeDataDefaults( | 117 webui::SetLoadTimeDataDefaults( |
118 controller()->GetApplicationLocale(), &load_time_data); | 118 controller()->GetApplicationLocale(), &load_time_data); |
119 std::string html = ResourceBundle::GetSharedInstance() | 119 std::string html = ResourceBundle::GetSharedInstance() |
120 .GetRawDataResource(IDR_SECURITY_INTERSTITIAL_HTML) | 120 .GetRawDataResource(IDR_SECURITY_INTERSTITIAL_HTML) |
121 .as_string(); | 121 .as_string(); |
122 webui::AppendWebUiCssTextDefaults(&html); | 122 webui::AppendWebUiCssTextDefaults(&html); |
123 return webui::GetI18nTemplateHtml(html, &load_time_data); | 123 return webui::GetI18nTemplateHtml(html, &load_time_data); |
124 } | 124 } |
125 | 125 |
126 } // security_interstitials | 126 } // security_interstitials |
OLD | NEW |