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

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

Issue 2764963002: Move ProgID methods from BrowserDistribution into install_static. (Closed)
Patch Set: huangs comments Created 3 years, 9 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 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 23 matching lines...) Expand all
34 #include "chrome/installer/util/uninstall_metrics.h" 34 #include "chrome/installer/util/uninstall_metrics.h"
35 #include "chrome/installer/util/updating_app_registration_data.h" 35 #include "chrome/installer/util/updating_app_registration_data.h"
36 #include "chrome/installer/util/util_constants.h" 36 #include "chrome/installer/util/util_constants.h"
37 #include "chrome/installer/util/wmi.h" 37 #include "chrome/installer/util/wmi.h"
38 #include "third_party/crashpad/crashpad/client/crash_report_database.h" 38 #include "third_party/crashpad/crashpad/client/crash_report_database.h"
39 #include "third_party/crashpad/crashpad/client/settings.h" 39 #include "third_party/crashpad/crashpad/client/settings.h"
40 40
41 namespace { 41 namespace {
42 42
43 const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; 43 const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}";
44 const wchar_t kBrowserProgIdPrefix[] = L"ChromeHTML";
45 const wchar_t kBrowserProgIdDesc[] = L"Chrome HTML Document";
46 const wchar_t kCommandExecuteImplUuid[] = 44 const wchar_t kCommandExecuteImplUuid[] =
47 L"{5C65F4B0-3651-4514-B207-D10CB699B14B}"; 45 L"{5C65F4B0-3651-4514-B207-D10CB699B14B}";
48 46
49 // Substitute the locale parameter in uninstall URL with whatever 47 // Substitute the locale parameter in uninstall URL with whatever
50 // Google Update tells us is the locale. In case we fail to find 48 // Google Update tells us is the locale. In case we fail to find
51 // the locale, we use US English. 49 // the locale, we use US English.
52 base::string16 LocalizeUrl(const wchar_t* url) { 50 base::string16 LocalizeUrl(const wchar_t* url) {
53 base::string16 language; 51 base::string16 language;
54 if (!GoogleUpdateSettings::GetLanguage(&language)) 52 if (!GoogleUpdateSettings::GetLanguage(&language))
55 language = L"en-US"; // Default to US English. 53 language = L"en-US"; // Default to US English.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 156 }
159 157
160 base::string16 GoogleChromeDistribution::GetShortcutName() { 158 base::string16 GoogleChromeDistribution::GetShortcutName() {
161 return installer::GetLocalizedString(IDS_PRODUCT_NAME_BASE); 159 return installer::GetLocalizedString(IDS_PRODUCT_NAME_BASE);
162 } 160 }
163 161
164 int GoogleChromeDistribution::GetIconIndex() { 162 int GoogleChromeDistribution::GetIconIndex() {
165 return icon_resources::kApplicationIndex; 163 return icon_resources::kApplicationIndex;
166 } 164 }
167 165
168 base::string16 GoogleChromeDistribution::GetBrowserProgIdPrefix() {
169 return kBrowserProgIdPrefix;
170 }
171
172 base::string16 GoogleChromeDistribution::GetBrowserProgIdDesc() {
173 return kBrowserProgIdDesc;
174 }
175
176 base::string16 GoogleChromeDistribution::GetPublisherName() { 166 base::string16 GoogleChromeDistribution::GetPublisherName() {
177 const base::string16& publisher_name = 167 const base::string16& publisher_name =
178 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); 168 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE);
179 return publisher_name; 169 return publisher_name;
180 } 170 }
181 171
182 base::string16 GoogleChromeDistribution::GetAppDescription() { 172 base::string16 GoogleChromeDistribution::GetAppDescription() {
183 const base::string16& app_description = 173 const base::string16& app_description =
184 installer::GetLocalizedString(IDS_SHORTCUT_TOOLTIP_BASE); 174 installer::GetLocalizedString(IDS_SHORTCUT_TOOLTIP_BASE);
185 return app_description; 175 return app_description;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 install_static::GetAppGuid()); 265 install_static::GetAppGuid());
276 } 266 }
277 267
278 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { 268 bool GoogleChromeDistribution::ShouldSetExperimentLabels() {
279 return true; 269 return true;
280 } 270 }
281 271
282 bool GoogleChromeDistribution::HasUserExperiments() { 272 bool GoogleChromeDistribution::HasUserExperiments() {
283 return true; 273 return true;
284 } 274 }
OLDNEW
« no previous file with comments | « chrome/installer/util/google_chrome_distribution.h ('k') | chrome/installer/util/google_chrome_distribution_dummy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698