| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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> |
| 11 #include <wtsapi32.h> | 11 #include <wtsapi32.h> |
| 12 #include <msi.h> | 12 #include <msi.h> |
| 13 #include <sddl.h> | 13 #include <sddl.h> |
| 14 | 14 |
| 15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 16 #include "base/file_path.h" | 16 #include "base/file_path.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/rand_util.h" | 18 #include "base/rand_util.h" |
| 19 #include "base/scoped_ptr.h" | 19 #include "base/scoped_ptr.h" |
| 20 #include "base/string_number_conversions.h" | 20 #include "base/string_number_conversions.h" |
| 21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| 22 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
| 23 #include "base/win/registry.h" | 23 #include "base/win/registry.h" |
| 24 #include "base/win/windows_version.h" | 24 #include "base/win/windows_version.h" |
| 25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/common/json_value_serializer.h" | 26 #include "chrome/common/json_value_serializer.h" |
| 27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
| 28 #include "chrome/common/result_codes.h" | |
| 29 #include "chrome/installer/util/channel_info.h" | 28 #include "chrome/installer/util/channel_info.h" |
| 30 #include "chrome/installer/util/product.h" | 29 #include "chrome/installer/util/product.h" |
| 31 #include "chrome/installer/util/install_util.h" | 30 #include "chrome/installer/util/install_util.h" |
| 32 #include "chrome/installer/util/l10n_string_util.h" | 31 #include "chrome/installer/util/l10n_string_util.h" |
| 33 #include "chrome/installer/util/google_update_constants.h" | 32 #include "chrome/installer/util/google_update_constants.h" |
| 34 #include "chrome/installer/util/google_update_settings.h" | 33 #include "chrome/installer/util/google_update_settings.h" |
| 35 #include "chrome/installer/util/helper.h" | 34 #include "chrome/installer/util/helper.h" |
| 36 #include "chrome/installer/util/util_constants.h" | 35 #include "chrome/installer/util/util_constants.h" |
| 37 #include "chrome/installer/util/wmi.h" | 36 #include "chrome/installer/util/wmi.h" |
| 37 #include "content/common/result_codes.h" |
| 38 | 38 |
| 39 #include "installer_util_strings.h" // NOLINT | 39 #include "installer_util_strings.h" // NOLINT |
| 40 | 40 |
| 41 #pragma comment(lib, "wtsapi32.lib") | 41 #pragma comment(lib, "wtsapi32.lib") |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| 44 | 44 |
| 45 const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; | 45 const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; |
| 46 const wchar_t kBrowserAppId[] = L"Chrome"; | 46 const wchar_t kBrowserAppId[] = L"Chrome"; |
| 47 | 47 |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 // we waited for chrome to exit so the uninstall would not detect chrome | 684 // we waited for chrome to exit so the uninstall would not detect chrome |
| 685 // running. | 685 // running. |
| 686 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( | 686 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( |
| 687 installer::switches::kSystemLevelToast); | 687 installer::switches::kSystemLevelToast); |
| 688 | 688 |
| 689 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, | 689 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, |
| 690 GetType())); | 690 GetType())); |
| 691 base::LaunchApp(cmd, false, false, NULL); | 691 base::LaunchApp(cmd, false, false, NULL); |
| 692 } | 692 } |
| 693 #endif | 693 #endif |
| OLD | NEW |