| Index: chrome/browser/chromeos/policy/app_pack_updater.cc
|
| diff --git a/chrome/browser/chromeos/policy/app_pack_updater.cc b/chrome/browser/chromeos/policy/app_pack_updater.cc
|
| index 61fe56f94512bc609d320c7c722df6f3fc7d3447..156402a5b145e690f780439072b59ce92ff289c4 100644
|
| --- a/chrome/browser/chromeos/policy/app_pack_updater.cc
|
| +++ b/chrome/browser/chromeos/policy/app_pack_updater.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/bind.h"
|
| #include "base/bind_helpers.h"
|
| #include "base/file_util.h"
|
| +#include "base/files/file_enumerator.h"
|
| #include "base/location.h"
|
| #include "base/stl_util.h"
|
| #include "base/string_util.h"
|
| @@ -29,7 +30,6 @@
|
| #include "content/public/browser/notification_source.h"
|
|
|
| using content::BrowserThread;
|
| -using file_util::FileEnumerator;
|
|
|
| namespace policy {
|
|
|
| @@ -250,18 +250,16 @@ void AppPackUpdater::BlockingCheckCacheInternal(
|
|
|
| // Enumerate all the files in the cache |dir|, including directories
|
| // and symlinks. Each unrecognized file will be erased.
|
| - int types = FileEnumerator::FILES | FileEnumerator::DIRECTORIES |
|
| - FileEnumerator::SHOW_SYM_LINKS;
|
| - FileEnumerator enumerator(dir, false /* recursive */, types);
|
| + int types = base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES |
|
| + base::FileEnumerator::SHOW_SYM_LINKS;
|
| + base::FileEnumerator enumerator(dir, false /* recursive */, types);
|
|
|
| for (base::FilePath path = enumerator.Next();
|
| !path.empty(); path = enumerator.Next()) {
|
| - FileEnumerator::FindInfo info;
|
| - enumerator.GetFindInfo(&info);
|
| + base::FileEnumerator::FileInfo info = enumerator.GetInfo();
|
| std::string basename = path.BaseName().value();
|
|
|
| - if (FileEnumerator::IsDirectory(info) ||
|
| - file_util::IsLink(FileEnumerator::GetFilename(info))) {
|
| + if (info.IsDirectory() || file_util::IsLink(info.GetName())) {
|
| LOG(ERROR) << "Erasing bad file in AppPack directory: " << basename;
|
| file_util::Delete(path, true /* recursive */);
|
| continue;
|
|
|