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

Unified Diff: content/browser/in_process_webkit/dom_storage_namespace.h

Issue 10086018: More DomStorage house cleaning (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/in_process_webkit/dom_storage_namespace.h
===================================================================
--- content/browser/in_process_webkit/dom_storage_namespace.h (revision 132437)
+++ content/browser/in_process_webkit/dom_storage_namespace.h (working copy)
@@ -1,91 +0,0 @@
-// Copyright (c) 2011 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 CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_
-#define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_
-#pragma once
-
-#include "base/hash_tables.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/string16.h"
-#include "content/common/dom_storage_common.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
-#include "webkit/dom_storage/dom_storage_types.h"
-
-#ifdef ENABLE_NEW_DOM_STORAGE_BACKEND
-// This class is no longer applicable.
-#else
-
-class DOMStorageArea;
-class DOMStorageContextImpl;
-class FilePath;
-
-namespace WebKit {
-class WebStorageArea;
-class WebStorageNamespace;
-}
-
-// Only to be used on the WebKit thread.
-class DOMStorageNamespace {
- public:
- static DOMStorageNamespace* CreateLocalStorageNamespace(
- DOMStorageContextImpl* dom_storage_context,
- const FilePath& data_dir_path);
- static DOMStorageNamespace* CreateSessionStorageNamespace(
- DOMStorageContextImpl* dom_storage_context, int64 namespace_id);
-
- ~DOMStorageNamespace();
-
- DOMStorageArea* GetStorageArea(const string16& origin);
- DOMStorageNamespace* Copy(int64 clone_namespace_id);
-
- void PurgeMemory();
-
- const DOMStorageContextImpl* dom_storage_context() const {
- return dom_storage_context_;
- }
- int64 id() const { return id_; }
- const WebKit::WebString& data_dir_path() const { return data_dir_path_; }
- DOMStorageType dom_storage_type() const { return dom_storage_type_; }
-
- // Creates a WebStorageArea for the given origin. This should only be called
- // by an owned DOMStorageArea.
- WebKit::WebStorageArea* CreateWebStorageArea(const string16& origin);
-
- private:
- // Called by the static factory methods above.
- DOMStorageNamespace(DOMStorageContextImpl* dom_storage_context,
- int64 id,
- const WebKit::WebString& data_dir_path,
- DOMStorageType storage_type);
-
- // Creates the underlying WebStorageNamespace on demand.
- void CreateWebStorageNamespaceIfNecessary();
-
- // All the storage areas we own.
- typedef base::hash_map<string16, DOMStorageArea*> OriginToStorageAreaMap;
- OriginToStorageAreaMap origin_to_storage_area_;
-
- // The DOMStorageContext that owns us.
- DOMStorageContextImpl* dom_storage_context_;
-
- // The WebKit storage namespace we manage.
- scoped_ptr<WebKit::WebStorageNamespace> storage_namespace_;
-
- // Our id. Unique to our parent DOMStorageContext class.
- int64 id_;
-
- // The path used to create us, so we can recreate our WebStorageNamespace on
- // demand.
- WebKit::WebString data_dir_path_;
-
- // SessionStorage vs. LocalStorage.
- const DOMStorageType dom_storage_type_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageNamespace);
-};
-
-#endif // ENABLE_NEW_DOM_STORAGE_BACKEND
-#endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_
-

Powered by Google App Engine
This is Rietveld 408576698