Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: webkit/dom_storage/dom_storage_database_adapter.h

Issue 10556009: DomStorageArea -> DomStorageDatabase indirection; add *StorageDatabaseAdapter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/dom_storage/dom_storage_database.h ('k') | webkit/dom_storage/local_storage_database_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/dom_storage/dom_storage_database_adapter.h
diff --git a/webkit/dom_storage/dom_storage_database_adapter.h b/webkit/dom_storage/dom_storage_database_adapter.h
new file mode 100644
index 0000000000000000000000000000000000000000..30cd1ff99ab8c6307d97e49ea54d8153c69ae47f
--- /dev/null
+++ b/webkit/dom_storage/dom_storage_database_adapter.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_
+#define WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_
+#pragma once
+
+// Database interface used by DomStorageArea. Abstracts the differences between
+// the per-origin DomStorageDatabases for localStorage and
+// SessionStorageDatabase which stores multiple origins.
+
+#include "webkit/dom_storage/dom_storage_types.h"
+
+namespace dom_storage {
+
+class DomStorageDatabaseAdapter {
+ public:
+ virtual ~DomStorageDatabaseAdapter() {}
+ virtual void ReadAllValues(ValuesMap* result) = 0;
+ virtual bool CommitChanges(
+ bool clear_all_first, const ValuesMap& changes) = 0;
+ virtual void DeleteFiles() {}
+ virtual void Reset() {}
+};
+
+} // namespace dom_storage
+
+#endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_DATABASE_ADAPTER_H_
« no previous file with comments | « webkit/dom_storage/dom_storage_database.h ('k') | webkit/dom_storage/local_storage_database_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698