Index: content/browser/dom_storage/dom_storage_database.h |
diff --git a/webkit/browser/dom_storage/dom_storage_database.h b/content/browser/dom_storage/dom_storage_database.h |
similarity index 70% |
rename from webkit/browser/dom_storage/dom_storage_database.h |
rename to content/browser/dom_storage/dom_storage_database.h |
index 1f1d5012314717999a4cee29047632236b7eaaa4..28d3559d203c97ec0f33429731ea3972ab086501 100644 |
--- a/webkit/browser/dom_storage/dom_storage_database.h |
+++ b/content/browser/dom_storage/dom_storage_database.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_H_ |
-#define WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_H_ |
+#ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_H_ |
+#define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_H_ |
#include <map> |
@@ -12,60 +12,60 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/strings/nullable_string16.h" |
#include "base/strings/string16.h" |
+#include "content/common/content_export.h" |
+#include "content/common/dom_storage/dom_storage_types.h" |
#include "sql/connection.h" |
-#include "webkit/browser/webkit_storage_browser_export.h" |
-#include "webkit/common/dom_storage/dom_storage_types.h" |
-namespace dom_storage { |
+namespace content { |
// Represents a SQLite based backing for DOM storage data. This |
// class is designed to be used on a single thread. |
-class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageDatabase { |
+class CONTENT_EXPORT DOMStorageDatabase { |
public: |
static base::FilePath GetJournalFilePath(const base::FilePath& database_path); |
- explicit DomStorageDatabase(const base::FilePath& file_path); |
- virtual ~DomStorageDatabase(); // virtual for unit testing |
+ explicit DOMStorageDatabase(const base::FilePath& file_path); |
+ virtual ~DOMStorageDatabase(); // virtual for unit testing |
// Reads all the key, value pairs stored in the database and returns |
// them. |result| is assumed to be empty and any duplicate keys will |
// be overwritten. If the database exists on disk then it will be |
// opened. If it does not exist then it will not be created and |
// |result| will be unmodified. |
- void ReadAllValues(ValuesMap* result); |
+ void ReadAllValues(DOMStorageValuesMap* result); |
// Updates the backing database. Will remove all keys before updating |
// the database if |clear_all_first| is set. Then all entries in |
// |changes| will be examined - keys mapped to a null NullableString16 |
// will be removed and all others will be inserted/updated as appropriate. |
- bool CommitChanges(bool clear_all_first, const ValuesMap& changes); |
+ bool CommitChanges(bool clear_all_first, const DOMStorageValuesMap& changes); |
// Simple getter for the path we were constructed with. |
const base::FilePath& file_path() const { return file_path_; } |
protected: |
// Constructor that uses an in-memory sqlite database, for testing. |
- DomStorageDatabase(); |
+ DOMStorageDatabase(); |
private: |
friend class LocalStorageDatabaseAdapter; |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, SimpleOpenAndClose); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestLazyOpenIsLazy); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestDetectSchemaVersion); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, SimpleOpenAndClose); |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, TestLazyOpenIsLazy); |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, TestDetectSchemaVersion); |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, |
TestLazyOpenUpgradesDatabase); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, SimpleWriteAndReadBack); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, WriteWithClear); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, SimpleWriteAndReadBack); |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, WriteWithClear); |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, |
UpgradeFromV1ToV2WithData); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, TestSimpleRemoveOneValue); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, TestSimpleRemoveOneValue); |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, |
TestCanOpenAndReadWebCoreDatabase); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageDatabaseTest, |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageDatabaseTest, |
TestCanOpenFileThatIsNotADatabase); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, BackingDatabaseOpened); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, CommitTasks); |
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, PurgeMemory); |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, BackingDatabaseOpened); |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, CommitTasks); |
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, PurgeMemory); |
enum SchemaVersion { |
INVALID, |
@@ -114,6 +114,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageDatabase { |
bool known_to_be_empty_; |
}; |
-} // namespace dom_storage |
+} // namespace content |
-#endif // WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_H_ |
+#endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_DATABASE_H_ |