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: blimp/engine/common/blimp_content_client.cc

Issue 1535563002: [Blimp Net] Update engine version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « blimp/engine/common/BUILD.gn ('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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "blimp/engine/common/blimp_content_client.h" 5 #include "blimp/engine/common/blimp_content_client.h"
6 6
7 #include "components/version_info/version_info.h"
7 #include "content/public/common/user_agent.h" 8 #include "content/public/common/user_agent.h"
8 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
9 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
10 11
11 namespace blimp { 12 namespace blimp {
12 namespace engine { 13 namespace engine {
13 14
14 // TODO(haibinlu) Generate proper version. See crbug/537367.
15 const char kProduct[] = "Chrome/20.77.33.5";
16
17 std::string GetBlimpEngineUserAgent() { 15 std::string GetBlimpEngineUserAgent() {
Wez 2015/12/17 02:01:31 Do we need this as a static? Can't we just fold it
haibinlu 2015/12/17 02:28:55 it is also in blimp_url_request_context_getter.cc
18 return content::BuildUserAgentFromProduct(kProduct); 16 return content::BuildUserAgentFromProduct(
17 version_info::GetProductNameAndVersionForUserAgent() + " Mobile");
19 } 18 }
20 19
21 BlimpContentClient::~BlimpContentClient() {} 20 BlimpContentClient::~BlimpContentClient() {}
22 21
23 std::string BlimpContentClient::GetUserAgent() const { 22 std::string BlimpContentClient::GetUserAgent() const {
24 return GetBlimpEngineUserAgent(); 23 return GetBlimpEngineUserAgent();
25 } 24 }
26 25
27 base::string16 BlimpContentClient::GetLocalizedString(int message_id) const { 26 base::string16 BlimpContentClient::GetLocalizedString(int message_id) const {
28 return l10n_util::GetStringUTF16(message_id); 27 return l10n_util::GetStringUTF16(message_id);
(...skipping 12 matching lines...) Expand all
41 resource_id); 40 resource_id);
42 } 41 }
43 42
44 gfx::Image& BlimpContentClient::GetNativeImageNamed(int resource_id) const { 43 gfx::Image& BlimpContentClient::GetNativeImageNamed(int resource_id) const {
45 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( 44 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
46 resource_id); 45 resource_id);
47 } 46 }
48 47
49 } // namespace engine 48 } // namespace engine
50 } // namespace blimp 49 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/common/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698