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 "chrome/browser/interstitials/security_interstitial_page.h" | 5 #include "chrome/browser/interstitials/security_interstitial_page.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/grit/browser_resources.h" | 10 #include "chrome/grit/browser_resources.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 base::string16 SecurityInterstitialPage::GetFormattedHostName() const { | 56 base::string16 SecurityInterstitialPage::GetFormattedHostName() const { |
57 base::string16 host(base::UTF8ToUTF16(request_url_.host())); | 57 base::string16 host(base::UTF8ToUTF16(request_url_.host())); |
58 if (base::i18n::IsRTL()) | 58 if (base::i18n::IsRTL()) |
59 base::i18n::WrapStringWithLTRFormatting(&host); | 59 base::i18n::WrapStringWithLTRFormatting(&host); |
60 return host; | 60 return host; |
61 } | 61 } |
62 | 62 |
63 std::string SecurityInterstitialPage::GetHTMLContents() { | 63 std::string SecurityInterstitialPage::GetHTMLContents() { |
64 base::DictionaryValue load_time_data; | 64 base::DictionaryValue load_time_data; |
65 PopulateInterstitialStrings(&load_time_data); | 65 PopulateInterstitialStrings(&load_time_data); |
66 webui::SetFontAndTextDirection(&load_time_data); | 66 std::string html = ResourceBundle::GetSharedInstance() |
67 base::StringPiece html( | 67 .GetRawDataResource(IDR_SECURITY_INTERSTITIAL_HTML) |
68 ResourceBundle::GetSharedInstance().GetRawDataResource( | 68 .as_string(); |
69 IDR_SECURITY_INTERSTITIAL_HTML)); | 69 webui::AppendWebUICSSTextDefaults(&html); |
70 return webui::GetI18nTemplateHtml(html, &load_time_data); | 70 return webui::GetI18nTemplateHtml(html, &load_time_data); |
71 } | 71 } |
OLD | NEW |