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

Unified Diff: ui/base/webui/web_ui_util.cc

Issue 880313002: webui: add [lang] attribute to <html> element on all webui pages so (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cros 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 | « ui/base/webui/web_ui_util.h ('k') | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/webui/web_ui_util.cc
diff --git a/ui/base/webui/web_ui_util.cc b/ui/base/webui/web_ui_util.cc
index 06150ae6a16296be77bb8d8ac30e2cd3ef87cd65..98f0ca9887e88abfbd98d526faa1e2b7113c7f8f 100644
--- a/ui/base/webui/web_ui_util.cc
+++ b/ui/base/webui/web_ui_util.cc
@@ -131,9 +131,11 @@ void ParsePathAndScale(const GURL& url,
}
}
-void SetFontAndTextDirection(base::DictionaryValue* localized_strings) {
+void SetLoadTimeDataDefaults(const std::string& app_locale,
+ base::DictionaryValue* localized_strings) {
localized_strings->SetString("fontfamily", GetFontFamily());
localized_strings->SetString("fontsize", GetFontSize());
+ localized_strings->SetString("language", l10n_util::GetLanguage(app_locale));
localized_strings->SetString("textdirection", GetTextDirection());
}
« no previous file with comments | « ui/base/webui/web_ui_util.h ('k') | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698