Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/installer/setup/uninstall.cc

Issue 11685006: [Fixit-Dec-2012] Auto-launch system-level Chrome post user-level Chrome self-destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +grt comments Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 VLOG(1) << "Uninstallation complete. Launching post-uninstall operations."; 1320 VLOG(1) << "Uninstallation complete. Launching post-uninstall operations.";
1321 browser_dist->DoPostUninstallOperations(product_state->version(), 1321 browser_dist->DoPostUninstallOperations(product_state->version(),
1322 backup_state_file, distribution_data); 1322 backup_state_file, distribution_data);
1323 } 1323 }
1324 1324
1325 // Try and delete the preserved local state once the post-install 1325 // Try and delete the preserved local state once the post-install
1326 // operations are complete. 1326 // operations are complete.
1327 if (!backup_state_file.empty()) 1327 if (!backup_state_file.empty())
1328 file_util::Delete(backup_state_file, false); 1328 file_util::Delete(backup_state_file, false);
1329 1329
1330 // If user-level Chrome is being uninstalled and system-level Chrome is
1331 // present, launch the system-level Active Setup command to do post-install
1332 // tasks for this user (i.e., create shortcuts).
1333 if (product.is_chrome() && !installer_state.system_install() &&
1334 original_state.GetProductState(true, browser_dist->GetType())) {
1335 InstallUtil::TriggerActiveSetupCommand();
1336 }
1337
1338 return ret; 1330 return ret;
1339 } 1331 }
1340 1332
1341 void CleanUpInstallationDirectoryAfterUninstall( 1333 void CleanUpInstallationDirectoryAfterUninstall(
1342 const InstallationState& original_state, 1334 const InstallationState& original_state,
1343 const InstallerState& installer_state, 1335 const InstallerState& installer_state,
1344 const CommandLine& cmd_line, 1336 const CommandLine& cmd_line,
1345 installer::InstallStatus* uninstall_status) { 1337 installer::InstallStatus* uninstall_status) {
1346 if (*uninstall_status != installer::UNINSTALL_SUCCESSFUL && 1338 if (*uninstall_status != installer::UNINSTALL_SUCCESSFUL &&
1347 *uninstall_status != installer::UNINSTALL_REQUIRES_REBOOT) { 1339 *uninstall_status != installer::UNINSTALL_REQUIRES_REBOOT) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 // deletion unconditionally. If they are not empty, the session manager 1401 // deletion unconditionally. If they are not empty, the session manager
1410 // will not delete them on reboot. 1402 // will not delete them on reboot.
1411 ScheduleParentAndGrandparentForDeletion(target_path); 1403 ScheduleParentAndGrandparentForDeletion(target_path);
1412 } else if (DeleteApplicationProductAndVendorDirectories(target_path) == 1404 } else if (DeleteApplicationProductAndVendorDirectories(target_path) ==
1413 installer::DELETE_FAILED) { 1405 installer::DELETE_FAILED) {
1414 *uninstall_status = installer::UNINSTALL_FAILED; 1406 *uninstall_status = installer::UNINSTALL_FAILED;
1415 } 1407 }
1416 } 1408 }
1417 1409
1418 } // namespace installer 1410 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698