| 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 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 base::string16 BrowserDistribution::GetActiveSetupGuid() { | 151 base::string16 BrowserDistribution::GetActiveSetupGuid() { |
| 152 return kChromiumActiveSetupGuid; | 152 return kChromiumActiveSetupGuid; |
| 153 } | 153 } |
| 154 | 154 |
| 155 base::string16 BrowserDistribution::GetBaseAppName() { | 155 base::string16 BrowserDistribution::GetBaseAppName() { |
| 156 return L"Chromium"; | 156 return L"Chromium"; |
| 157 } | 157 } |
| 158 | 158 |
| 159 base::string16 BrowserDistribution::GetDisplayName() { | 159 base::string16 BrowserDistribution::GetDisplayName() { |
| 160 return GetShortcutName(SHORTCUT_CHROME); | 160 return GetShortcutName(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 base::string16 BrowserDistribution::GetShortcutName( | 163 base::string16 BrowserDistribution::GetShortcutName() { |
| 164 ShortcutType shortcut_type) { | 164 return GetBaseAppName(); |
| 165 switch (shortcut_type) { | |
| 166 case SHORTCUT_APP_LAUNCHER: | |
| 167 return installer::GetLocalizedString(IDS_APP_LIST_SHORTCUT_NAME_BASE); | |
| 168 default: | |
| 169 DCHECK_EQ(SHORTCUT_CHROME, shortcut_type); | |
| 170 return GetBaseAppName(); | |
| 171 } | |
| 172 } | 165 } |
| 173 | 166 |
| 174 int BrowserDistribution::GetIconIndex(ShortcutType shortcut_type) { | 167 int BrowserDistribution::GetIconIndex() { |
| 175 if (shortcut_type == SHORTCUT_APP_LAUNCHER) | |
| 176 return icon_resources::kAppLauncherIndex; | |
| 177 DCHECK_EQ(SHORTCUT_CHROME, shortcut_type); | |
| 178 return icon_resources::kApplicationIndex; | 168 return icon_resources::kApplicationIndex; |
| 179 } | 169 } |
| 180 | 170 |
| 181 base::string16 BrowserDistribution::GetIconFilename() { | 171 base::string16 BrowserDistribution::GetIconFilename() { |
| 182 return installer::kChromeExe; | 172 return installer::kChromeExe; |
| 183 } | 173 } |
| 184 | 174 |
| 185 base::string16 BrowserDistribution::GetStartMenuShortcutSubfolder( | 175 base::string16 BrowserDistribution::GetStartMenuShortcutSubfolder( |
| 186 Subfolder subfolder_type) { | 176 Subfolder subfolder_type) { |
| 187 switch (subfolder_type) { | 177 switch (subfolder_type) { |
| 188 case SUBFOLDER_APPS: | 178 case SUBFOLDER_APPS: |
| 189 return installer::GetLocalizedString(IDS_APP_SHORTCUTS_SUBDIR_NAME_BASE); | 179 return installer::GetLocalizedString(IDS_APP_SHORTCUTS_SUBDIR_NAME_BASE); |
| 190 default: | 180 default: |
| 191 DCHECK_EQ(SUBFOLDER_CHROME, subfolder_type); | 181 DCHECK_EQ(SUBFOLDER_CHROME, subfolder_type); |
| 192 return GetShortcutName(SHORTCUT_CHROME); | 182 return GetShortcutName(); |
| 193 } | 183 } |
| 194 } | 184 } |
| 195 | 185 |
| 196 base::string16 BrowserDistribution::GetBaseAppId() { | 186 base::string16 BrowserDistribution::GetBaseAppId() { |
| 197 return L"Chromium"; | 187 return L"Chromium"; |
| 198 } | 188 } |
| 199 | 189 |
| 200 base::string16 BrowserDistribution::GetBrowserProgIdPrefix() { | 190 base::string16 BrowserDistribution::GetBrowserProgIdPrefix() { |
| 201 // This used to be "ChromiumHTML", but was forced to become "ChromiumHTM" | 191 // This used to be "ChromiumHTML", but was forced to become "ChromiumHTM" |
| 202 // because of http://crbug.com/153349. See the declaration of this function | 192 // because of http://crbug.com/153349. See the declaration of this function |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 installer::InstallStatus install_status) { | 255 installer::InstallStatus install_status) { |
| 266 } | 256 } |
| 267 | 257 |
| 268 bool BrowserDistribution::ShouldSetExperimentLabels() { | 258 bool BrowserDistribution::ShouldSetExperimentLabels() { |
| 269 return false; | 259 return false; |
| 270 } | 260 } |
| 271 | 261 |
| 272 bool BrowserDistribution::HasUserExperiments() { | 262 bool BrowserDistribution::HasUserExperiments() { |
| 273 return false; | 263 return false; |
| 274 } | 264 } |
| OLD | NEW |