| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; | 42 const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; |
| 43 | 43 |
| 44 // Substitute the locale parameter in uninstall URL with whatever | 44 // Substitute the locale parameter in uninstall URL with whatever |
| 45 // Google Update tells us is the locale. In case we fail to find | 45 // Google Update tells us is the locale. In case we fail to find |
| 46 // the locale, we use US English. | 46 // the locale, we use US English. |
| 47 base::string16 LocalizeUrl(const wchar_t* url) { | 47 base::string16 LocalizeUrl(const wchar_t* url) { |
| 48 base::string16 language; | 48 base::string16 language; |
| 49 if (!GoogleUpdateSettings::GetLanguage(&language)) | 49 if (!GoogleUpdateSettings::GetLanguage(&language)) |
| 50 language = L"en-US"; // Default to US English. | 50 language = L"en-US"; // Default to US English. |
| 51 return base::ReplaceStringPlaceholders(url, language.c_str(), NULL); | 51 return base::ReplaceStringPlaceholders(url, language, NULL); |
| 52 } | 52 } |
| 53 | 53 |
| 54 base::string16 GetUninstallSurveyUrl() { | 54 base::string16 GetUninstallSurveyUrl() { |
| 55 const wchar_t kSurveyUrl[] = L"https://support.google.com/chrome/" | 55 const wchar_t kSurveyUrl[] = L"https://support.google.com/chrome/" |
| 56 L"contact/chromeuninstall3?hl=$1"; | 56 L"contact/chromeuninstall3?hl=$1"; |
| 57 return LocalizeUrl(kSurveyUrl); | 57 return LocalizeUrl(kSurveyUrl); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool NavigateToUrlWithEdge(const base::string16& url) { | 60 bool NavigateToUrlWithEdge(const base::string16& url) { |
| 61 base::string16 protocol_url = L"microsoft-edge:" + url; | 61 base::string16 protocol_url = L"microsoft-edge:" + url; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 installer::InstallStatus install_status) { | 237 installer::InstallStatus install_status) { |
| 238 GoogleUpdateSettings::UpdateInstallStatus( | 238 GoogleUpdateSettings::UpdateInstallStatus( |
| 239 system_install, archive_type, | 239 system_install, archive_type, |
| 240 InstallUtil::GetInstallReturnCode(install_status), | 240 InstallUtil::GetInstallReturnCode(install_status), |
| 241 install_static::GetAppGuid()); | 241 install_static::GetAppGuid()); |
| 242 } | 242 } |
| 243 | 243 |
| 244 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { | 244 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { |
| 245 return true; | 245 return true; |
| 246 } | 246 } |
| OLD | NEW |