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

Side by Side Diff: chromecast/shell/common/cast_content_client.cc

Issue 604933002: Chromecast: adds Chromecast build # to User-Agent string. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chromecast/common/version.h.in ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/cast_content_client.h" 5 #include "chromecast/shell/common/cast_content_client.h"
6 6
7 #include "chromecast/common/version.h" 7 #include "chromecast/common/version.h"
8 #include "content/public/common/user_agent.h" 8 #include "content/public/common/user_agent.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 11
12 namespace chromecast { 12 namespace chromecast {
13 namespace shell { 13 namespace shell {
14 14
15 std::string GetUserAgent() { 15 std::string GetUserAgent() {
16 std::string product = "Chrome/" PRODUCT_VERSION; 16 std::string product = "Chrome/" PRODUCT_VERSION;
17 return content::BuildUserAgentFromProduct(product) + " CrKey"; 17 return content::BuildUserAgentFromProduct(product) +
18 " CrKey" CAST_BUILD_REVISION;
18 } 19 }
19 20
20 CastContentClient::~CastContentClient() { 21 CastContentClient::~CastContentClient() {
21 } 22 }
22 23
23 std::string CastContentClient::GetUserAgent() const { 24 std::string CastContentClient::GetUserAgent() const {
24 return chromecast::shell::GetUserAgent(); 25 return chromecast::shell::GetUserAgent();
25 } 26 }
26 27
27 base::string16 CastContentClient::GetLocalizedString(int message_id) const { 28 base::string16 CastContentClient::GetLocalizedString(int message_id) const {
(...skipping 13 matching lines...) Expand all
41 resource_id); 42 resource_id);
42 } 43 }
43 44
44 gfx::Image& CastContentClient::GetNativeImageNamed(int resource_id) const { 45 gfx::Image& CastContentClient::GetNativeImageNamed(int resource_id) const {
45 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( 46 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
46 resource_id); 47 resource_id);
47 } 48 }
48 49
49 } // namespace shell 50 } // namespace shell
50 } // namespace chromecast 51 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/common/version.h.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698