| Index: content/browser/dom_storage/dom_storage_namespace.h
|
| diff --git a/webkit/browser/dom_storage/dom_storage_namespace.h b/content/browser/dom_storage/dom_storage_namespace.h
|
| similarity index 66%
|
| rename from webkit/browser/dom_storage/dom_storage_namespace.h
|
| rename to content/browser/dom_storage/dom_storage_namespace.h
|
| index 758ca2ee234cae0e9b9a5e1ba06e1012f11d6be8..24762734ffc3886044568dd39f1fc921eb0ec052 100644
|
| --- a/webkit/browser/dom_storage/dom_storage_namespace.h
|
| +++ b/content/browser/dom_storage/dom_storage_namespace.h
|
| @@ -2,28 +2,28 @@
|
| // 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_NAMESPACE_H_
|
| -#define WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
|
| +#ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
|
| +#define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
|
|
|
| #include <map>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/files/file_path.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "webkit/browser/webkit_storage_browser_export.h"
|
| +#include "content/common/content_export.h"
|
|
|
| class GURL;
|
|
|
| -namespace dom_storage {
|
| +namespace content {
|
|
|
| -class DomStorageArea;
|
| -class DomStorageTaskRunner;
|
| +class DOMStorageArea;
|
| +class DOMStorageTaskRunner;
|
| class SessionStorageDatabase;
|
|
|
| // Container for the set of per-origin Areas.
|
| -// See class comments for DomStorageContext for a larger overview.
|
| -class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageNamespace
|
| - : public base::RefCountedThreadSafe<DomStorageNamespace> {
|
| +// See class comments for DOMStorageContextImpl for a larger overview.
|
| +class CONTENT_EXPORT DOMStorageNamespace
|
| + : public base::RefCountedThreadSafe<DOMStorageNamespace> {
|
| public:
|
| // Option for PurgeMemory.
|
| enum PurgeOption {
|
| @@ -37,15 +37,15 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageNamespace
|
|
|
| // Constructor for a LocalStorage namespace with id of 0
|
| // and an optional backing directory on disk.
|
| - DomStorageNamespace(const base::FilePath& directory, // may be empty
|
| - DomStorageTaskRunner* task_runner);
|
| + DOMStorageNamespace(const base::FilePath& directory, // may be empty
|
| + DOMStorageTaskRunner* task_runner);
|
|
|
| // Constructor for a SessionStorage namespace with a non-zero id and an
|
| // optional backing on disk via |session_storage_database| (may be NULL).
|
| - DomStorageNamespace(int64 namespace_id,
|
| + DOMStorageNamespace(int64 namespace_id,
|
| const std::string& persistent_namespace_id,
|
| SessionStorageDatabase* session_storage_database,
|
| - DomStorageTaskRunner* task_runner);
|
| + DOMStorageTaskRunner* task_runner);
|
|
|
| int64 namespace_id() const { return namespace_id_; }
|
| const std::string& persistent_namespace_id() const {
|
| @@ -55,16 +55,16 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageNamespace
|
| // Returns the storage area for the given origin,
|
| // creating instance if needed. Each call to open
|
| // must be balanced with a call to CloseStorageArea.
|
| - DomStorageArea* OpenStorageArea(const GURL& origin);
|
| - void CloseStorageArea(DomStorageArea* area);
|
| + DOMStorageArea* OpenStorageArea(const GURL& origin);
|
| + void CloseStorageArea(DOMStorageArea* area);
|
|
|
| // Returns the area for |origin| if it's open, otherwise NULL.
|
| - DomStorageArea* GetOpenStorageArea(const GURL& origin);
|
| + DOMStorageArea* GetOpenStorageArea(const GURL& origin);
|
|
|
| // Creates a clone of |this| namespace including
|
| // shallow copies of all contained areas.
|
| // Should only be called for session storage namespaces.
|
| - DomStorageNamespace* Clone(int64 clone_namespace_id,
|
| + DOMStorageNamespace* Clone(int64 clone_namespace_id,
|
| const std::string& clone_persistent_namespace_id);
|
|
|
| void DeleteLocalStorageOrigin(const GURL& origin);
|
| @@ -75,20 +75,20 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageNamespace
|
| unsigned int CountInMemoryAreas() const;
|
|
|
| private:
|
| - friend class base::RefCountedThreadSafe<DomStorageNamespace>;
|
| + friend class base::RefCountedThreadSafe<DOMStorageNamespace>;
|
|
|
| // Struct to hold references to our contained areas and
|
| // to keep track of how many tabs have a given area open.
|
| struct AreaHolder {
|
| - scoped_refptr<DomStorageArea> area_;
|
| + scoped_refptr<DOMStorageArea> area_;
|
| int open_count_;
|
| AreaHolder();
|
| - AreaHolder(DomStorageArea* area, int count);
|
| + AreaHolder(DOMStorageArea* area, int count);
|
| ~AreaHolder();
|
| };
|
| typedef std::map<GURL, AreaHolder> AreaMap;
|
|
|
| - ~DomStorageNamespace();
|
| + ~DOMStorageNamespace();
|
|
|
| // Returns a pointer to the area holder in our map or NULL.
|
| AreaHolder* GetAreaHolder(const GURL& origin);
|
| @@ -97,11 +97,11 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DomStorageNamespace
|
| std::string persistent_namespace_id_;
|
| base::FilePath directory_;
|
| AreaMap areas_;
|
| - scoped_refptr<DomStorageTaskRunner> task_runner_;
|
| + scoped_refptr<DOMStorageTaskRunner> task_runner_;
|
| scoped_refptr<SessionStorageDatabase> session_storage_database_;
|
| };
|
|
|
| -} // namespace dom_storage
|
| +} // namespace content
|
|
|
|
|
| -#endif // WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
|
| +#endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
|
|
|