| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_ | 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_ |
| 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_ | 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "content/common/dom_storage_common.h" | 12 #include "content/common/dom_storage_common.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
| 14 | 14 |
| 15 class DOMStorageArea; | 15 class DOMStorageArea; |
| 16 class DOMStorageContext; | 16 class DOMStorageContext; |
| 17 class FilePath; | 17 class FilePath; |
| 18 class HostContentSettingsMap; | |
| 19 | 18 |
| 20 namespace WebKit { | 19 namespace WebKit { |
| 21 class WebStorageArea; | 20 class WebStorageArea; |
| 22 class WebStorageNamespace; | 21 class WebStorageNamespace; |
| 23 } | 22 } |
| 24 | 23 |
| 25 // Only to be used on the WebKit thread. | 24 // Only to be used on the WebKit thread. |
| 26 class DOMStorageNamespace { | 25 class DOMStorageNamespace { |
| 27 public: | 26 public: |
| 28 static DOMStorageNamespace* CreateLocalStorageNamespace( | 27 static DOMStorageNamespace* CreateLocalStorageNamespace( |
| 29 DOMStorageContext* dom_storage_context, const FilePath& data_dir_path); | 28 DOMStorageContext* dom_storage_context, const FilePath& data_dir_path); |
| 30 static DOMStorageNamespace* CreateSessionStorageNamespace( | 29 static DOMStorageNamespace* CreateSessionStorageNamespace( |
| 31 DOMStorageContext* dom_storage_context, int64 namespace_id); | 30 DOMStorageContext* dom_storage_context, int64 namespace_id); |
| 32 | 31 |
| 33 ~DOMStorageNamespace(); | 32 ~DOMStorageNamespace(); |
| 34 | 33 |
| 35 DOMStorageArea* GetStorageArea(const string16& origin, | 34 DOMStorageArea* GetStorageArea(const string16& origin); |
| 36 HostContentSettingsMap* map); | |
| 37 DOMStorageNamespace* Copy(int64 clone_namespace_id); | 35 DOMStorageNamespace* Copy(int64 clone_namespace_id); |
| 38 | 36 |
| 39 void PurgeMemory(); | 37 void PurgeMemory(); |
| 40 | 38 |
| 41 const DOMStorageContext* dom_storage_context() const { | 39 const DOMStorageContext* dom_storage_context() const { |
| 42 return dom_storage_context_; | 40 return dom_storage_context_; |
| 43 } | 41 } |
| 44 int64 id() const { return id_; } | 42 int64 id() const { return id_; } |
| 45 const WebKit::WebString& data_dir_path() const { return data_dir_path_; } | 43 const WebKit::WebString& data_dir_path() const { return data_dir_path_; } |
| 46 DOMStorageType dom_storage_type() const { return dom_storage_type_; } | 44 DOMStorageType dom_storage_type() const { return dom_storage_type_; } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 76 // demand. | 74 // demand. |
| 77 WebKit::WebString data_dir_path_; | 75 WebKit::WebString data_dir_path_; |
| 78 | 76 |
| 79 // SessionStorage vs. LocalStorage. | 77 // SessionStorage vs. LocalStorage. |
| 80 const DOMStorageType dom_storage_type_; | 78 const DOMStorageType dom_storage_type_; |
| 81 | 79 |
| 82 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageNamespace); | 80 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageNamespace); |
| 83 }; | 81 }; |
| 84 | 82 |
| 85 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_ | 83 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_NAMESPACE_H_ |
| OLD | NEW |