| 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 case SHORTCUT_ALTERNATE_CHROME: |
| 133 return installer::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE); |
| 134 case SHORTCUT_APP_LAUNCHER: |
| 135 // TODO(calamity): Replace with a localized string. |
| 136 return L"Chrome App Launcher"; |
| 137 default: |
| 138 NOTREACHED(); |
| 139 return string16(); |
| 140 } |
| 132 } | 141 } |
| 133 | 142 |
| 134 string16 GoogleChromeDistribution::GetAlternateApplicationName() { | 143 int GoogleChromeDistribution::GetIconIndex(ShortcutEnum shortcut_enum) { |
| 135 const string16& alt_product_name = | 144 switch (shortcut_enum) { |
| 136 installer::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE); | 145 case SHORTCUT_CHROME: |
| 137 return alt_product_name; | 146 case SHORTCUT_ALTERNATE_CHROME: |
| 147 return 0; |
| 148 case SHORTCUT_APP_LAUNCHER: |
| 149 return 6; |
| 150 default: |
| 151 NOTREACHED(); |
| 152 return 0; |
| 153 } |
| 138 } | 154 } |
| 139 | 155 |
| 140 string16 GoogleChromeDistribution::GetBaseAppId() { | 156 string16 GoogleChromeDistribution::GetBaseAppId() { |
| 141 return kBrowserAppId; | 157 return kBrowserAppId; |
| 142 } | 158 } |
| 143 | 159 |
| 144 string16 GoogleChromeDistribution::GetInstallSubDir() { | 160 string16 GoogleChromeDistribution::GetInstallSubDir() { |
| 145 string16 sub_dir(installer::kGoogleChromeInstallSubDir1); | 161 string16 sub_dir(installer::kGoogleChromeInstallSubDir1); |
| 146 sub_dir.append(L"\\"); | 162 sub_dir.append(L"\\"); |
| 147 sub_dir.append(installer::kGoogleChromeInstallSubDir2); | 163 sub_dir.append(installer::kGoogleChromeInstallSubDir2); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 product_guid()); | 287 product_guid()); |
| 272 } | 288 } |
| 273 | 289 |
| 274 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { | 290 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { |
| 275 return true; | 291 return true; |
| 276 } | 292 } |
| 277 | 293 |
| 278 bool GoogleChromeDistribution::HasUserExperiments() { | 294 bool GoogleChromeDistribution::HasUserExperiments() { |
| 279 return true; | 295 return true; |
| 280 } | 296 } |
| OLD | NEW |