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

Unified Diff: base/file_util_posix.cc

Issue 10855002: Change the type of file_type parameter to int, as the parameter actually takes or-ed bitmasks, (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix missing comma. Created 8 years, 4 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 | « base/file_util.cc ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_posix.cc
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index 6100e10bc4fe8a8000a03750445c9828885e4662..ed60e06e6d20a94250990edd68f918e9793b0c3d 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -227,9 +227,9 @@ bool Delete(const FilePath& path, bool recursive) {
bool success = true;
std::stack<std::string> directories;
directories.push(path.value());
- FileEnumerator traversal(path, true, static_cast<FileEnumerator::FileType>(
- FileEnumerator::FILES | FileEnumerator::DIRECTORIES |
- FileEnumerator::SHOW_SYM_LINKS));
+ FileEnumerator traversal(path, true,
+ FileEnumerator::FILES | FileEnumerator::DIRECTORIES |
+ FileEnumerator::SHOW_SYM_LINKS);
for (FilePath current = traversal.Next(); success && !current.empty();
current = traversal.Next()) {
FileEnumerator::FindInfo info;
@@ -315,12 +315,9 @@ bool CopyDirectory(const FilePath& from_path,
return false;
bool success = true;
- FileEnumerator::FileType traverse_type =
- static_cast<FileEnumerator::FileType>(FileEnumerator::FILES |
- FileEnumerator::SHOW_SYM_LINKS);
+ int traverse_type = FileEnumerator::FILES | FileEnumerator::SHOW_SYM_LINKS;
if (recursive)
- traverse_type = static_cast<FileEnumerator::FileType>(
- traverse_type | FileEnumerator::DIRECTORIES);
+ traverse_type |= FileEnumerator::DIRECTORIES;
FileEnumerator traversal(from_path, recursive, traverse_type);
// We have to mimic windows behavior here. |to_path| may not exist yet,
@@ -743,7 +740,7 @@ bool SetCurrentDirectory(const FilePath& path) {
FileEnumerator::FileEnumerator(const FilePath& root_path,
bool recursive,
- FileType file_type)
+ int file_type)
: current_directory_entry_(0),
root_path_(root_path),
recursive_(recursive),
@@ -755,7 +752,7 @@ FileEnumerator::FileEnumerator(const FilePath& root_path,
FileEnumerator::FileEnumerator(const FilePath& root_path,
bool recursive,
- FileType file_type,
+ int file_type,
const FilePath::StringType& pattern)
: current_directory_entry_(0),
root_path_(root_path),
« no previous file with comments | « base/file_util.cc ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698