Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: chrome/installer/util/chrome_app_host_distribution.cc

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 specific implementation of BrowserDistribution class for 5 // This file defines a specific implementation of BrowserDistribution class for
6 // Chrome App Host. It overrides the bare minimum of methods necessary to get a 6 // Chrome App Host. It overrides the bare minimum of methods necessary to get a
7 // Chrome App Host installer that does not interact with Google Chrome or 7 // Chrome App Host installer that does not interact with Google Chrome or
8 // Chromium installations. 8 // Chromium installations.
9 9
10 #include "chrome/installer/util/chrome_app_host_distribution.h" 10 #include "chrome/installer/util/chrome_app_host_distribution.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 string16 ChromeAppHostDistribution::GetAppGuid() { 33 string16 ChromeAppHostDistribution::GetAppGuid() {
34 return kChromeAppHostGuid; 34 return kChromeAppHostGuid;
35 } 35 }
36 36
37 string16 ChromeAppHostDistribution::GetBaseAppName() { 37 string16 ChromeAppHostDistribution::GetBaseAppName() {
38 return L"Google Chrome App Launcher"; 38 return L"Google Chrome App Launcher";
39 } 39 }
40 40
41 string16 ChromeAppHostDistribution::GetAppShortCutName() { 41 string16 ChromeAppHostDistribution::GetDisplayName() {
42 const string16& product_name = 42 return GetShortcutName(SHORTCUT_APP_LAUNCHER);
43 installer::GetLocalizedString(IDS_PRODUCT_APP_LAUNCHER_NAME_BASE);
44 return product_name;
45 } 43 }
46 44
47 string16 ChromeAppHostDistribution::GetAlternateApplicationName() { 45 string16 ChromeAppHostDistribution::GetShortcutName(
48 const string16& product_name = 46 ShortcutType shortcut_type) {
49 installer::GetLocalizedString(IDS_PRODUCT_APP_LAUNCHER_NAME_BASE); 47 switch (shortcut_type) {
grt (UTC plus 2) 2013/07/05 17:27:37 as elsewhere: DCHECK_EQ(shortcut_type, SHORTCUT_
calamity 2013/07/16 04:05:17 Done.
50 return product_name; 48 case SHORTCUT_APP_LAUNCHER:
49 return installer::GetLocalizedString(IDS_PRODUCT_APP_LAUNCHER_NAME_BASE);
50 default:
51 NOTREACHED();
52 return string16();
53 }
51 } 54 }
52 55
53 string16 ChromeAppHostDistribution::GetBaseAppId() { 56 string16 ChromeAppHostDistribution::GetBaseAppId() {
54 // Should be same as AppListController::GetAppModelId(). 57 // Should be same as AppListController::GetAppModelId().
55 return L"ChromeAppList"; 58 return L"ChromeAppList";
56 } 59 }
57 60
58 string16 ChromeAppHostDistribution::GetInstallSubDir() { 61 string16 ChromeAppHostDistribution::GetInstallSubDir() {
59 return BrowserDistribution::GetSpecificDistribution( 62 return BrowserDistribution::GetSpecificDistribution(
60 BrowserDistribution::CHROME_BINARIES)->GetInstallSubDir(); 63 BrowserDistribution::CHROME_BINARIES)->GetInstallSubDir();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 127
125 bool ChromeAppHostDistribution::CanSetAsDefault() { 128 bool ChromeAppHostDistribution::CanSetAsDefault() {
126 return false; 129 return false;
127 } 130 }
128 131
129 bool ChromeAppHostDistribution::CanCreateDesktopShortcuts() { 132 bool ChromeAppHostDistribution::CanCreateDesktopShortcuts() {
130 return true; 133 return true;
131 } 134 }
132 135
133 string16 ChromeAppHostDistribution::GetIconFilename() { 136 string16 ChromeAppHostDistribution::GetIconFilename() {
134 return installer::kChromeAppHostExe; 137 return installer::kChromeAppHostExe;
grt (UTC plus 2) 2013/07/05 17:27:37 Is this correct now? Shouldn't the IDR_X_APP_LIST
gab 2013/07/08 12:59:02 @huangs: I'm not sure what the exact current state
grt (UTC plus 2) 2013/07/08 15:15:50 Just a thought: if it's a challenge to get rid of
gab 2013/07/08 15:22:41 I thought about that too, but it feels scary to me
huangs 2013/07/08 19:43:57 +1 for removing CAHD, and planning. But I think th
135 } 138 }
136 139
137 bool ChromeAppHostDistribution::GetCommandExecuteImplClsid( 140 bool ChromeAppHostDistribution::GetCommandExecuteImplClsid(
138 string16* handler_class_uuid) { 141 string16* handler_class_uuid) {
139 return false; 142 return false;
140 } 143 }
141 144
142 void ChromeAppHostDistribution::UpdateInstallStatus(bool system_install, 145 void ChromeAppHostDistribution::UpdateInstallStatus(bool system_install,
143 installer::ArchiveType archive_type, 146 installer::ArchiveType archive_type,
144 installer::InstallStatus install_status) { 147 installer::InstallStatus install_status) {
145 #if defined(GOOGLE_CHROME_BUILD) 148 #if defined(GOOGLE_CHROME_BUILD)
146 GoogleUpdateSettings::UpdateInstallStatus(system_install, 149 GoogleUpdateSettings::UpdateInstallStatus(system_install,
147 archive_type, InstallUtil::GetInstallReturnCode(install_status), 150 archive_type, InstallUtil::GetInstallReturnCode(install_status),
148 kChromeAppHostGuid); 151 kChromeAppHostGuid);
149 #endif 152 #endif
150 } 153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698