| 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 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 <windows.h> | 9 #include <windows.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 VisitUserHives(base::Bind(&DeleteUserRegistryKeys, base::Unretained(&paths))); | 567 VisitUserHives(base::Bind(&DeleteUserRegistryKeys, base::Unretained(&paths))); |
| 568 } | 568 } |
| 569 | 569 |
| 570 // Removes the persistent blacklist state for the current user. Note: this will | 570 // Removes the persistent blacklist state for the current user. Note: this will |
| 571 // not remove the state for users other than the one uninstalling Chrome on a | 571 // not remove the state for users other than the one uninstalling Chrome on a |
| 572 // system-level install (http://crbug.com/388725). Doing so would require | 572 // system-level install (http://crbug.com/388725). Doing so would require |
| 573 // extracting the per-user registry hive iteration from | 573 // extracting the per-user registry hive iteration from |
| 574 // UninstallActiveSetupEntries so that it could service multiple tasks. | 574 // UninstallActiveSetupEntries so that it could service multiple tasks. |
| 575 void RemoveBlacklistState() { | 575 void RemoveBlacklistState() { |
| 576 InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER, | 576 InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER, |
| 577 blacklist::kRegistryBeaconPath, | 577 install_static::GetRegistryPath().append( |
| 578 blacklist::kRegistryBeaconKeyName), |
| 578 0); // wow64_access | 579 0); // wow64_access |
| 579 // The following key is no longer used (https://crbug.com/631771). | 580 // The following key is no longer used (https://crbug.com/631771). This |
| 580 // This cleanup is being left in for a time though. | 581 // cleanup is being left in for a time though. |
| 581 #if defined(GOOGLE_CHROME_BUILD) | 582 InstallUtil::DeleteRegistryKey( |
| 582 const wchar_t kRegistryFinchListPath[] = | 583 HKEY_CURRENT_USER, |
| 583 L"SOFTWARE\\Google\\Chrome\\BLFinchList"; | 584 install_static::GetRegistryPath().append(L"\\BLFinchList"), |
| 584 #else | 585 0); // wow64_access |
| 585 const wchar_t kRegistryFinchListPath[] = | |
| 586 L"SOFTWARE\\Chromium\\BLFinchList"; | |
| 587 #endif | |
| 588 InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER, | |
| 589 kRegistryFinchListPath, | |
| 590 0); // wow64_access | |
| 591 } | 586 } |
| 592 | 587 |
| 593 // Removes the browser's persistent state in the Windows registry for the | 588 // Removes the browser's persistent state in the Windows registry for the |
| 594 // current user. Note: this will not remove the state for users other than the | 589 // current user. Note: this will not remove the state for users other than the |
| 595 // one uninstalling Chrome on a system-level install; see RemoveBlacklistState | 590 // one uninstalling Chrome on a system-level install; see RemoveBlacklistState |
| 596 // for details. | 591 // for details. |
| 597 void RemoveDistributionRegistryState() { | 592 void RemoveDistributionRegistryState() { |
| 598 // Delete the contents of the distribution key except for those parts used by | 593 // Delete the contents of the distribution key except for those parts used by |
| 599 // outsiders to configure Chrome. | 594 // outsiders to configure Chrome. |
| 600 DeleteRegistryKeyPartial(HKEY_CURRENT_USER, install_static::GetRegistryPath(), | 595 DeleteRegistryKeyPartial(HKEY_CURRENT_USER, install_static::GetRegistryPath(), |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 // If we need a reboot to continue, schedule the parent directories for | 1098 // If we need a reboot to continue, schedule the parent directories for |
| 1104 // deletion unconditionally. If they are not empty, the session manager | 1099 // deletion unconditionally. If they are not empty, the session manager |
| 1105 // will not delete them on reboot. | 1100 // will not delete them on reboot. |
| 1106 ScheduleParentAndGrandparentForDeletion(target_path); | 1101 ScheduleParentAndGrandparentForDeletion(target_path); |
| 1107 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { | 1102 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { |
| 1108 *uninstall_status = UNINSTALL_FAILED; | 1103 *uninstall_status = UNINSTALL_FAILED; |
| 1109 } | 1104 } |
| 1110 } | 1105 } |
| 1111 | 1106 |
| 1112 } // namespace installer | 1107 } // namespace installer |
| OLD | NEW |