OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "third_party/leveldb/include/leveldb/db.h" | 14 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
15 | 15 |
16 namespace leveldb { | 16 namespace leveldb { |
17 class WriteBatch; | 17 class WriteBatch; |
18 } | 18 } |
19 | 19 |
20 namespace fileapi { | 20 namespace fileapi { |
21 | 21 |
22 // This class WILL NOT protect you against producing directory loops, giving an | 22 // This class WILL NOT protect you against producing directory loops, giving an |
23 // empty directory a backing data file, giving two files the same backing file, | 23 // empty directory a backing data file, giving two files the same backing file, |
24 // or pointing to a nonexistent backing file. It does no file IO other than | 24 // or pointing to a nonexistent backing file. It does no file IO other than |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 bool RemoveFileInfoHelper(FileId file_id, leveldb::WriteBatch* batch); | 92 bool RemoveFileInfoHelper(FileId file_id, leveldb::WriteBatch* batch); |
93 void HandleError(leveldb::Status status); | 93 void HandleError(leveldb::Status status); |
94 | 94 |
95 std::string path_; | 95 std::string path_; |
96 scoped_ptr<leveldb::DB> db_; | 96 scoped_ptr<leveldb::DB> db_; |
97 }; | 97 }; |
98 | 98 |
99 } // namespace fileapi | 99 } // namespace fileapi |
100 | 100 |
101 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_ | 101 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_DIRECTORY_DATABASE_H_ |
OLD | NEW |