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

Side by Side Diff: chrome/common/chrome_content_client_ios.mm

Issue 634583003: Simplify VersionInfo code, avoid hitting sandbox IPC constantly on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: linux include 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 | « chrome/common/chrome_content_client.cc ('k') | chrome/common/chrome_version_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "chrome/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "chrome/common/chrome_version_info.h" 9 #include "chrome/common/chrome_version_info.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 20 matching lines...) Expand all
31 31
32 void ChromeContentClient::AddAdditionalSchemes( 32 void ChromeContentClient::AddAdditionalSchemes(
33 std::vector<std::string>* standard_schemes, 33 std::vector<std::string>* standard_schemes,
34 std::vector<std::string>* saveable_shemes) { 34 std::vector<std::string>* saveable_shemes) {
35 // No additional schemes for iOS. 35 // No additional schemes for iOS.
36 } 36 }
37 37
38 std::string ChromeContentClient::GetProduct() const { 38 std::string ChromeContentClient::GetProduct() const {
39 chrome::VersionInfo version_info; 39 chrome::VersionInfo version_info;
40 std::string product("CriOS/"); 40 std::string product("CriOS/");
41 product += version_info.is_valid() ? version_info.Version() : "0.0.0.0"; 41 product += version_info.Version();
42 return product; 42 return product;
43 } 43 }
44 44
45 std::string ChromeContentClient::GetUserAgent() const { 45 std::string ChromeContentClient::GetUserAgent() const {
46 std::string product = GetProduct(); 46 std::string product = GetProduct();
47 return content::BuildUserAgentFromProduct(product); 47 return content::BuildUserAgentFromProduct(product);
48 } 48 }
49 49
50 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { 50 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const {
51 return l10n_util::GetStringUTF16(message_id); 51 return l10n_util::GetStringUTF16(message_id);
(...skipping 12 matching lines...) Expand all
64 } 64 }
65 65
66 gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const { 66 gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const {
67 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); 67 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
68 } 68 }
69 69
70 std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) { 70 std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) {
71 DCHECK(false) << "Unknown child process type!"; 71 DCHECK(false) << "Unknown child process type!";
72 return "Unknown"; 72 return "Unknown";
73 } 73 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_content_client.cc ('k') | chrome/common/chrome_version_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698