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

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

Issue 467043002: Adds locale strings to Chromecast build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 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 | « chromecast/shell/app/cast_main_delegate.cc ('k') | chromecast/shell/browser/resources/resource_ids » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 32957a6247d0b7ae38153ee77c6596cf0edf90d1..fbc43b3916f2dced26ce42a37b68949e9fdffa86 100644
--- a/chromecast/shell/browser/cast_http_user_agent_settings.cc
+++ b/chromecast/shell/browser/cast_http_user_agent_settings.cc
@@ -7,7 +7,9 @@
#include "base/logging.h"
#include "chromecast/shell/common/cast_content_client.h"
#include "content/public/browser/browser_thread.h"
+#include "grit/chromecast_settings.h"
#include "net/http/http_util.h"
+#include "ui/base/l10n/l10n_util.h"
namespace chromecast {
namespace shell {
@@ -21,7 +23,11 @@ CastHttpUserAgentSettings::~CastHttpUserAgentSettings() {
}
std::string CastHttpUserAgentSettings::GetAcceptLanguage() const {
- accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader("en-US");
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+ if (accept_language_.empty()) {
+ accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader(
+ l10n_util::GetStringUTF8(IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES));
+ }
return accept_language_;
}
« no previous file with comments | « chromecast/shell/app/cast_main_delegate.cc ('k') | chromecast/shell/browser/resources/resource_ids » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698