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

Side by Side Diff: chrome/browser/interstitials/security_interstitial_page.cc

Issue 830743003: Directly inline shared WebUI CSS declarations into the security and supervised user interstitials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 11 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 "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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698