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

Side by Side Diff: webkit/fileapi/file_system_directory_database.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/fileapi/file_system_directory_database.h" 5 #include "webkit/fileapi/file_system_directory_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <math.h> 8 #include <math.h>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // Any path in |pending_directories| is relative to |path_|. 266 // Any path in |pending_directories| is relative to |path_|.
267 std::stack<FilePath> pending_directories; 267 std::stack<FilePath> pending_directories;
268 pending_directories.push(FilePath()); 268 pending_directories.push(FilePath());
269 269
270 while (!pending_directories.empty()) { 270 while (!pending_directories.empty()) {
271 FilePath dir_path = pending_directories.top(); 271 FilePath dir_path = pending_directories.top();
272 pending_directories.pop(); 272 pending_directories.pop();
273 273
274 file_util::FileEnumerator file_enum( 274 file_util::FileEnumerator file_enum(
275 dir_path.empty() ? path_ : path_.Append(dir_path), 275 dir_path.empty() ? path_ : path_.Append(dir_path),
276 false /* recursive */, 276 false /* not recursive */,
277 static_cast<file_util::FileEnumerator::FileType>( 277 file_util::FileEnumerator::DIRECTORIES |
278 file_util::FileEnumerator::DIRECTORIES | 278 file_util::FileEnumerator::FILES);
279 file_util::FileEnumerator::FILES));
280 279
281 FilePath absolute_file_path; 280 FilePath absolute_file_path;
282 while (!(absolute_file_path = file_enum.Next()).empty()) { 281 while (!(absolute_file_path = file_enum.Next()).empty()) {
283 file_util::FileEnumerator::FindInfo find_info; 282 file_util::FileEnumerator::FindInfo find_info;
284 file_enum.GetFindInfo(&find_info); 283 file_enum.GetFindInfo(&find_info);
285 284
286 FilePath relative_file_path; 285 FilePath relative_file_path;
287 if (!path_.AppendRelativePath(absolute_file_path, &relative_file_path)) 286 if (!path_.AppendRelativePath(absolute_file_path, &relative_file_path))
288 return false; 287 return false;
289 288
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 862
864 void FileSystemDirectoryDatabase::HandleError( 863 void FileSystemDirectoryDatabase::HandleError(
865 const tracked_objects::Location& from_here, 864 const tracked_objects::Location& from_here,
866 const leveldb::Status& status) { 865 const leveldb::Status& status) {
867 LOG(ERROR) << "FileSystemDirectoryDatabase failed at: " 866 LOG(ERROR) << "FileSystemDirectoryDatabase failed at: "
868 << from_here.ToString() << " with error: " << status.ToString(); 867 << from_here.ToString() << " with error: " << status.ToString();
869 db_.reset(); 868 db_.reset();
870 } 869 }
871 870
872 } // namespace fileapi 871 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_database_test_helper.cc ('k') | webkit/fileapi/isolated_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698