OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_ |
6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_ |
7 | 7 |
8 // Database interface used by DOMStorageArea. Abstracts the differences between | 8 // Database interface used by DOMStorageArea. Abstracts the differences between |
9 // the per-origin DOMStorageDatabases for localStorage and | 9 // the per-origin DOMStorageDatabases for localStorage and |
10 // SessionStorageDatabase which stores multiple origins. | 10 // SessionStorageDatabase which stores multiple origins. |
11 | 11 |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/common/dom_storage/dom_storage_types.h" | 13 #include "content/common/dom_storage/dom_storage_types.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 class CONTENT_EXPORT DOMStorageDatabaseAdapter { | 17 class CONTENT_EXPORT DOMStorageDatabaseAdapter { |
18 public: | 18 public: |
19 virtual ~DOMStorageDatabaseAdapter() {} | 19 virtual ~DOMStorageDatabaseAdapter() {} |
20 virtual void ReadAllValues(DOMStorageValuesMap* result) = 0; | 20 virtual void ReadAllValues(DOMStorageValuesMap* result) = 0; |
21 virtual bool CommitChanges( | 21 virtual bool CommitChanges( |
22 bool clear_all_first, const DOMStorageValuesMap& changes) = 0; | 22 bool clear_all_first, const DOMStorageValuesMap& changes) = 0; |
23 virtual void DeleteFiles() {} | 23 virtual void DeleteFiles() {} |
24 virtual void Reset() {} | 24 virtual void Reset() {} |
| 25 virtual void TrimDatabase() {} |
25 }; | 26 }; |
26 | 27 |
27 } // namespace content | 28 } // namespace content |
28 | 29 |
29 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_ | 30 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_ |
OLD | NEW |