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

Side by Side Diff: chromecast/shell/browser/cast_http_user_agent_settings.cc

Issue 223143003: Initial checkin of chromecast content embedder (cast_shell) and related build scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add two missing files I forgot to add in the previous patch set. Created 6 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chromecast/shell/browser/cast_http_user_agent_settings.h"
6
7 #include "base/logging.h"
8 #include "chromecast/shell/common/cast_content_client.h"
9 #include "content/public/browser/browser_thread.h"
10 #include "net/http/http_util.h"
11 #include "ui/base/l10n/l10n_util.h"
12
13 namespace chromecast {
14 namespace shell {
15
16 CastHttpUserAgentSettings::CastHttpUserAgentSettings() {
17 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
18 }
19
20 CastHttpUserAgentSettings::~CastHttpUserAgentSettings() {
21 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
22 }
23
24 std::string CastHttpUserAgentSettings::GetAcceptLanguage() const {
25 accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader("en-US");
26 return accept_language_;
27 }
28
29 std::string CastHttpUserAgentSettings::GetUserAgent() const {
30 // This is needed to insure we send a good user for UMA uploads.
31 return chromecast::shell::GetUserAgent();
32 }
33
34 } // namespace shell
35 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698