diff options
author | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 05:46:20 +0000 |
---|---|---|
committer | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 05:46:20 +0000 |
commit | 9e66a9b94a40eeeeb52c47c83990b0766e1b7ceb (patch) | |
tree | 0818f910c522fb5bda00cab55412201251db32f7 /content/browser | |
parent | ad5b14e00b36aab6e2b2d6aba8477a5dd9a11998 (diff) | |
download | chromium_src-9e66a9b94a40eeeeb52c47c83990b0766e1b7ceb.zip chromium_src-9e66a9b94a40eeeeb52c47c83990b0766e1b7ceb.tar.gz chromium_src-9e66a9b94a40eeeeb52c47c83990b0766e1b7ceb.tar.bz2 |
Revert 198820 "Move FileEnumerator to its own file, do some refa..."
Broke both windows clobber and official builders' compile with this error:
771>Link:
771> Creating library ..\..\..\build\Release\lib\gcp_portmon64.lib and
object ..\..\..\build\Release\lib\gcp_portmon64.exp
771>base.lib(path_service.obj) : fatalerror LNK1112: module machine type 'X86'
conflicts with target machine type 'x64'
771>
771>Build FAILED.
> Move FileEnumerator to its own file, do some refactoring.
>
> It creates a class FileInfo to contain the details rather than using a platform-specific typedef. This allows the accessors GetName, GetSize, etc. to be moved directly to this class (previously they were static helpers on the FileEnumerator class) which makes a bunch of code much cleaner. It also gives reasonable getting and initialization which the previous version lacked.
>
> BUG=175002
> R=rvargas@chromium.org
>
> Review URL: https://codereview.chromium.org/13165005
TBR=brettw@chromium.org
Review URL: https://codereview.chromium.org/14824006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198850 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
5 files changed, 23 insertions, 26 deletions
diff --git a/content/browser/gpu/gpu_pixel_browsertest.cc b/content/browser/gpu/gpu_pixel_browsertest.cc index f7f2254..fb93076 100644 --- a/content/browser/gpu/gpu_pixel_browsertest.cc +++ b/content/browser/gpu/gpu_pixel_browsertest.cc @@ -4,7 +4,6 @@ #include "base/command_line.h" #include "base/file_util.h" -#include "base/files/file_enumerator.h" #include "base/files/file_path.h" #include "base/path_service.h" #include "base/string_number_conversions.h" @@ -399,10 +398,10 @@ class GpuPixelBrowserTest : public ContentBrowserTest { void ObtainLocalRefImageRevision() { base::FilePath filter; filter = filter.AppendASCII(test_name_ + "_*.rev"); - base::FileEnumerator locator(ref_img_dir_, - false, // non recursive - base::FileEnumerator::FILES, - filter.value()); + file_util::FileEnumerator locator(ref_img_dir_, + false, // non recursive + file_util::FileEnumerator::FILES, + filter.value()); int64 max_revision = 0; std::vector<base::FilePath> outdated_revs; for (base::FilePath full_path = locator.Next(); diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc index a0b945b..b95be28 100644 --- a/content/browser/indexed_db/indexed_db_context_impl.cc +++ b/content/browser/indexed_db/indexed_db_context_impl.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/file_util.h" -#include "base/files/file_enumerator.h" #include "base/logging.h" #include "base/message_loop_proxy.h" #include "base/string_util.h" @@ -47,8 +46,8 @@ void GetAllOriginsAndPaths( DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)); if (indexeddb_path.empty()) return; - base::FileEnumerator file_enumerator(indexeddb_path, - false, base::FileEnumerator::DIRECTORIES); + file_util::FileEnumerator file_enumerator(indexeddb_path, + false, file_util::FileEnumerator::DIRECTORIES); for (base::FilePath file_path = file_enumerator.Next(); !file_path.empty(); file_path = file_enumerator.Next()) { if (file_path.Extension() == IndexedDBContextImpl::kIndexedDBExtension) { diff --git a/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc b/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc index 130cf08..e051d97 100644 --- a/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc @@ -6,7 +6,6 @@ #include "base/bind.h" #include "base/file_util.h" -#include "base/files/file_enumerator.h" #include "base/threading/sequenced_worker_pool.h" #include "content/browser/child_process_security_policy_impl.h" #include "content/public/browser/browser_ppapi_host.h" @@ -220,16 +219,17 @@ int32_t PepperFlashFileMessageFilter::OnGetDirContents( } ppapi::DirContents contents; - base::FileEnumerator enumerator(full_path, false, - base::FileEnumerator::FILES | - base::FileEnumerator::DIRECTORIES | - base::FileEnumerator::INCLUDE_DOT_DOT); + file_util::FileEnumerator enumerator(full_path, false, + file_util::FileEnumerator::FILES | + file_util::FileEnumerator::DIRECTORIES | + file_util::FileEnumerator::INCLUDE_DOT_DOT); while (!enumerator.Next().empty()) { - base::FileEnumerator::FileInfo info = enumerator.GetInfo(); + file_util::FileEnumerator::FindInfo info; + enumerator.GetFindInfo(&info); ppapi::DirEntry entry = { - info.GetName(), - info.IsDirectory() + file_util::FileEnumerator::GetFilename(info), + file_util::FileEnumerator::IsDirectory(info) }; contents.push_back(entry); } diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc index 9c95e32..94141d61 100644 --- a/content/browser/storage_partition_impl_map.cc +++ b/content/browser/storage_partition_impl_map.cc @@ -7,7 +7,6 @@ #include "base/bind.h" #include "base/callback.h" #include "base/file_util.h" -#include "base/files/file_enumerator.h" #include "base/files/file_path.h" #include "base/stl_util.h" #include "base/string_number_conversions.h" @@ -183,12 +182,12 @@ const int kPartitionNameHashBytes = 6; // Needed for selecting all files in ObliterateOneDirectory() below. #if defined(OS_POSIX) -const int kAllFileTypes = base::FileEnumerator::FILES | - base::FileEnumerator::DIRECTORIES | - base::FileEnumerator::SHOW_SYM_LINKS; +const int kAllFileTypes = file_util::FileEnumerator::FILES | + file_util::FileEnumerator::DIRECTORIES | + file_util::FileEnumerator::SHOW_SYM_LINKS; #else -const int kAllFileTypes = base::FileEnumerator::FILES | - base::FileEnumerator::DIRECTORIES; +const int kAllFileTypes = file_util::FileEnumerator::FILES | + file_util::FileEnumerator::DIRECTORIES; #endif base::FilePath GetStoragePartitionDomainPath( @@ -209,7 +208,7 @@ void ObliterateOneDirectory(const base::FilePath& current_dir, std::vector<base::FilePath>* paths_to_consider) { CHECK(current_dir.IsAbsolute()); - base::FileEnumerator enumerator(current_dir, false, kAllFileTypes); + file_util::FileEnumerator enumerator(current_dir, false, kAllFileTypes); for (base::FilePath to_delete = enumerator.Next(); !to_delete.empty(); to_delete = enumerator.Next()) { // Enum tracking which of the 3 possible actions to take for |to_delete|. @@ -323,7 +322,7 @@ void BlockingGarbageCollect( scoped_ptr<base::hash_set<base::FilePath> > active_paths) { CHECK(storage_root.IsAbsolute()); - base::FileEnumerator enumerator(storage_root, false, kAllFileTypes); + file_util::FileEnumerator enumerator(storage_root, false, kAllFileTypes); base::FilePath trash_directory; if (!file_util::CreateTemporaryDirInDir(storage_root, kTrashDirname, &trash_directory)) { diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc index c429a82..ba7884f8 100644 --- a/content/browser/zygote_host/zygote_host_impl_linux.cc +++ b/content/browser/zygote_host/zygote_host_impl_linux.cc @@ -13,7 +13,6 @@ #include "base/command_line.h" #include "base/environment.h" #include "base/file_util.h" -#include "base/files/file_enumerator.h" #include "base/linux_util.h" #include "base/logging.h" #include "base/memory/linked_ptr.h" @@ -372,7 +371,8 @@ void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid, if (!selinux_valid) { const base::FilePath kSelinuxPath("/selinux"); - base::FileEnumerator en(kSelinuxPath, false, base::FileEnumerator::FILES); + file_util::FileEnumerator en(kSelinuxPath, false, + file_util::FileEnumerator::FILES); bool has_selinux_files = !en.Next().empty(); selinux = access(kSelinuxPath.value().c_str(), X_OK) == 0 && |