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 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1218 original_state.GetProductState(installer_state.system_install(), | 1218 original_state.GetProductState(installer_state.system_install(), |
1219 browser_dist->GetType()); | 1219 browser_dist->GetType()); |
1220 | 1220 |
1221 // Delete shared registry keys as well (these require admin rights) if | 1221 // Delete shared registry keys as well (these require admin rights) if |
1222 // remove_all option is specified. | 1222 // remove_all option is specified. |
1223 if (remove_all) { | 1223 if (remove_all) { |
1224 if (!InstallUtil::IsChromeSxSProcess() && is_chrome) { | 1224 if (!InstallUtil::IsChromeSxSProcess() && is_chrome) { |
1225 // Delete media player registry key that exists only in HKLM. | 1225 // Delete media player registry key that exists only in HKLM. |
1226 // We don't delete this key in SxS uninstall or Chrome Frame uninstall | 1226 // We don't delete this key in SxS uninstall or Chrome Frame uninstall |
1227 // as we never set the key for those products. | 1227 // as we never set the key for those products. |
1228 base::string16 reg_path(installer::kMediaPlayerRegPath); | 1228 base::string16 media_player_reg_path(installer::kMediaPlayerRegPath); |
grt (UTC plus 2)
2016/11/16 15:04:44
personal preference: i would keep this as reg_path
pastarmovj
2016/11/17 15:34:43
Done.
| |
1229 reg_path.push_back(base::FilePath::kSeparators[0]); | 1229 media_player_reg_path.push_back(base::FilePath::kSeparators[0]); |
1230 reg_path.append(installer::kChromeExe); | 1230 media_player_reg_path.append(installer::kChromeExe); |
1231 InstallUtil::DeleteRegistryKey(HKEY_LOCAL_MACHINE, reg_path, | 1231 InstallUtil::DeleteRegistryKey(HKEY_LOCAL_MACHINE, media_player_reg_path, |
1232 WorkItem::kWow64Default); | |
1233 // Remove the event log provider registration as we are going to delete | |
grt (UTC plus 2)
2016/11/16 15:04:44
nit: blank line before this
pastarmovj
2016/11/17 15:34:43
Done.
| |
1234 // the file which serves the resources anyways. | |
1235 base::string16 eventlog_reg_path(installer::kEventlogProvidersRegPath); | |
1236 // registry paths can also be appended like file system path | |
1237 eventlog_reg_path.push_back(base::FilePath::kSeparators[0]); | |
1238 eventlog_reg_path.append(installer::kChromeEventLogProviderName); | |
1239 InstallUtil::DeleteRegistryKey(HKEY_LOCAL_MACHINE, eventlog_reg_path, | |
1232 WorkItem::kWow64Default); | 1240 WorkItem::kWow64Default); |
1233 } | 1241 } |
1234 | 1242 |
1235 // Unregister any dll servers that we may have registered for this | 1243 // Unregister any dll servers that we may have registered for this |
1236 // product. | 1244 // product. |
1237 if (product_state) { | 1245 if (product_state) { |
1238 std::vector<base::FilePath> com_dll_list; | 1246 std::vector<base::FilePath> com_dll_list; |
1239 product.AddComDllList(&com_dll_list); | 1247 product.AddComDllList(&com_dll_list); |
1240 base::FilePath dll_folder = installer_state.target_path().AppendASCII( | 1248 base::FilePath dll_folder = installer_state.target_path().AppendASCII( |
1241 product_state->version().GetString()); | 1249 product_state->version().GetString()); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1373 // If we need a reboot to continue, schedule the parent directories for | 1381 // If we need a reboot to continue, schedule the parent directories for |
1374 // deletion unconditionally. If they are not empty, the session manager | 1382 // deletion unconditionally. If they are not empty, the session manager |
1375 // will not delete them on reboot. | 1383 // will not delete them on reboot. |
1376 ScheduleParentAndGrandparentForDeletion(target_path); | 1384 ScheduleParentAndGrandparentForDeletion(target_path); |
1377 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { | 1385 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { |
1378 *uninstall_status = UNINSTALL_FAILED; | 1386 *uninstall_status = UNINSTALL_FAILED; |
1379 } | 1387 } |
1380 } | 1388 } |
1381 | 1389 |
1382 } // namespace installer | 1390 } // namespace installer |
OLD | NEW |