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

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

Issue 93263002: Move some more file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 << grandparent_dir.value(); 440 << grandparent_dir.value();
441 } 441 }
442 } 442 }
443 return ret; 443 return ret;
444 } 444 }
445 445
446 // Deletes the given directory if it is empty. Returns DELETE_SUCCEEDED if the 446 // Deletes the given directory if it is empty. Returns DELETE_SUCCEEDED if the
447 // directory is deleted, DELETE_NOT_EMPTY if it is not empty, and DELETE_FAILED 447 // directory is deleted, DELETE_NOT_EMPTY if it is not empty, and DELETE_FAILED
448 // otherwise. 448 // otherwise.
449 DeleteResult DeleteEmptyDir(const base::FilePath& path) { 449 DeleteResult DeleteEmptyDir(const base::FilePath& path) {
450 if (!file_util::IsDirectoryEmpty(path)) 450 if (!base::IsDirectoryEmpty(path))
451 return DELETE_NOT_EMPTY; 451 return DELETE_NOT_EMPTY;
452 452
453 if (base::DeleteFile(path, true)) 453 if (base::DeleteFile(path, true))
454 return DELETE_SUCCEEDED; 454 return DELETE_SUCCEEDED;
455 455
456 LOG(ERROR) << "Failed to delete folder: " << path.value(); 456 LOG(ERROR) << "Failed to delete folder: " << path.value();
457 return DELETE_FAILED; 457 return DELETE_FAILED;
458 } 458 }
459 459
460 void GetLocalStateFolders(const Product& product, 460 void GetLocalStateFolders(const Product& product,
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 // If we need a reboot to continue, schedule the parent directories for 1493 // If we need a reboot to continue, schedule the parent directories for
1494 // deletion unconditionally. If they are not empty, the session manager 1494 // deletion unconditionally. If they are not empty, the session manager
1495 // will not delete them on reboot. 1495 // will not delete them on reboot.
1496 ScheduleParentAndGrandparentForDeletion(target_path); 1496 ScheduleParentAndGrandparentForDeletion(target_path);
1497 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { 1497 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) {
1498 *uninstall_status = UNINSTALL_FAILED; 1498 *uninstall_status = UNINSTALL_FAILED;
1499 } 1499 }
1500 } 1500 }
1501 1501
1502 } // namespace installer 1502 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/move_tree_work_item_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698