Chromium Code Reviews| 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 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 #include "chrome/installer/util/google_update_constants.h" | 39 #include "chrome/installer/util/google_update_constants.h" |
| 40 #include "chrome/installer/util/google_update_settings.h" | 40 #include "chrome/installer/util/google_update_settings.h" |
| 41 #include "chrome/installer/util/helper.h" | 41 #include "chrome/installer/util/helper.h" |
| 42 #include "chrome/installer/util/install_util.h" | 42 #include "chrome/installer/util/install_util.h" |
| 43 #include "chrome/installer/util/installation_state.h" | 43 #include "chrome/installer/util/installation_state.h" |
| 44 #include "chrome/installer/util/installer_state.h" | 44 #include "chrome/installer/util/installer_state.h" |
| 45 #include "chrome/installer/util/logging_installer.h" | 45 #include "chrome/installer/util/logging_installer.h" |
| 46 #include "chrome/installer/util/self_cleaning_temp_dir.h" | 46 #include "chrome/installer/util/self_cleaning_temp_dir.h" |
| 47 #include "chrome/installer/util/shell_util.h" | 47 #include "chrome/installer/util/shell_util.h" |
| 48 #include "chrome/installer/util/util_constants.h" | 48 #include "chrome/installer/util/util_constants.h" |
| 49 #include "chrome/installer/util/work_item.h" | |
| 49 #include "content/public/common/result_codes.h" | 50 #include "content/public/common/result_codes.h" |
| 50 #include "rlz/lib/rlz_lib.h" | 51 #include "rlz/lib/rlz_lib.h" |
| 51 | 52 |
| 52 using base::win::RegKey; | 53 using base::win::RegKey; |
| 53 | 54 |
| 54 namespace installer { | 55 namespace installer { |
| 55 | 56 |
| 56 namespace { | 57 namespace { |
| 57 | 58 |
| 58 // Avoid leaving behind a Temp dir. If one exists, ask SelfCleaningTempDir to | 59 // Avoid leaving behind a Temp dir. If one exists, ask SelfCleaningTempDir to |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 88 BrowserDistribution::Type dist_type = dist_types[i]; | 89 BrowserDistribution::Type dist_type = dist_types[i]; |
| 89 const ProductState* product_state = | 90 const ProductState* product_state = |
| 90 original_state.GetProductState(system_level, dist_type); | 91 original_state.GetProductState(system_level, dist_type); |
| 91 // Only modify other products if they're installed and multi. | 92 // Only modify other products if they're installed and multi. |
| 92 if (product_state != NULL && | 93 if (product_state != NULL && |
| 93 product_state->is_multi_install() && | 94 product_state->is_multi_install() && |
| 94 !product_state->channel().Equals(channel_info)) { | 95 !product_state->channel().Equals(channel_info)) { |
| 95 BrowserDistribution* other_dist = | 96 BrowserDistribution* other_dist = |
| 96 BrowserDistribution::GetSpecificDistribution(dist_type); | 97 BrowserDistribution::GetSpecificDistribution(dist_type); |
| 97 update_list->AddSetRegValueWorkItem(reg_root, other_dist->GetStateKey(), | 98 update_list->AddSetRegValueWorkItem(reg_root, other_dist->GetStateKey(), |
| 98 google_update::kRegApField, channel_info.value(), true); | 99 google_update::kRegApField, channel_info.value(), |
| 100 true, WorkItem::WOW64_DEFAULT); | |
|
Will Harris
2014/05/16 17:29:07
this looks like it should be WOW64_32 as it access
| |
| 99 } else { | 101 } else { |
| 100 LOG_IF(ERROR, | 102 LOG_IF(ERROR, |
| 101 product_state != NULL && product_state->is_multi_install()) | 103 product_state != NULL && product_state->is_multi_install()) |
| 102 << "Channel value for " | 104 << "Channel value for " |
| 103 << BrowserDistribution::GetSpecificDistribution( | 105 << BrowserDistribution::GetSpecificDistribution( |
| 104 dist_type)->GetDisplayName() | 106 dist_type)->GetDisplayName() |
| 105 << " is somehow already set to the desired new value of " | 107 << " is somehow already set to the desired new value of " |
| 106 << channel_info.value(); | 108 << channel_info.value(); |
| 107 } | 109 } |
| 108 } | 110 } |
| (...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1438 // If we need a reboot to continue, schedule the parent directories for | 1440 // If we need a reboot to continue, schedule the parent directories for |
| 1439 // deletion unconditionally. If they are not empty, the session manager | 1441 // deletion unconditionally. If they are not empty, the session manager |
| 1440 // will not delete them on reboot. | 1442 // will not delete them on reboot. |
| 1441 ScheduleParentAndGrandparentForDeletion(target_path); | 1443 ScheduleParentAndGrandparentForDeletion(target_path); |
| 1442 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { | 1444 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { |
| 1443 *uninstall_status = UNINSTALL_FAILED; | 1445 *uninstall_status = UNINSTALL_FAILED; |
| 1444 } | 1446 } |
| 1445 } | 1447 } |
| 1446 | 1448 |
| 1447 } // namespace installer | 1449 } // namespace installer |
| OLD | NEW |