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

Unified Diff: chrome/installer/setup/uninstall.cc

Issue 16392011: Move FileEnumerator to its own file, do some refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix incorrect includes Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/setup/setup_util.cc ('k') | chrome/installer/test/alternate_version_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/uninstall.cc
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 3ecfdc681e6f15b2f873848b1bcab476836b22bb..ac558b45a542907e6441426d48ece12655509359 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -11,6 +11,7 @@
#include <vector>
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/string16.h"
@@ -253,11 +254,10 @@ void CheckShouldRemoveSetupAndArchive(
// Returns false in case of an error.
bool RemoveInstallerFiles(const base::FilePath& installer_directory,
bool remove_setup) {
- using file_util::FileEnumerator;
- FileEnumerator file_enumerator(
+ base::FileEnumerator file_enumerator(
installer_directory,
false,
- FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
+ base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES);
bool success = true;
base::FilePath setup_exe_base_name(installer::kSetupExe);
@@ -573,9 +573,8 @@ DeleteResult DeleteChromeFilesAndFolders(const InstallerState& installer_state,
// directory. For parents of the installer directory, we will later recurse
// and delete all the children (that are not also parents/children of the
// installer directory).
- using file_util::FileEnumerator;
- FileEnumerator file_enumerator(
- target_path, true, FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
+ base::FileEnumerator file_enumerator(target_path, true,
+ base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES);
while (true) {
base::FilePath to_delete(file_enumerator.Next());
if (to_delete.empty())
@@ -596,9 +595,8 @@ DeleteResult DeleteChromeFilesAndFolders(const InstallerState& installer_state,
// We don't try killing Chrome processes for Chrome Frame builds since
// that is unlikely to help. Instead, schedule files for deletion and
// return a value that will trigger a reboot prompt.
- FileEnumerator::FindInfo find_info;
- file_enumerator.GetFindInfo(&find_info);
- if (FileEnumerator::IsDirectory(find_info))
+ base::FileEnumerator::FileInfo find_info = file_enumerator.GetInfo();
+ if (find_info.IsDirectory())
ScheduleDirectoryForDeletion(to_delete.value().c_str());
else
ScheduleFileSystemEntityForDeletion(to_delete.value().c_str());
« no previous file with comments | « chrome/installer/setup/setup_util.cc ('k') | chrome/installer/test/alternate_version_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698