cast_http_user_agent_settings.cc revision 116680a4aac90f2aa7413d9095a592090648e557
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
12namespace chromecast {
13namespace shell {
14
15CastHttpUserAgentSettings::CastHttpUserAgentSettings() {
16  DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
17}
18
19CastHttpUserAgentSettings::~CastHttpUserAgentSettings() {
20  DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
21}
22
23std::string CastHttpUserAgentSettings::GetAcceptLanguage() const {
24  accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader("en-US");
25  return accept_language_;
26}
27
28std::string CastHttpUserAgentSettings::GetUserAgent() const {
29  return chromecast::shell::GetUserAgent();
30}
31
32}  // namespace shell
33}  // namespace chromecast
34