OLD | NEW |
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 Loading... |
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 base::Delete(file_path, false); | 93 base::DeleteFile(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 |
OLD | NEW |