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 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_ORIGIN_DATABASE_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_ORIGIN_DATABASE_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_ORIGIN_DATABASE_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_ORIGIN_DATABASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "webkit/fileapi/fileapi_export.h" |
15 | 16 |
16 namespace leveldb { | 17 namespace leveldb { |
17 class DB; | 18 class DB; |
18 class Status; | 19 class Status; |
19 } | 20 } |
20 | 21 |
21 namespace tracked_objects { | 22 namespace tracked_objects { |
22 class Location; | 23 class Location; |
23 } | 24 } |
24 | 25 |
25 namespace fileapi { | 26 namespace fileapi { |
26 | 27 |
27 // All methods of this class other than the constructor may be used only from | 28 // All methods of this class other than the constructor may be used only from |
28 // the browser's FILE thread. The constructor may be used on any thread. | 29 // the browser's FILE thread. The constructor may be used on any thread. |
29 class FileSystemOriginDatabase { | 30 class FILEAPI_EXPORT_PRIVATE FileSystemOriginDatabase { |
30 public: | 31 public: |
31 struct OriginRecord { | 32 struct FILEAPI_EXPORT_PRIVATE OriginRecord { |
32 std::string origin; | 33 std::string origin; |
33 FilePath path; | 34 FilePath path; |
34 | 35 |
35 OriginRecord(); | 36 OriginRecord(); |
36 OriginRecord(const std::string& origin, const FilePath& path); | 37 OriginRecord(const std::string& origin, const FilePath& path); |
37 ~OriginRecord(); | 38 ~OriginRecord(); |
38 }; | 39 }; |
39 | 40 |
40 // Only one instance of FileSystemOriginDatabase should exist for a given path | 41 // Only one instance of FileSystemOriginDatabase should exist for a given path |
41 // at a given time. | 42 // at a given time. |
(...skipping 30 matching lines...) Expand all Loading... |
72 | 73 |
73 FilePath file_system_directory_; | 74 FilePath file_system_directory_; |
74 scoped_ptr<leveldb::DB> db_; | 75 scoped_ptr<leveldb::DB> db_; |
75 base::Time last_reported_time_; | 76 base::Time last_reported_time_; |
76 DISALLOW_COPY_AND_ASSIGN(FileSystemOriginDatabase); | 77 DISALLOW_COPY_AND_ASSIGN(FileSystemOriginDatabase); |
77 }; | 78 }; |
78 | 79 |
79 } // namespace fileapi | 80 } // namespace fileapi |
80 | 81 |
81 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_ORIGIN_DATABASE_H_ | 82 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_ORIGIN_DATABASE_H_ |
OLD | NEW |