diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 22:51:31 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 22:51:31 +0000 |
commit | fcb524ead399b591b4e6587c2fbe712e45126320 (patch) | |
tree | 77da32bc4e3ab916de166e0f9e52e0ad61629efa /chrome_frame | |
parent | 3afef01773fcfe63523ebede8ad5a4dfed10088b (diff) | |
download | chromium_src-fcb524ead399b591b4e6587c2fbe712e45126320.zip chromium_src-fcb524ead399b591b4e6587c2fbe712e45126320.tar.gz chromium_src-fcb524ead399b591b4e6587c2fbe712e45126320.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198820 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/reliability/page_load_test.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome_frame/test/reliability/page_load_test.cc b/chrome_frame/test/reliability/page_load_test.cc index 59212a6..07af04d 100644 --- a/chrome_frame/test/reliability/page_load_test.cc +++ b/chrome_frame/test/reliability/page_load_test.cc @@ -25,6 +25,7 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/file_version_info.h" +#include "base/files/file_enumerator.h" #include "base/files/file_path.h" #include "base/i18n/time_formatting.h" #include "base/path_service.h" @@ -332,9 +333,9 @@ class PageLoadTest : public testing::Test { virtual void SetUp() { // Initialize crash_dumps_dir_path_. PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dumps_dir_path_); - file_util::FileEnumerator enumerator(crash_dumps_dir_path_, - false, // not recursive - file_util::FileEnumerator::FILES); + base::FileEnumerator enumerator(crash_dumps_dir_path_, + false, // not recursive + base::FileEnumerator::FILES); for (base::FilePath path = enumerator.Next(); !path.value().empty(); path = enumerator.Next()) { if (path.MatchesExtension(FILE_PATH_LITERAL(".dmp"))) @@ -411,9 +412,9 @@ class PageLoadTest : public testing::Test { NavigationMetrics* metrics) { int num_dumps = 0; - file_util::FileEnumerator enumerator(crash_dumps_dir_path_, - false, // not recursive - file_util::FileEnumerator::FILES); + base::FileEnumerator enumerator(crash_dumps_dir_path_, + false, // not recursive + base::FileEnumerator::FILES); for (base::FilePath path = enumerator.Next(); !path.value().empty(); path = enumerator.Next()) { if (path.MatchesExtension(FILE_PATH_LITERAL(".dmp")) && |