| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/installer/util/user_experiment.h" | 5 #include "chrome/installer/util/user_experiment.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <sddl.h> | 8 #include <sddl.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 const wchar_t kToastUDDirFailure[] = L"40"; | 49 const wchar_t kToastUDDirFailure[] = L"40"; |
| 50 const wchar_t kToastExpBaseGroup[] = L"80"; | 50 const wchar_t kToastExpBaseGroup[] = L"80"; |
| 51 | 51 |
| 52 // Substitute the locale parameter in uninstall URL with whatever | 52 // Substitute the locale parameter in uninstall URL with whatever |
| 53 // Google Update tells us is the locale. In case we fail to find | 53 // Google Update tells us is the locale. In case we fail to find |
| 54 // the locale, we use US English. | 54 // the locale, we use US English. |
| 55 base::string16 LocalizeUrl(const wchar_t* url) { | 55 base::string16 LocalizeUrl(const wchar_t* url) { |
| 56 base::string16 language; | 56 base::string16 language; |
| 57 if (!GoogleUpdateSettings::GetLanguage(&language)) | 57 if (!GoogleUpdateSettings::GetLanguage(&language)) |
| 58 language = L"en-US"; // Default to US English. | 58 language = L"en-US"; // Default to US English. |
| 59 return base::ReplaceStringPlaceholders(url, language.c_str(), NULL); | 59 return base::ReplaceStringPlaceholders(url, language, NULL); |
| 60 } | 60 } |
| 61 | 61 |
| 62 base::string16 GetWelcomeBackUrl() { | 62 base::string16 GetWelcomeBackUrl() { |
| 63 const wchar_t kWelcomeUrl[] = L"http://www.google.com/chrome/intl/$1/" | 63 const wchar_t kWelcomeUrl[] = L"http://www.google.com/chrome/intl/$1/" |
| 64 L"welcomeback-new.html"; | 64 L"welcomeback-new.html"; |
| 65 return LocalizeUrl(kWelcomeUrl); | 65 return LocalizeUrl(kWelcomeUrl); |
| 66 } | 66 } |
| 67 | 67 |
| 68 // Converts FILETIME to hours. FILETIME times are absolute times in | 68 // Converts FILETIME to hours. FILETIME times are absolute times in |
| 69 // 100 nanosecond units. For example 5:30 pm of June 15, 2009 is 3580464. | 69 // 100 nanosecond units. For example 5:30 pm of June 15, 2009 is 3580464. |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 // we waited for chrome to exit so the uninstall would not detect chrome | 525 // we waited for chrome to exit so the uninstall would not detect chrome |
| 526 // running. | 526 // running. |
| 527 bool system_level_toast = base::CommandLine::ForCurrentProcess()->HasSwitch( | 527 bool system_level_toast = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 528 switches::kSystemLevelToast); | 528 switches::kSystemLevelToast); |
| 529 | 529 |
| 530 base::CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast)); | 530 base::CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast)); |
| 531 base::LaunchProcess(cmd, base::LaunchOptions()); | 531 base::LaunchProcess(cmd, base::LaunchOptions()); |
| 532 } | 532 } |
| 533 | 533 |
| 534 } // namespace installer | 534 } // namespace installer |
| OLD | NEW |