| 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 kBrowserProgIdPrefix[] = L"ChromeHTML"; |
| 39 const wchar_t kBrowserProgIdDesc[] = L"Chrome HTML Document"; |
| 38 const wchar_t kCommandExecuteImplUuid[] = | 40 const wchar_t kCommandExecuteImplUuid[] = |
| 39 L"{5C65F4B0-3651-4514-B207-D10CB699B14B}"; | 41 L"{5C65F4B0-3651-4514-B207-D10CB699B14B}"; |
| 40 | 42 |
| 41 // The Google Chrome App Launcher icon is index 5; see chrome_exe.rc. | 43 // The Google Chrome App Launcher icon is index 5; see chrome_exe.rc. |
| 42 const int kAppLauncherIconIndex = 5; | 44 const int kAppLauncherIconIndex = 5; |
| 43 | 45 |
| 44 // Substitute the locale parameter in uninstall URL with whatever | 46 // Substitute the locale parameter in uninstall URL with whatever |
| 45 // Google Update tells us is the locale. In case we fail to find | 47 // Google Update tells us is the locale. In case we fail to find |
| 46 // the locale, we use US English. | 48 // the locale, we use US English. |
| 47 string16 LocalizeUrl(const wchar_t* url) { | 49 string16 LocalizeUrl(const wchar_t* url) { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return kAppLauncherIconIndex; | 151 return kAppLauncherIconIndex; |
| 150 DCHECK(shortcut_type == SHORTCUT_CHROME || | 152 DCHECK(shortcut_type == SHORTCUT_CHROME || |
| 151 shortcut_type == SHORTCUT_CHROME_ALTERNATE) << shortcut_type; | 153 shortcut_type == SHORTCUT_CHROME_ALTERNATE) << shortcut_type; |
| 152 return 0; | 154 return 0; |
| 153 } | 155 } |
| 154 | 156 |
| 155 string16 GoogleChromeDistribution::GetBaseAppId() { | 157 string16 GoogleChromeDistribution::GetBaseAppId() { |
| 156 return kBrowserAppId; | 158 return kBrowserAppId; |
| 157 } | 159 } |
| 158 | 160 |
| 161 string16 GoogleChromeDistribution::GetBrowserProgIdPrefix() { |
| 162 return kBrowserProgIdPrefix; |
| 163 } |
| 164 |
| 165 string16 GoogleChromeDistribution::GetBrowserProgIdDesc() { |
| 166 return kBrowserProgIdDesc; |
| 167 } |
| 168 |
| 159 string16 GoogleChromeDistribution::GetInstallSubDir() { | 169 string16 GoogleChromeDistribution::GetInstallSubDir() { |
| 160 string16 sub_dir(installer::kGoogleChromeInstallSubDir1); | 170 string16 sub_dir(installer::kGoogleChromeInstallSubDir1); |
| 161 sub_dir.append(L"\\"); | 171 sub_dir.append(L"\\"); |
| 162 sub_dir.append(installer::kGoogleChromeInstallSubDir2); | 172 sub_dir.append(installer::kGoogleChromeInstallSubDir2); |
| 163 return sub_dir; | 173 return sub_dir; |
| 164 } | 174 } |
| 165 | 175 |
| 166 string16 GoogleChromeDistribution::GetPublisherName() { | 176 string16 GoogleChromeDistribution::GetPublisherName() { |
| 167 const string16& publisher_name = | 177 const string16& publisher_name = |
| 168 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); | 178 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 product_guid()); | 296 product_guid()); |
| 287 } | 297 } |
| 288 | 298 |
| 289 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { | 299 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { |
| 290 return true; | 300 return true; |
| 291 } | 301 } |
| 292 | 302 |
| 293 bool GoogleChromeDistribution::HasUserExperiments() { | 303 bool GoogleChromeDistribution::HasUserExperiments() { |
| 294 return true; | 304 return true; |
| 295 } | 305 } |
| OLD | NEW |