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

Unified Diff: content/browser/webui/shared_resources_data_source.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: revert stuff 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_interstitial.cc ('k') | ui/base/webui/web_ui_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/shared_resources_data_source.cc
diff --git a/content/browser/webui/shared_resources_data_source.cc b/content/browser/webui/shared_resources_data_source.cc
index 66fe0f1eae17568154ea4a68f3f8253213b366a8..e11c6b12bd4d16a2dda24bb52f253e9e95448a25 100644
--- a/content/browser/webui/shared_resources_data_source.cc
+++ b/content/browser/webui/shared_resources_data_source.cc
@@ -85,17 +85,8 @@ void SharedResourcesDataSource::StartDataRequest(
scoped_refptr<base::RefCountedMemory> bytes;
if (idr == IDR_WEBUI_CSS_TEXT_DEFAULTS) {
- std::vector<std::string> placeholders;
- placeholders.push_back(webui::GetTextDirection()); // $1
- placeholders.push_back(webui::GetFontFamily()); // $2
- placeholders.push_back(webui::GetFontSize()); // $3
-
- ContentClient* content_client = GetContentClient();
- const std::string& chrome_shared =
- content_client->GetDataResource(idr, ui::SCALE_FACTOR_NONE).as_string();
- std::string replaced =
- ReplaceStringPlaceholders(chrome_shared, placeholders, nullptr);
- bytes = base::RefCountedString::TakeString(&replaced);
+ std::string css = webui::GetWebUiCssTextDefaults();
+ bytes = base::RefCountedString::TakeString(&css);
} else {
bytes = GetContentClient()->GetDataResourceBytes(idr);
}
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_interstitial.cc ('k') | ui/base/webui/web_ui_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698