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 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 } | 147 } |
| 148 | 148 |
| 149 string16 BrowserDistribution::GetAppGuid() { | 149 string16 BrowserDistribution::GetAppGuid() { |
| 150 return L""; | 150 return L""; |
| 151 } | 151 } |
| 152 | 152 |
| 153 string16 BrowserDistribution::GetBaseAppName() { | 153 string16 BrowserDistribution::GetBaseAppName() { |
| 154 return L"Chromium"; | 154 return L"Chromium"; |
| 155 } | 155 } |
| 156 | 156 |
| 157 string16 BrowserDistribution::GetAppShortCutName() { | 157 string16 BrowserDistribution::GetDisplayName() { |
| 158 return GetBaseAppName(); | 158 return GetShortcutName(SHORTCUT_CHROME); |
| 159 } | 159 } |
| 160 | 160 |
| 161 string16 BrowserDistribution::GetAlternateApplicationName() { | 161 string16 BrowserDistribution::GetShortcutName(ShortcutEnum shortcut_enum) { |
| 162 return L"The Internet"; | 162 switch (shortcut_enum) { |
| 163 case SHORTCUT_CHROME: | |
| 164 return GetBaseAppName(); | |
| 165 case SHORTCUT_ALTERNATE_CHROME: | |
| 166 return L"The Internet"; | |
| 167 case SHORTCUT_APP_LAUNCHER: | |
| 168 return L"Chromium App Launcher"; | |
| 169 default: | |
| 170 NOTREACHED(); | |
| 171 return string16(); | |
| 172 } | |
| 173 } | |
| 174 | |
| 175 string16 BrowserDistribution::GetStartMenuShortcutSubfolder( | |
| 176 SubfolderEnum subfolder_enum) { | |
| 177 switch (subfolder_enum) { | |
| 178 case SUBFOLDER_CHROME: | |
| 179 return GetShortcutName(SHORTCUT_CHROME); | |
| 180 break; | |
|
gab
2013/06/18 19:50:29
Remove break; since you return on the previous lin
calamity
2013/06/27 01:27:44
Done.
| |
| 181 default: | |
| 182 NOTREACHED(); | |
| 183 return string16(); | |
| 184 } | |
| 163 } | 185 } |
| 164 | 186 |
| 165 string16 BrowserDistribution::GetBaseAppId() { | 187 string16 BrowserDistribution::GetBaseAppId() { |
| 166 return L"Chromium"; | 188 return L"Chromium"; |
| 167 } | 189 } |
| 168 | 190 |
| 169 string16 BrowserDistribution::GetInstallSubDir() { | 191 string16 BrowserDistribution::GetInstallSubDir() { |
| 170 return L"Chromium"; | 192 return L"Chromium"; |
| 171 } | 193 } |
| 172 | 194 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 } | 247 } |
| 226 | 248 |
| 227 bool BrowserDistribution::CanCreateDesktopShortcuts() { | 249 bool BrowserDistribution::CanCreateDesktopShortcuts() { |
| 228 return true; | 250 return true; |
| 229 } | 251 } |
| 230 | 252 |
| 231 string16 BrowserDistribution::GetIconFilename() { | 253 string16 BrowserDistribution::GetIconFilename() { |
| 232 return string16(); | 254 return string16(); |
| 233 } | 255 } |
| 234 | 256 |
| 235 int BrowserDistribution::GetIconIndex() { | 257 int BrowserDistribution::GetIconIndex(ShortcutEnum shortcut_enum) { |
| 236 // Assuming that main icon appears first alphabetically in the resource file | 258 switch (shortcut_enum) { |
| 237 // for GetIconFilename(). | 259 case SHORTCUT_CHROME: |
| 238 return 0; | 260 case SHORTCUT_ALTERNATE_CHROME: |
| 261 // Assuming that main icon appears first alphabetically in the resource | |
| 262 // file for GetIconFilename(). | |
| 263 return 0; | |
| 264 case SHORTCUT_APP_LAUNCHER: | |
| 265 return 1; | |
| 266 default: | |
| 267 NOTREACHED(); | |
| 268 return 0; | |
| 269 } | |
| 239 } | 270 } |
| 240 | 271 |
| 241 bool BrowserDistribution::GetChromeChannel(string16* channel) { | 272 bool BrowserDistribution::GetChromeChannel(string16* channel) { |
| 242 return false; | 273 return false; |
| 243 } | 274 } |
| 244 | 275 |
| 245 bool BrowserDistribution::GetCommandExecuteImplClsid( | 276 bool BrowserDistribution::GetCommandExecuteImplClsid( |
| 246 string16* handler_class_uuid) { | 277 string16* handler_class_uuid) { |
| 247 if (handler_class_uuid) | 278 if (handler_class_uuid) |
| 248 *handler_class_uuid = kCommandExecuteImplUuid; | 279 *handler_class_uuid = kCommandExecuteImplUuid; |
| 249 return true; | 280 return true; |
| 250 } | 281 } |
| 251 | 282 |
| 252 bool BrowserDistribution::AppHostIsSupported() { | 283 bool BrowserDistribution::AppHostIsSupported() { |
| 253 return false; | 284 return false; |
| 254 } | 285 } |
| 255 | 286 |
| 256 void BrowserDistribution::UpdateInstallStatus(bool system_install, | 287 void BrowserDistribution::UpdateInstallStatus(bool system_install, |
| 257 installer::ArchiveType archive_type, | 288 installer::ArchiveType archive_type, |
| 258 installer::InstallStatus install_status) { | 289 installer::InstallStatus install_status) { |
| 259 } | 290 } |
| 260 | 291 |
| 261 bool BrowserDistribution::ShouldSetExperimentLabels() { | 292 bool BrowserDistribution::ShouldSetExperimentLabels() { |
| 262 return false; | 293 return false; |
| 263 } | 294 } |
| 264 | 295 |
| 265 bool BrowserDistribution::HasUserExperiments() { | 296 bool BrowserDistribution::HasUserExperiments() { |
| 266 return false; | 297 return false; |
| 267 } | 298 } |
| OLD | NEW |