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

Unified Diff: content/browser/dom_storage/local_storage_database_adapter.h

Issue 22297005: Move webkit/{browser,common}/dom_storage into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
Index: content/browser/dom_storage/local_storage_database_adapter.h
diff --git a/content/browser/dom_storage/local_storage_database_adapter.h b/content/browser/dom_storage/local_storage_database_adapter.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ba1b0ef73c2f687f37726989ba78b3e01c2c12c
--- /dev/null
+++ b/content/browser/dom_storage/local_storage_database_adapter.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
jam 2013/08/06 16:13:49 ditto re file history
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_DOM_STORAGE_LOCAL_STORAGE_DATABASE_ADAPTER_H_
+#define CONTENT_BROWSER_DOM_STORAGE_LOCAL_STORAGE_DATABASE_ADAPTER_H_
+
+#include "base/gtest_prod_util.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/browser/dom_storage/dom_storage_database_adapter.h"
+#include "content/common/content_export.h"
+
+namespace base {
+class FilePath;
+}
+
+namespace content {
+
+class DOMStorageDatabase;
+
+class CONTENT_EXPORT LocalStorageDatabaseAdapter :
+ public DOMStorageDatabaseAdapter {
+ public:
+ explicit LocalStorageDatabaseAdapter(const base::FilePath& path);
+ virtual ~LocalStorageDatabaseAdapter();
+ virtual void ReadAllValues(DOMStorageValuesMap* result) OVERRIDE;
+ virtual bool CommitChanges(bool clear_all_first,
+ const DOMStorageValuesMap& changes) OVERRIDE;
+ virtual void DeleteFiles() OVERRIDE;
+ virtual void Reset() OVERRIDE;
+
+ protected:
+ // Constructor that uses an in-memory sqlite database, for testing.
+ LocalStorageDatabaseAdapter();
+
+ private:
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, BackingDatabaseOpened);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, CommitChangesAtShutdown);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, CommitTasks);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, DeleteOrigin);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, PurgeMemory);
+
+ scoped_ptr<DOMStorageDatabase> db_;
+
+ DISALLOW_COPY_AND_ASSIGN(LocalStorageDatabaseAdapter);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_DOM_STORAGE_LOCAL_STORAGE_DATABASE_ADAPTER_H_

Powered by Google App Engine
This is Rietveld 408576698