Chromium Code Reviews| 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 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 Loading... | |
| 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 string16 GoogleChromeDistribution::GetShortcutName(ShortcutEnum shortcut_enum) { |
| 129 const string16& app_shortcut_name = | 129 switch (shortcut_enum) { |
| 130 installer::GetLocalizedString(IDS_PRODUCT_NAME_BASE); | 130 case SHORTCUT_CHROME: |
| 131 return app_shortcut_name; | 131 return installer::GetLocalizedString(IDS_PRODUCT_NAME_BASE); |
| 132 } | 132 case SHORTCUT_ALTERNATE_CHROME: |
| 133 | 133 return installer::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE); |
| 134 string16 GoogleChromeDistribution::GetAlternateApplicationName() { | 134 case SHORTCUT_APP_LAUNCHER: |
| 135 const string16& alt_product_name = | 135 // TODO(calamity): Replace with a localized string. |
| 136 installer::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE); | 136 return L"Chrome App Launcher"; |
| 137 return alt_product_name; | 137 default: |
| 138 NOTREACHED(); | |
| 139 return string16(); | |
| 140 } | |
| 138 } | 141 } |
| 139 | 142 |
| 140 string16 GoogleChromeDistribution::GetBaseAppId() { | 143 string16 GoogleChromeDistribution::GetBaseAppId() { |
| 141 return kBrowserAppId; | 144 return kBrowserAppId; |
| 142 } | 145 } |
| 143 | 146 |
| 144 string16 GoogleChromeDistribution::GetInstallSubDir() { | 147 string16 GoogleChromeDistribution::GetInstallSubDir() { |
| 145 string16 sub_dir(installer::kGoogleChromeInstallSubDir1); | 148 string16 sub_dir(installer::kGoogleChromeInstallSubDir1); |
| 146 sub_dir.append(L"\\"); | 149 sub_dir.append(L"\\"); |
| 147 sub_dir.append(installer::kGoogleChromeInstallSubDir2); | 150 sub_dir.append(installer::kGoogleChromeInstallSubDir2); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 271 product_guid()); | 274 product_guid()); |
| 272 } | 275 } |
| 273 | 276 |
| 274 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { | 277 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { |
| 275 return true; | 278 return true; |
| 276 } | 279 } |
| 277 | 280 |
| 278 bool GoogleChromeDistribution::HasUserExperiments() { | 281 bool GoogleChromeDistribution::HasUserExperiments() { |
| 279 return true; | 282 return true; |
| 280 } | 283 } |
| 284 | |
| 285 int GoogleChromeDistribution::GetIconIndex(ShortcutEnum shortcut_enum) { | |
|
gab
2013/06/18 19:50:29
Please put this below GoogleChromeDistribution::Ge
calamity
2013/06/27 01:27:44
Done.
| |
| 286 switch (shortcut_enum) { | |
| 287 case SHORTCUT_CHROME: | |
| 288 case SHORTCUT_ALTERNATE_CHROME: | |
| 289 return 0; | |
| 290 case SHORTCUT_APP_LAUNCHER: | |
| 291 return 6; | |
| 292 default: | |
| 293 NOTREACHED(); | |
| 294 return 0; | |
| 295 } | |
| 296 } | |
| OLD | NEW |