OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 the methods useful for uninstalling Chrome. | 5 // This file defines the methods useful for uninstalling Chrome. |
6 | 6 |
7 #include "chrome/installer/setup/uninstall.h" | 7 #include "chrome/installer/setup/uninstall.h" |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/registry.h" | |
12 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
13 #include "base/string_util.h" | 12 #include "base/string_util.h" |
14 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "base/win/registry.h" |
15 #include "base/win/windows_version.h" | 15 #include "base/win/windows_version.h" |
16 #include "chrome/common/result_codes.h" | 16 #include "chrome/common/result_codes.h" |
17 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
18 #include "chrome/common/chrome_paths_internal.h" | 18 #include "chrome/common/chrome_paths_internal.h" |
19 #include "chrome/installer/setup/install.h" | 19 #include "chrome/installer/setup/install.h" |
20 #include "chrome/installer/setup/setup_constants.h" | 20 #include "chrome/installer/setup/setup_constants.h" |
21 #include "chrome/installer/util/browser_distribution.h" | 21 #include "chrome/installer/util/browser_distribution.h" |
22 #include "chrome/installer/util/delete_after_reboot_helper.h" | 22 #include "chrome/installer/util/delete_after_reboot_helper.h" |
23 #include "chrome/installer/util/helper.h" | 23 #include "chrome/installer/util/helper.h" |
24 #include "chrome/installer/util/install_util.h" | 24 #include "chrome/installer/util/install_util.h" |
25 #include "chrome/installer/util/logging_installer.h" | 25 #include "chrome/installer/util/logging_installer.h" |
26 #include "chrome/installer/util/shell_util.h" | 26 #include "chrome/installer/util/shell_util.h" |
27 #include "chrome/installer/util/util_constants.h" | 27 #include "chrome/installer/util/util_constants.h" |
28 #include "chrome/installer/util/version.h" | 28 #include "chrome/installer/util/version.h" |
29 | 29 |
30 // Build-time generated include file. | 30 // Build-time generated include file. |
31 #include "registered_dlls.h" // NOLINT | 31 #include "registered_dlls.h" // NOLINT |
32 | 32 |
| 33 using base::win::RegKey; |
| 34 |
33 namespace { | 35 namespace { |
34 | 36 |
35 // This functions checks for any Chrome instances that are | 37 // This functions checks for any Chrome instances that are |
36 // running and first asks them to close politely by sending a Windows message. | 38 // running and first asks them to close politely by sending a Windows message. |
37 // If there is an error while sending message or if there are still Chrome | 39 // If there is an error while sending message or if there are still Chrome |
38 // procesess active after the message has been sent, this function will try | 40 // procesess active after the message has been sent, this function will try |
39 // to kill them. | 41 // to kill them. |
40 void CloseAllChromeProcesses() { | 42 void CloseAllChromeProcesses() { |
41 for (int j = 0; j < 4; ++j) { | 43 for (int j = 0; j < 4; ++j) { |
42 std::wstring wnd_class(L"Chrome_WidgetWin_"); | 44 std::wstring wnd_class(L"Chrome_WidgetWin_"); |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 distribution_data); | 591 distribution_data); |
590 } | 592 } |
591 | 593 |
592 // Try and delete the preserved local state once the post-install | 594 // Try and delete the preserved local state once the post-install |
593 // operations are complete. | 595 // operations are complete. |
594 if (!local_state_path.empty()) | 596 if (!local_state_path.empty()) |
595 file_util::Delete(local_state_path, false); | 597 file_util::Delete(local_state_path, false); |
596 | 598 |
597 return ret; | 599 return ret; |
598 } | 600 } |
OLD | NEW |