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

Side by Side 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: remove build/gyp_chromium 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/shell/browser/cast_http_user_agent_settings.h" 5 #include "chromecast/shell/browser/cast_http_user_agent_settings.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chromecast/shell/common/cast_content_client.h" 8 #include "chromecast/shell/common/cast_content_client.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "grit/chromecast_settings.h"
10 #include "net/http/http_util.h" 11 #include "net/http/http_util.h"
12 #include "ui/base/l10n/l10n_util.h"
11 13
12 namespace chromecast { 14 namespace chromecast {
13 namespace shell { 15 namespace shell {
14 16
15 CastHttpUserAgentSettings::CastHttpUserAgentSettings() { 17 CastHttpUserAgentSettings::CastHttpUserAgentSettings() {
16 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 18 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
17 } 19 }
18 20
19 CastHttpUserAgentSettings::~CastHttpUserAgentSettings() { 21 CastHttpUserAgentSettings::~CastHttpUserAgentSettings() {
20 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 22 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
21 } 23 }
22 24
23 std::string CastHttpUserAgentSettings::GetAcceptLanguage() const { 25 std::string CastHttpUserAgentSettings::GetAcceptLanguage() const {
24 accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader("en-US"); 26 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
27 accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader(
byungchul 2014/08/14 20:34:11 why do you save the result while you don't use it?
gunsch 2014/08/15 00:04:27 Done.
28 l10n_util::GetStringUTF8(IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES));
25 return accept_language_; 29 return accept_language_;
26 } 30 }
27 31
28 std::string CastHttpUserAgentSettings::GetUserAgent() const { 32 std::string CastHttpUserAgentSettings::GetUserAgent() const {
29 return chromecast::shell::GetUserAgent(); 33 return chromecast::shell::GetUserAgent();
30 } 34 }
31 35
32 } // namespace shell 36 } // namespace shell
33 } // namespace chromecast 37 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698