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

Unified Diff: content/browser/dom_storage/dom_storage_area.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
« no previous file with comments | « content/browser/dom_storage/OWNERS ('k') | content/browser/dom_storage/dom_storage_area.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_area.h
diff --git a/webkit/browser/dom_storage/dom_storage_area.h b/content/browser/dom_storage/dom_storage_area.h
similarity index 67%
rename from webkit/browser/dom_storage/dom_storage_area.h
rename to content/browser/dom_storage/dom_storage_area.h
index 04923aa52c0f210db163a6da5b05401ee44b93be..03ef07e7e64e39594dbde5c74622cb8828d8f6cd 100644
--- a/webkit/browser/dom_storage/dom_storage_area.h
+++ b/content/browser/dom_storage/dom_storage_area.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_AREA_H_
-#define WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
+#ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
+#define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
@@ -11,22 +11,22 @@
#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 "url/gurl.h"
-#include "webkit/browser/webkit_storage_browser_export.h"
-#include "webkit/common/dom_storage/dom_storage_types.h"
-namespace dom_storage {
+namespace content {
-class DomStorageDatabaseAdapter;
-class DomStorageMap;
-class DomStorageTaskRunner;
+class DOMStorageDatabaseAdapter;
+class DOMStorageMap;
+class DOMStorageTaskRunner;
class SessionStorageDatabase;
// Container for a per-origin Map of key/value pairs potentially
// backed by storage on disk and lazily commits changes to disk.
-// See class comments for DomStorageContext for a larger overview.
-class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageArea
- : public base::RefCountedThreadSafe<DomStorageArea> {
+// See class comments for DOMStorageContextImpl for a larger overview.
+class CONTENT_EXPORT DOMStorageArea
+ : public base::RefCountedThreadSafe<DOMStorageArea> {
public:
static const base::FilePath::CharType kDatabaseFileExtension[];
@@ -34,22 +34,22 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageArea
static GURL OriginFromDatabaseFileName(const base::FilePath& file_name);
// Local storage. Backed on disk if directory is nonempty.
- DomStorageArea(const GURL& origin,
+ DOMStorageArea(const GURL& origin,
const base::FilePath& directory,
- DomStorageTaskRunner* task_runner);
+ DOMStorageTaskRunner* task_runner);
// Session storage. Backed on disk if |session_storage_backing| is not NULL.
- DomStorageArea(int64 namespace_id,
+ DOMStorageArea(int64 namespace_id,
const std::string& persistent_namespace_id,
const GURL& origin,
SessionStorageDatabase* session_storage_backing,
- DomStorageTaskRunner* task_runner);
+ DOMStorageTaskRunner* task_runner);
const GURL& origin() const { return origin_; }
int64 namespace_id() const { return namespace_id_; }
// Writes a copy of the current set of values in the area to the |map|.
- void ExtractValues(ValuesMap* map);
+ void ExtractValues(DOMStorageValuesMap* map);
unsigned Length();
base::NullableString16 Key(unsigned index);
@@ -60,7 +60,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageArea
bool Clear();
void FastClear();
- DomStorageArea* ShallowCopy(
+ DOMStorageArea* ShallowCopy(
int64 destination_namespace_id,
const std::string& destination_persistent_namespace_id);
@@ -84,25 +84,25 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageArea
bool IsLoadedInMemory() const { return is_initial_import_done_; }
private:
- friend class DomStorageAreaTest;
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, DomStorageAreaBasics);
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, BackingDatabaseOpened);
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, TestDatabaseFilePath);
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, CommitTasks);
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, CommitChangesAtShutdown);
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, DeleteOrigin);
- FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, PurgeMemory);
- FRIEND_TEST_ALL_PREFIXES(DomStorageContextTest, PersistentIds);
- friend class base::RefCountedThreadSafe<DomStorageArea>;
+ friend class DOMStorageAreaTest;
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, DOMStorageAreaBasics);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, BackingDatabaseOpened);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, TestDatabaseFilePath);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, CommitTasks);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, CommitChangesAtShutdown);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, DeleteOrigin);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageAreaTest, PurgeMemory);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageContextImplTest, PersistentIds);
+ friend class base::RefCountedThreadSafe<DOMStorageArea>;
struct CommitBatch {
bool clear_all_first;
- ValuesMap changed_values;
+ DOMStorageValuesMap changed_values;
CommitBatch();
~CommitBatch();
};
- ~DomStorageArea();
+ ~DOMStorageArea();
// If we haven't done so already and this is a local storage area,
// will attempt to read any values for this origin currently
@@ -123,9 +123,9 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageArea
std::string persistent_namespace_id_;
GURL origin_;
base::FilePath directory_;
- scoped_refptr<DomStorageTaskRunner> task_runner_;
- scoped_refptr<DomStorageMap> map_;
- scoped_ptr<DomStorageDatabaseAdapter> backing_;
+ scoped_refptr<DOMStorageTaskRunner> task_runner_;
+ scoped_refptr<DOMStorageMap> map_;
+ scoped_ptr<DOMStorageDatabaseAdapter> backing_;
scoped_refptr<SessionStorageDatabase> session_storage_backing_;
bool is_initial_import_done_;
bool is_shutdown_;
@@ -133,6 +133,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageArea
int commit_batches_in_flight_;
};
-} // namespace dom_storage
+} // namespace content
-#endif // WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
+#endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
« no previous file with comments | « content/browser/dom_storage/OWNERS ('k') | content/browser/dom_storage/dom_storage_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698