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

Side by Side Diff: chrome/installer/util/google_chrome_distribution.cc

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 7 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // This file defines specific implementation of BrowserDistribution class for 5 // This file defines specific implementation of BrowserDistribution class for
6 // Google Chrome. 6 // Google Chrome.
7 7
8 #include "chrome/installer/util/google_chrome_distribution.h" 8 #include "chrome/installer/util/google_chrome_distribution.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return product_guid(); 118 return product_guid();
119 } 119 }
120 120
121 string16 GoogleChromeDistribution::GetBaseAppName() { 121 string16 GoogleChromeDistribution::GetBaseAppName() {
122 // I'd really like to return L ## PRODUCT_FULLNAME_STRING; but that's no good 122 // I'd really like to return L ## PRODUCT_FULLNAME_STRING; but that's no good
123 // since it'd be "Chromium" in a non-Chrome build, which isn't at all what I 123 // since it'd be "Chromium" in a non-Chrome build, which isn't at all what I
124 // want. Sigh. 124 // want. Sigh.
125 return L"Google Chrome"; 125 return L"Google Chrome";
126 } 126 }
127 127
128 string16 GoogleChromeDistribution::GetAppShortCutName() { 128 BrowserDistribution::ShortcutInfo GoogleChromeDistribution::GetShortcutInfo(
129 const string16& app_shortcut_name = 129 ShortcutEnum shortcut_enum) {
130 installer::GetLocalizedString(IDS_PRODUCT_NAME_BASE); 130 ShortcutInfo info;
131 return app_shortcut_name; 131 info.icon_file = installer::kChromeExe;
132 } 132 switch (shortcut_enum) {
133 133 case SHORTCUT_CHROME:
134 string16 GoogleChromeDistribution::GetAlternateApplicationName() { 134 case SHORTCUT_ALTERNATE_CHROME:
135 const string16& alt_product_name = 135 info.name = installer::GetLocalizedString(IDS_PRODUCT_NAME_BASE);
136 installer::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE); 136 info.icon_index = 0;
137 return alt_product_name; 137 break;
138 case SHORTCUT_APP_LAUNCHER:
139 // TODO(calamity): Replace with a localized string.
140 info.name = L"Chrome App Launcher Canary";
gab 2013/05/24 15:01:35 This should be Google Chrome, not Canary.
calamity 2013/05/31 00:11:18 Done.
141 info.icon_index = 6;
142 break;
143 default:
144 NOTREACHED();
145 return ShortcutInfo();
146 }
147 return info;
138 } 148 }
139 149
140 string16 GoogleChromeDistribution::GetBaseAppId() { 150 string16 GoogleChromeDistribution::GetBaseAppId() {
141 return kBrowserAppId; 151 return kBrowserAppId;
142 } 152 }
143 153
144 string16 GoogleChromeDistribution::GetInstallSubDir() { 154 string16 GoogleChromeDistribution::GetInstallSubDir() {
145 string16 sub_dir(installer::kGoogleChromeInstallSubDir1); 155 string16 sub_dir(installer::kGoogleChromeInstallSubDir1);
146 sub_dir.append(L"\\"); 156 sub_dir.append(L"\\");
147 sub_dir.append(installer::kGoogleChromeInstallSubDir2); 157 sub_dir.append(installer::kGoogleChromeInstallSubDir2);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 L"Google Chrome"; 243 L"Google Chrome";
234 } 244 }
235 245
236 string16 GoogleChromeDistribution::GetVersionKey() { 246 string16 GoogleChromeDistribution::GetVersionKey() {
237 string16 key(google_update::kRegPathClients); 247 string16 key(google_update::kRegPathClients);
238 key.append(L"\\"); 248 key.append(L"\\");
239 key.append(product_guid()); 249 key.append(product_guid());
240 return key; 250 return key;
241 } 251 }
242 252
243 string16 GoogleChromeDistribution::GetIconFilename() {
244 return installer::kChromeExe;
245 }
246
247 bool GoogleChromeDistribution::GetCommandExecuteImplClsid( 253 bool GoogleChromeDistribution::GetCommandExecuteImplClsid(
248 string16* handler_class_uuid) { 254 string16* handler_class_uuid) {
249 if (handler_class_uuid) 255 if (handler_class_uuid)
250 *handler_class_uuid = kCommandExecuteImplUuid; 256 *handler_class_uuid = kCommandExecuteImplUuid;
251 return true; 257 return true;
252 } 258 }
253 259
254 bool GoogleChromeDistribution::AppHostIsSupported() { 260 bool GoogleChromeDistribution::AppHostIsSupported() {
255 return true; 261 return true;
256 } 262 }
(...skipping 14 matching lines...) Expand all
271 product_guid()); 277 product_guid());
272 } 278 }
273 279
274 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { 280 bool GoogleChromeDistribution::ShouldSetExperimentLabels() {
275 return true; 281 return true;
276 } 282 }
277 283
278 bool GoogleChromeDistribution::HasUserExperiments() { 284 bool GoogleChromeDistribution::HasUserExperiments() {
279 return true; 285 return true;
280 } 286 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698