OLD | NEW |
---|---|
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 Loading... | |
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 BrowserDistribution::ShortcutInfo GoogleChromeSxSDistribution::GetShortcutInfo( |
33 const string16& shortcut_name = | 33 ShortcutEnum shortcut_enum) { |
34 installer::GetLocalizedString(IDS_SXS_SHORTCUT_NAME_BASE); | 34 ShortcutInfo info; |
35 return shortcut_name; | 35 switch (shortcut_enum) { |
36 case SHORTCUT_CHROME: | |
37 info.name = GetBaseAppName(); | |
38 info.icon_index = kSxSIconIndex; | |
39 break; | |
40 case SHORTCUT_ALTERNATE_CHROME: | |
41 info.name = L"The Internet"; | |
42 info.icon_index = kSxSIconIndex; | |
43 break; | |
44 case SHORTCUT_APP_LAUNCHER: | |
45 // TODO(calamity): Replace with a localized string. | |
46 info.name = L"Chrome App Launcher"; | |
gab
2013/05/24 15:01:35
This should be "Canary" not "Google Chrome".
calamity
2013/05/31 00:11:18
Done.
| |
47 info.icon_index = 5; | |
48 break; | |
49 default: | |
50 NOTREACHED(); | |
51 return ShortcutInfo(); | |
52 } | |
53 return info; | |
36 } | 54 } |
37 | 55 |
38 string16 GoogleChromeSxSDistribution::GetBaseAppId() { | 56 string16 GoogleChromeSxSDistribution::GetBaseAppId() { |
39 return kBrowserAppId; | 57 return kBrowserAppId; |
40 } | 58 } |
41 | 59 |
42 string16 GoogleChromeSxSDistribution::GetInstallSubDir() { | 60 string16 GoogleChromeSxSDistribution::GetInstallSubDir() { |
43 return GoogleChromeDistribution::GetInstallSubDir().append( | 61 return GoogleChromeDistribution::GetInstallSubDir().append( |
44 installer::kSxSSuffix); | 62 installer::kSxSSuffix); |
45 } | 63 } |
46 | 64 |
47 string16 GoogleChromeSxSDistribution::GetUninstallRegPath() { | 65 string16 GoogleChromeSxSDistribution::GetUninstallRegPath() { |
48 return GoogleChromeDistribution::GetUninstallRegPath().append( | 66 return GoogleChromeDistribution::GetUninstallRegPath().append( |
49 installer::kSxSSuffix); | 67 installer::kSxSSuffix); |
50 } | 68 } |
51 | 69 |
52 bool GoogleChromeSxSDistribution::CanSetAsDefault() { | 70 bool GoogleChromeSxSDistribution::CanSetAsDefault() { |
53 return false; | 71 return false; |
54 } | 72 } |
55 | 73 |
56 int GoogleChromeSxSDistribution::GetIconIndex() { | |
57 return kSxSIconIndex; | |
58 } | |
59 | |
60 bool GoogleChromeSxSDistribution::GetChromeChannel(string16* channel) { | 74 bool GoogleChromeSxSDistribution::GetChromeChannel(string16* channel) { |
61 *channel = kChannelName; | 75 *channel = kChannelName; |
62 return true; | 76 return true; |
63 } | 77 } |
64 | 78 |
65 bool GoogleChromeSxSDistribution::GetCommandExecuteImplClsid( | 79 bool GoogleChromeSxSDistribution::GetCommandExecuteImplClsid( |
66 string16* handler_class_uuid) { | 80 string16* handler_class_uuid) { |
67 return false; | 81 return false; |
68 } | 82 } |
69 | 83 |
70 bool GoogleChromeSxSDistribution::AppHostIsSupported() { | 84 bool GoogleChromeSxSDistribution::AppHostIsSupported() { |
71 return false; | 85 return false; |
72 } | 86 } |
73 | 87 |
74 bool GoogleChromeSxSDistribution::ShouldSetExperimentLabels() { | 88 bool GoogleChromeSxSDistribution::ShouldSetExperimentLabels() { |
75 return true; | 89 return true; |
76 } | 90 } |
77 | 91 |
78 bool GoogleChromeSxSDistribution::HasUserExperiments() { | 92 bool GoogleChromeSxSDistribution::HasUserExperiments() { |
79 return true; | 93 return true; |
80 } | 94 } |
81 | 95 |
82 string16 GoogleChromeSxSDistribution::ChannelName() { | 96 string16 GoogleChromeSxSDistribution::ChannelName() { |
83 return kChannelName; | 97 return kChannelName; |
84 } | 98 } |
OLD | NEW |