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 <wtsapi32.h> | 9 #include <wtsapi32.h> |
10 #include <vector> | 10 #include <vector> |
(...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 ReplaceStringPlaceholders(url, language.c_str(), NULL); | 59 return base::ReplaceStringPlaceholders(url, language.c_str(), 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 // running. | 531 // running. |
532 bool system_level_toast = base::CommandLine::ForCurrentProcess()->HasSwitch( | 532 bool system_level_toast = base::CommandLine::ForCurrentProcess()->HasSwitch( |
533 switches::kSystemLevelToast); | 533 switches::kSystemLevelToast); |
534 | 534 |
535 base::CommandLine cmd(InstallUtil::GetChromeUninstallCmd( | 535 base::CommandLine cmd(InstallUtil::GetChromeUninstallCmd( |
536 system_level_toast, product.distribution()->GetType())); | 536 system_level_toast, product.distribution()->GetType())); |
537 base::LaunchProcess(cmd, base::LaunchOptions()); | 537 base::LaunchProcess(cmd, base::LaunchOptions()); |
538 } | 538 } |
539 | 539 |
540 } // namespace installer | 540 } // namespace installer |
OLD | NEW |