| 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 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 17 matching lines...) Expand all Loading... |
| 28 #include "chrome/installer/util/util_constants.h" | 28 #include "chrome/installer/util/util_constants.h" |
| 29 #include "chrome/installer/util/wmi.h" | 29 #include "chrome/installer/util/wmi.h" |
| 30 #include "content/public/common/result_codes.h" | 30 #include "content/public/common/result_codes.h" |
| 31 | 31 |
| 32 #include "installer_util_strings.h" // NOLINT | 32 #include "installer_util_strings.h" // NOLINT |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; | 36 const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; |
| 37 const wchar_t kBrowserAppId[] = L"Chrome"; | 37 const wchar_t kBrowserAppId[] = L"Chrome"; |
| 38 const wchar_t kCommandExecuteImplUuid[] = | 38 const wchar_t kBrowserProgIdPrefix[] = L"ChromeHTML"; |
| 39 const wchar_t kBrowserProgIdDesc[] = L"Chrome HTML Document"; |
| 40 const wchar_t kCommandExecuteImplUuidString[] = |
| 39 L"{5C65F4B0-3651-4514-B207-D10CB699B14B}"; | 41 L"{5C65F4B0-3651-4514-B207-D10CB699B14B}"; |
| 42 const GUID kCommandExecuteImplUuid = {0x5C65F4B0, 0x3651, 0x4514, |
| 43 {0xB2, 0x07, 0xD1, 0x0C, 0xB6, 0x99, 0xB1, 0x4B}}; |
| 40 | 44 |
| 41 // The Google Chrome App Launcher icon is index 5; see chrome_exe.rc. | 45 // The Google Chrome App Launcher icon is index 5; see chrome_exe.rc. |
| 42 const int kAppLauncherIconIndex = 5; | 46 const int kAppLauncherIconIndex = 5; |
| 43 | 47 |
| 44 // Substitute the locale parameter in uninstall URL with whatever | 48 // Substitute the locale parameter in uninstall URL with whatever |
| 45 // Google Update tells us is the locale. In case we fail to find | 49 // Google Update tells us is the locale. In case we fail to find |
| 46 // the locale, we use US English. | 50 // the locale, we use US English. |
| 47 string16 LocalizeUrl(const wchar_t* url) { | 51 string16 LocalizeUrl(const wchar_t* url) { |
| 48 string16 language; | 52 string16 language; |
| 49 if (!GoogleUpdateSettings::GetLanguage(&language)) | 53 if (!GoogleUpdateSettings::GetLanguage(&language)) |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return kAppLauncherIconIndex; | 153 return kAppLauncherIconIndex; |
| 150 DCHECK(shortcut_type == SHORTCUT_CHROME || | 154 DCHECK(shortcut_type == SHORTCUT_CHROME || |
| 151 shortcut_type == SHORTCUT_CHROME_ALTERNATE) << shortcut_type; | 155 shortcut_type == SHORTCUT_CHROME_ALTERNATE) << shortcut_type; |
| 152 return 0; | 156 return 0; |
| 153 } | 157 } |
| 154 | 158 |
| 155 string16 GoogleChromeDistribution::GetBaseAppId() { | 159 string16 GoogleChromeDistribution::GetBaseAppId() { |
| 156 return kBrowserAppId; | 160 return kBrowserAppId; |
| 157 } | 161 } |
| 158 | 162 |
| 163 string16 GoogleChromeDistribution::GetBrowserProgIdPrefix() { |
| 164 return kBrowserProgIdPrefix; |
| 165 } |
| 166 |
| 167 string16 GoogleChromeDistribution::GetBrowserProgIdDesc() { |
| 168 return kBrowserProgIdDesc; |
| 169 } |
| 170 |
| 159 string16 GoogleChromeDistribution::GetInstallSubDir() { | 171 string16 GoogleChromeDistribution::GetInstallSubDir() { |
| 160 string16 sub_dir(installer::kGoogleChromeInstallSubDir1); | 172 string16 sub_dir(installer::kGoogleChromeInstallSubDir1); |
| 161 sub_dir.append(L"\\"); | 173 sub_dir.append(L"\\"); |
| 162 sub_dir.append(installer::kGoogleChromeInstallSubDir2); | 174 sub_dir.append(installer::kGoogleChromeInstallSubDir2); |
| 163 return sub_dir; | 175 return sub_dir; |
| 164 } | 176 } |
| 165 | 177 |
| 166 string16 GoogleChromeDistribution::GetPublisherName() { | 178 string16 GoogleChromeDistribution::GetPublisherName() { |
| 167 const string16& publisher_name = | 179 const string16& publisher_name = |
| 168 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); | 180 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 string16 key(google_update::kRegPathClients); | 264 string16 key(google_update::kRegPathClients); |
| 253 key.append(L"\\"); | 265 key.append(L"\\"); |
| 254 key.append(product_guid()); | 266 key.append(product_guid()); |
| 255 return key; | 267 return key; |
| 256 } | 268 } |
| 257 | 269 |
| 258 string16 GoogleChromeDistribution::GetIconFilename() { | 270 string16 GoogleChromeDistribution::GetIconFilename() { |
| 259 return installer::kChromeExe; | 271 return installer::kChromeExe; |
| 260 } | 272 } |
| 261 | 273 |
| 274 bool GoogleChromeDistribution::GetCommandExecuteImplClsidString( |
| 275 string16* handler_class_uuid) { |
| 276 if (handler_class_uuid) |
| 277 *handler_class_uuid = kCommandExecuteImplUuidString; |
| 278 return true; |
| 279 } |
| 280 |
| 262 bool GoogleChromeDistribution::GetCommandExecuteImplClsid( | 281 bool GoogleChromeDistribution::GetCommandExecuteImplClsid( |
| 263 string16* handler_class_uuid) { | 282 CLSID* handler_class_uuid) { |
| 264 if (handler_class_uuid) | 283 if (handler_class_uuid) |
| 265 *handler_class_uuid = kCommandExecuteImplUuid; | 284 *handler_class_uuid = kCommandExecuteImplUuid; |
| 266 return true; | 285 return true; |
| 267 } | 286 } |
| 268 | 287 |
| 269 bool GoogleChromeDistribution::AppHostIsSupported() { | 288 bool GoogleChromeDistribution::AppHostIsSupported() { |
| 270 return true; | 289 return true; |
| 271 } | 290 } |
| 272 | 291 |
| 273 // This method checks if we need to change "ap" key in Google Update to try | 292 // This method checks if we need to change "ap" key in Google Update to try |
| (...skipping 12 matching lines...) Expand all Loading... |
| 286 product_guid()); | 305 product_guid()); |
| 287 } | 306 } |
| 288 | 307 |
| 289 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { | 308 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { |
| 290 return true; | 309 return true; |
| 291 } | 310 } |
| 292 | 311 |
| 293 bool GoogleChromeDistribution::HasUserExperiments() { | 312 bool GoogleChromeDistribution::HasUserExperiments() { |
| 294 return true; | 313 return true; |
| 295 } | 314 } |
| OLD | NEW |