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_BROWSER_FILEAPI_SANDBOX_ORIGIN_DATABASE_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_SANDBOX_ORIGIN_DATABASE_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_ORIGIN_DATABASE_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_ORIGIN_DATABASE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "webkit/browser/fileapi/sandbox_origin_database_interface.h" | 10 #include "webkit/browser/fileapi/sandbox_origin_database_interface.h" |
11 | 11 |
12 namespace leveldb { | 12 namespace leveldb { |
13 class DB; | 13 class DB; |
14 class Status; | 14 class Status; |
15 } | 15 } |
16 | 16 |
17 namespace tracked_objects { | 17 namespace tracked_objects { |
18 class Location; | 18 class Location; |
19 } | 19 } |
20 | 20 |
21 namespace fileapi { | 21 namespace fileapi { |
22 | 22 |
23 // All methods of this class other than the constructor may be used only from | 23 // All methods of this class other than the constructor may be used only from |
24 // the browser's FILE thread. The constructor may be used on any thread. | 24 // the browser's FILE thread. The constructor may be used on any thread. |
25 class WEBKIT_STORAGE_EXPORT_PRIVATE SandboxOriginDatabase | 25 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxOriginDatabase |
26 : public SandboxOriginDatabaseInterface { | 26 : public SandboxOriginDatabaseInterface { |
27 public: | 27 public: |
28 // Only one instance of SandboxOriginDatabase should exist for a given path | 28 // Only one instance of SandboxOriginDatabase should exist for a given path |
29 // at a given time. | 29 // at a given time. |
30 explicit SandboxOriginDatabase(const base::FilePath& file_system_directory); | 30 explicit SandboxOriginDatabase(const base::FilePath& file_system_directory); |
31 virtual ~SandboxOriginDatabase(); | 31 virtual ~SandboxOriginDatabase(); |
32 | 32 |
33 // SandboxOriginDatabaseInterface overrides. | 33 // SandboxOriginDatabaseInterface overrides. |
34 virtual bool HasOriginPath(const std::string& origin) OVERRIDE; | 34 virtual bool HasOriginPath(const std::string& origin) OVERRIDE; |
35 virtual bool GetPathForOrigin(const std::string& origin, | 35 virtual bool GetPathForOrigin(const std::string& origin, |
(...skipping 26 matching lines...) Expand all Loading... |
62 | 62 |
63 base::FilePath file_system_directory_; | 63 base::FilePath file_system_directory_; |
64 scoped_ptr<leveldb::DB> db_; | 64 scoped_ptr<leveldb::DB> db_; |
65 base::Time last_reported_time_; | 65 base::Time last_reported_time_; |
66 DISALLOW_COPY_AND_ASSIGN(SandboxOriginDatabase); | 66 DISALLOW_COPY_AND_ASSIGN(SandboxOriginDatabase); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace fileapi | 69 } // namespace fileapi |
70 | 70 |
71 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_ORIGIN_DATABASE_H_ | 71 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_ORIGIN_DATABASE_H_ |
OLD | NEW |