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

Unified Diff: chrome/browser/extensions/api/hotword_private/hotword_private_api.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
Index: chrome/browser/extensions/api/hotword_private/hotword_private_api.cc
diff --git a/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc b/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc
index 8c2f9567efeac59b092d91673f0fb42c2c6c957e..2c37752ce7d2036b53845b96d79468f53fd9dfff 100644
--- a/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc
+++ b/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc
@@ -6,9 +6,9 @@
#include <string>
-#include "base/i18n/rtl.h"
#include "base/lazy_instance.h"
#include "base/prefs/pref_service.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/hotword_audio_history_handler.h"
#include "chrome/browser/search/hotword_client.h"
@@ -21,6 +21,7 @@
#include "content/public/browser/speech_recognition_session_preamble.h"
#include "extensions/browser/event_router.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/webui/web_ui_util.h"
namespace extensions {
@@ -389,8 +390,8 @@ bool HotwordPrivateGetLocalizedStringsFunction::RunSync() {
"finishedWait",
l10n_util::GetStringUTF16(IDS_HOTWORD_OPT_IN_FINISHED_WAIT));
- localized_strings->SetString("textdirection",
- base::i18n::IsRTL() ? "rtl" : "ltr");
+ const std::string& app_locale = g_browser_process->GetApplicationLocale();
+ webui::SetLoadTimeDataDefaults(app_locale, localized_strings);
SetResult(localized_strings);
return true;

Powered by Google App Engine
This is Rietveld 408576698