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

Unified Diff: chromecast/shell/browser/cast_http_user_agent_settings.cc

Issue 490603002: Chromecast: initial checkin of Android-based cast shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added android DEPS (git cl presubmit doesn't check Java DEPS?) Created 6 years, 3 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: chromecast/shell/browser/cast_http_user_agent_settings.cc
diff --git a/chromecast/shell/browser/cast_http_user_agent_settings.cc b/chromecast/shell/browser/cast_http_user_agent_settings.cc
index fbc43b3916f2dced26ce42a37b68949e9fdffa86..e4a1537d776eec4e01c3b5a543e0830142ff5650 100644
--- a/chromecast/shell/browser/cast_http_user_agent_settings.cc
+++ b/chromecast/shell/browser/cast_http_user_agent_settings.cc
@@ -11,6 +11,10 @@
#include "net/http/http_util.h"
#include "ui/base/l10n/l10n_util.h"
+#if defined(OS_ANDROID)
+#include "ui/base/l10n/l10n_util_android.h"
+#endif // defined(OS_ANDROID)
+
namespace chromecast {
namespace shell {
@@ -26,7 +30,12 @@ std::string CastHttpUserAgentSettings::GetAcceptLanguage() const {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
if (accept_language_.empty()) {
accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader(
- l10n_util::GetStringUTF8(IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES));
+#if defined(OS_ANDROID)
+ l10n_util::GetDefaultLocale()
+#else
+ l10n_util::GetStringUTF8(IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES)
+#endif // defined(OS_ANDROID)
+ );
}
return accept_language_;
}
« no previous file with comments | « chromecast/shell/browser/cast_content_browser_client.cc ('k') | chromecast/shell/browser/url_request_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698