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_; |
} |