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

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

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 5 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 a class that contains various method related to branding. 5 // This file defines a class that contains various method related to branding.
6 // It provides only default implementations of these methods. Usually to add 6 // It provides only default implementations of these methods. Usually to add
7 // specific branding, we will need to extend this class with a custom 7 // specific branding, we will need to extend this class with a custom
8 // implementation. 8 // implementation.
9 9
10 #include "chrome/installer/util/browser_distribution.h" 10 #include "chrome/installer/util/browser_distribution.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 string16 BrowserDistribution::GetAppGuid() { 149 string16 BrowserDistribution::GetAppGuid() {
150 return L""; 150 return L"";
151 } 151 }
152 152
153 string16 BrowserDistribution::GetBaseAppName() { 153 string16 BrowserDistribution::GetBaseAppName() {
154 return L"Chromium"; 154 return L"Chromium";
155 } 155 }
156 156
157 string16 BrowserDistribution::GetAppShortCutName() { 157 string16 BrowserDistribution::GetDisplayName() {
158 return GetBaseAppName(); 158 return GetShortcutName(SHORTCUT_CHROME);
159 } 159 }
160 160
161 string16 BrowserDistribution::GetAlternateApplicationName() { 161 string16 BrowserDistribution::GetShortcutName(ShortcutEnum shortcut_enum) {
162 return L"The Internet"; 162 switch (shortcut_enum) {
163 case SHORTCUT_CHROME:
164 return GetBaseAppName();
165 case SHORTCUT_ALTERNATE_CHROME:
166 return L"The Internet";
167 case SHORTCUT_APP_LAUNCHER:
168 return L"Chromium App Launcher";
169 default:
170 NOTREACHED();
171 return string16();
172 }
173 }
174
175 string16 BrowserDistribution::GetStartMenuShortcutSubfolder(
176 SubfolderEnum subfolder_enum) {
177 switch (subfolder_enum) {
178 case SUBFOLDER_CHROME:
179 return GetShortcutName(SHORTCUT_CHROME);
180 default:
181 NOTREACHED();
182 return string16();
183 }
163 } 184 }
164 185
165 string16 BrowserDistribution::GetBaseAppId() { 186 string16 BrowserDistribution::GetBaseAppId() {
166 return L"Chromium"; 187 return L"Chromium";
167 } 188 }
168 189
169 string16 BrowserDistribution::GetInstallSubDir() { 190 string16 BrowserDistribution::GetInstallSubDir() {
170 return L"Chromium"; 191 return L"Chromium";
171 } 192 }
172 193
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 246 }
226 247
227 bool BrowserDistribution::CanCreateDesktopShortcuts() { 248 bool BrowserDistribution::CanCreateDesktopShortcuts() {
228 return true; 249 return true;
229 } 250 }
230 251
231 string16 BrowserDistribution::GetIconFilename() { 252 string16 BrowserDistribution::GetIconFilename() {
232 return string16(); 253 return string16();
233 } 254 }
234 255
235 int BrowserDistribution::GetIconIndex() { 256 int BrowserDistribution::GetIconIndex(ShortcutEnum shortcut_enum) {
236 // Assuming that main icon appears first alphabetically in the resource file 257 switch (shortcut_enum) {
237 // for GetIconFilename(). 258 case SHORTCUT_CHROME:
238 return 0; 259 case SHORTCUT_ALTERNATE_CHROME:
260 // Assuming that main icon appears first alphabetically in the resource
261 // file for GetIconFilename().
262 return 0;
263 case SHORTCUT_APP_LAUNCHER:
264 return 1;
265 default:
266 NOTREACHED();
267 return 0;
268 }
239 } 269 }
240 270
241 bool BrowserDistribution::GetChromeChannel(string16* channel) { 271 bool BrowserDistribution::GetChromeChannel(string16* channel) {
242 return false; 272 return false;
243 } 273 }
244 274
245 bool BrowserDistribution::GetCommandExecuteImplClsid( 275 bool BrowserDistribution::GetCommandExecuteImplClsid(
246 string16* handler_class_uuid) { 276 string16* handler_class_uuid) {
247 if (handler_class_uuid) 277 if (handler_class_uuid)
248 *handler_class_uuid = kCommandExecuteImplUuid; 278 *handler_class_uuid = kCommandExecuteImplUuid;
249 return true; 279 return true;
250 } 280 }
251 281
252 bool BrowserDistribution::AppHostIsSupported() { 282 bool BrowserDistribution::AppHostIsSupported() {
253 return false; 283 return false;
254 } 284 }
255 285
256 void BrowserDistribution::UpdateInstallStatus(bool system_install, 286 void BrowserDistribution::UpdateInstallStatus(bool system_install,
257 installer::ArchiveType archive_type, 287 installer::ArchiveType archive_type,
258 installer::InstallStatus install_status) { 288 installer::InstallStatus install_status) {
259 } 289 }
260 290
261 bool BrowserDistribution::ShouldSetExperimentLabels() { 291 bool BrowserDistribution::ShouldSetExperimentLabels() {
262 return false; 292 return false;
263 } 293 }
264 294
265 bool BrowserDistribution::HasUserExperiments() { 295 bool BrowserDistribution::HasUserExperiments() {
266 return false; 296 return false;
267 } 297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698