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

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

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 6 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 implementation of GoogleChromeSxSDistribution. 5 // This file defines implementation of GoogleChromeSxSDistribution.
6 6
7 #include "chrome/installer/util/google_chrome_sxs_distribution.h" 7 #include "chrome/installer/util/google_chrome_sxs_distribution.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 11 matching lines...) Expand all
22 22
23 GoogleChromeSxSDistribution::GoogleChromeSxSDistribution() 23 GoogleChromeSxSDistribution::GoogleChromeSxSDistribution()
24 : GoogleChromeDistribution() { 24 : GoogleChromeDistribution() {
25 GoogleChromeDistribution::set_product_guid(kChromeSxSGuid); 25 GoogleChromeDistribution::set_product_guid(kChromeSxSGuid);
26 } 26 }
27 27
28 string16 GoogleChromeSxSDistribution::GetBaseAppName() { 28 string16 GoogleChromeSxSDistribution::GetBaseAppName() {
29 return L"Google Chrome Canary"; 29 return L"Google Chrome Canary";
30 } 30 }
31 31
32 string16 GoogleChromeSxSDistribution::GetAppShortCutName() { 32 string16 GoogleChromeSxSDistribution::GetShortcutName(
33 const string16& shortcut_name = 33 ShortcutEnum shortcut_enum) {
34 installer::GetLocalizedString(IDS_SXS_SHORTCUT_NAME_BASE); 34 switch (shortcut_enum) {
35 return shortcut_name; 35 case SHORTCUT_CHROME:
36 return GetBaseAppName();
gab 2013/06/18 19:50:29 Should be installer::GetLocalizedString(IDS_SXS_S
calamity 2013/06/27 01:27:44 Done.
37 case SHORTCUT_ALTERNATE_CHROME:
38 return L"The Internet";
gab 2013/06/18 19:50:29 Make this a constant now that it is used in multip
calamity 2013/06/27 01:27:44 Where should I put it?
gab 2013/06/27 11:49:43 Good question. There is already a localized string
calamity 2013/07/05 09:00:29 IDS_OEM_MAIN_SHORTCUT_NAME_BASE is "Internet Brows
39 case SHORTCUT_APP_LAUNCHER:
40 return L"Chrome App Launcher Canary";
gab 2013/06/18 19:50:29 Add TODO here to localize this as in google_chrome
calamity 2013/06/27 01:27:44 Done.
41 default:
42 NOTREACHED();
43 return string16();
44 }
36 } 45 }
37 46
38 string16 GoogleChromeSxSDistribution::GetBaseAppId() { 47 string16 GoogleChromeSxSDistribution::GetBaseAppId() {
39 return kBrowserAppId; 48 return kBrowserAppId;
40 } 49 }
41 50
42 string16 GoogleChromeSxSDistribution::GetInstallSubDir() { 51 string16 GoogleChromeSxSDistribution::GetInstallSubDir() {
43 return GoogleChromeDistribution::GetInstallSubDir().append( 52 return GoogleChromeDistribution::GetInstallSubDir().append(
44 installer::kSxSSuffix); 53 installer::kSxSSuffix);
45 } 54 }
46 55
47 string16 GoogleChromeSxSDistribution::GetUninstallRegPath() { 56 string16 GoogleChromeSxSDistribution::GetUninstallRegPath() {
48 return GoogleChromeDistribution::GetUninstallRegPath().append( 57 return GoogleChromeDistribution::GetUninstallRegPath().append(
49 installer::kSxSSuffix); 58 installer::kSxSSuffix);
50 } 59 }
51 60
52 bool GoogleChromeSxSDistribution::CanSetAsDefault() { 61 bool GoogleChromeSxSDistribution::CanSetAsDefault() {
53 return false; 62 return false;
54 } 63 }
55 64
56 int GoogleChromeSxSDistribution::GetIconIndex() { 65 int GoogleChromeSxSDistribution::GetIconIndex(ShortcutEnum shortcut_enum) {
57 return kSxSIconIndex; 66 switch (shortcut_enum) {
67 case SHORTCUT_CHROME:
68 case SHORTCUT_ALTERNATE_CHROME:
69 return kSxSIconIndex;
70 case SHORTCUT_APP_LAUNCHER:
71 return 5;
72 default:
73 NOTREACHED();
74 return 0;
75 }
58 } 76 }
59 77
60 bool GoogleChromeSxSDistribution::GetChromeChannel(string16* channel) { 78 bool GoogleChromeSxSDistribution::GetChromeChannel(string16* channel) {
61 *channel = kChannelName; 79 *channel = kChannelName;
62 return true; 80 return true;
63 } 81 }
64 82
65 bool GoogleChromeSxSDistribution::GetCommandExecuteImplClsid( 83 bool GoogleChromeSxSDistribution::GetCommandExecuteImplClsid(
66 string16* handler_class_uuid) { 84 string16* handler_class_uuid) {
67 return false; 85 return false;
68 } 86 }
69 87
70 bool GoogleChromeSxSDistribution::AppHostIsSupported() { 88 bool GoogleChromeSxSDistribution::AppHostIsSupported() {
71 return false; 89 return false;
72 } 90 }
73 91
74 bool GoogleChromeSxSDistribution::ShouldSetExperimentLabels() { 92 bool GoogleChromeSxSDistribution::ShouldSetExperimentLabels() {
75 return true; 93 return true;
76 } 94 }
77 95
78 bool GoogleChromeSxSDistribution::HasUserExperiments() { 96 bool GoogleChromeSxSDistribution::HasUserExperiments() {
79 return true; 97 return true;
80 } 98 }
81 99
82 string16 GoogleChromeSxSDistribution::ChannelName() { 100 string16 GoogleChromeSxSDistribution::ChannelName() {
83 return kChannelName; 101 return kChannelName;
84 } 102 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698