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

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

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 7 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 Frame. It overrides the bare minimum of methods necessary to get a 6 // Chrome Frame. It overrides the bare minimum of methods necessary to get a
7 // Chrome Frame installer that does not interact with Google Chrome or 7 // Chrome Frame installer that does not interact with Google Chrome or
8 // Chromium installations. 8 // Chromium installations.
9 9
10 #include "chrome/installer/util/chrome_frame_distribution.h" 10 #include "chrome/installer/util/chrome_frame_distribution.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 string16 ChromeFrameDistribution::GetAppGuid() { 31 string16 ChromeFrameDistribution::GetAppGuid() {
32 return kChromeFrameGuid; 32 return kChromeFrameGuid;
33 } 33 }
34 34
35 string16 ChromeFrameDistribution::GetBaseAppName() { 35 string16 ChromeFrameDistribution::GetBaseAppName() {
36 return L"Google Chrome Frame"; 36 return L"Google Chrome Frame";
37 } 37 }
38 38
39 string16 ChromeFrameDistribution::GetAppShortCutName() { 39 BrowserDistribution::ShortcutInfo ChromeFrameDistribution::GetShortcutInfo(
40 const string16& product_name = 40 ShortcutEnum shortcut_enum) {
41 installer::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE); 41 ShortcutInfo info;
42 return product_name; 42 info.icon_file = installer::kChromeExe;
43 } 43 switch (shortcut_enum) {
44 44 case SHORTCUT_CHROME:
45 string16 ChromeFrameDistribution::GetAlternateApplicationName() { 45 case SHORTCUT_ALTERNATE_CHROME:
gab 2013/05/24 15:01:35 SHORTCUT_ALTERNATE_CHROME shouldn't be needed by C
calamity 2013/05/31 00:11:18 Done.
46 const string16& product_name = 46 info.name = installer::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE);
47 installer::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE); 47 info.icon_index = 0;
48 return product_name; 48 break;
49 default:
50 NOTREACHED();
51 return ShortcutInfo();
52 }
53 return info;
49 } 54 }
50 55
51 string16 ChromeFrameDistribution::GetInstallSubDir() { 56 string16 ChromeFrameDistribution::GetInstallSubDir() {
52 return L"Google\\Chrome Frame"; 57 return L"Google\\Chrome Frame";
53 } 58 }
54 59
55 string16 ChromeFrameDistribution::GetPublisherName() { 60 string16 ChromeFrameDistribution::GetPublisherName() {
56 const string16& publisher_name = 61 const string16& publisher_name =
57 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); 62 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE);
58 return publisher_name; 63 return publisher_name;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 L"Google Chrome Frame"; 106 L"Google Chrome Frame";
102 } 107 }
103 108
104 string16 ChromeFrameDistribution::GetVersionKey() { 109 string16 ChromeFrameDistribution::GetVersionKey() {
105 string16 key(google_update::kRegPathClients); 110 string16 key(google_update::kRegPathClients);
106 key.append(L"\\"); 111 key.append(L"\\");
107 key.append(kChromeFrameGuid); 112 key.append(kChromeFrameGuid);
108 return key; 113 return key;
109 } 114 }
110 115
111 string16 ChromeFrameDistribution::GetIconFilename() {
112 return installer::kChromeExe;
113 }
114
115 int ChromeFrameDistribution::GetIconIndex() {
116 return 0;
117 }
118
119 bool ChromeFrameDistribution::CanSetAsDefault() { 116 bool ChromeFrameDistribution::CanSetAsDefault() {
120 return false; 117 return false;
121 } 118 }
122 119
123 bool ChromeFrameDistribution::CanCreateDesktopShortcuts() { 120 bool ChromeFrameDistribution::CanCreateDesktopShortcuts() {
124 return false; 121 return false;
125 } 122 }
126 123
127 bool ChromeFrameDistribution::GetCommandExecuteImplClsid( 124 bool ChromeFrameDistribution::GetCommandExecuteImplClsid(
128 string16* handler_class_uuid) { 125 string16* handler_class_uuid) {
129 return false; 126 return false;
130 } 127 }
131 128
132 void ChromeFrameDistribution::UpdateInstallStatus(bool system_install, 129 void ChromeFrameDistribution::UpdateInstallStatus(bool system_install,
133 installer::ArchiveType archive_type, 130 installer::ArchiveType archive_type,
134 installer::InstallStatus install_status) { 131 installer::InstallStatus install_status) {
135 #if defined(GOOGLE_CHROME_BUILD) 132 #if defined(GOOGLE_CHROME_BUILD)
136 GoogleUpdateSettings::UpdateInstallStatus(system_install, 133 GoogleUpdateSettings::UpdateInstallStatus(system_install,
137 archive_type, InstallUtil::GetInstallReturnCode(install_status), 134 archive_type, InstallUtil::GetInstallReturnCode(install_status),
138 kChromeFrameGuid); 135 kChromeFrameGuid);
139 #endif 136 #endif
140 } 137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698