Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_ |
| 6 | #define WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_ |
| 7 | |
| 8 | // Database interface used by DomStorageArea. Abstracts the differences between |
| 9 | // the per-origin DomStorageDatabases for localStorage and |
| 10 | // SessionStorageDatabase which stores multiple origins. |
| 11 | |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 12 | #include "webkit/browser/webkit_storage_browser_export.h" |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 13 | #include "webkit/common/dom_storage/dom_storage_types.h" |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 14 | |
| 15 | namespace dom_storage { |
| 16 | |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 17 | class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageDatabaseAdapter { |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 18 | public: |
| 19 | virtual ~DomStorageDatabaseAdapter() {} |
| 20 | virtual void ReadAllValues(ValuesMap* result) = 0; |
| 21 | virtual bool CommitChanges( |
| 22 | bool clear_all_first, const ValuesMap& changes) = 0; |
| 23 | virtual void DeleteFiles() {} |
| 24 | virtual void Reset() {} |
| 25 | }; |
| 26 | |
| 27 | } // namespace dom_storage |
| 28 | |
| 29 | #endif // WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_ |