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

Side by Side Diff: webkit/browser/fileapi/sandbox_database_test_helper.cc

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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/browser/fileapi/sandbox_database_test_helper.h" 5 #include "webkit/browser/fileapi/sandbox_database_test_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 leveldb::FileType type) { 83 leveldb::FileType type) {
84 base::FileEnumerator file_enum(db_path, false /* not recursive */, 84 base::FileEnumerator file_enum(db_path, false /* not recursive */,
85 base::FileEnumerator::DIRECTORIES | base::FileEnumerator::FILES); 85 base::FileEnumerator::DIRECTORIES | base::FileEnumerator::FILES);
86 base::FilePath file_path; 86 base::FilePath file_path;
87 while (!(file_path = file_enum.Next()).empty()) { 87 while (!(file_path = file_enum.Next()).empty()) {
88 uint64 number = kuint64max; 88 uint64 number = kuint64max;
89 leveldb::FileType file_type; 89 leveldb::FileType file_type;
90 EXPECT_TRUE(leveldb::ParseFileName(FilePathToString(file_path.BaseName()), 90 EXPECT_TRUE(leveldb::ParseFileName(FilePathToString(file_path.BaseName()),
91 &number, &file_type)); 91 &number, &file_type));
92 if (file_type == type) { 92 if (file_type == type) {
93 file_util::Delete(file_path, false); 93 base::Delete(file_path, false);
94 // We may have multiple files for the same type, so don't break here. 94 // We may have multiple files for the same type, so don't break here.
95 } 95 }
96 } 96 }
97 97
98 } 98 }
99 99
100 } // namespace fileapi 100 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/obfuscated_file_util_unittest.cc ('k') | webkit/browser/fileapi/sandbox_directory_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698