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

Side by Side Diff: chrome/browser/in_process_webkit/storage_namespace.h

Issue 223013: Another stab at the Chromium side of storage events. The WebKit side can be ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_STORAGE_NAMESPACE_H_ 5 #ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_STORAGE_NAMESPACE_H_
6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_STORAGE_NAMESPACE_H_ 6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_STORAGE_NAMESPACE_H_
7 7
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "chrome/common/dom_storage_type.h" 10 #include "chrome/common/dom_storage_type.h"
(...skipping 13 matching lines...) Expand all
24 DOMStorageContext* dom_storage_context, const FilePath& data_dir_path); 24 DOMStorageContext* dom_storage_context, const FilePath& data_dir_path);
25 static StorageNamespace* CreateSessionStorageNamespace( 25 static StorageNamespace* CreateSessionStorageNamespace(
26 DOMStorageContext* dom_storage_context); 26 DOMStorageContext* dom_storage_context);
27 27
28 ~StorageNamespace(); 28 ~StorageNamespace();
29 29
30 StorageArea* GetStorageArea(const string16& origin); 30 StorageArea* GetStorageArea(const string16& origin);
31 StorageNamespace* Copy(); 31 StorageNamespace* Copy();
32 void Close(); 32 void Close();
33 33
34 const DOMStorageContext* dom_storage_context() const {
35 return dom_storage_context_;
36 }
34 int64 id() const { return id_; } 37 int64 id() const { return id_; }
38 DOMStorageType dom_storage_type() const { return dom_storage_type_; }
35 39
36 private: 40 private:
37 // Called by the static factory methods above. 41 // Called by the static factory methods above.
38 StorageNamespace(DOMStorageContext* dom_storage_context, 42 StorageNamespace(DOMStorageContext* dom_storage_context,
39 WebKit::WebStorageNamespace* web_storage_namespace, 43 WebKit::WebStorageNamespace* web_storage_namespace,
40 int64 id, DOMStorageType storage_type); 44 int64 id, DOMStorageType storage_type);
41 45
42 // All the storage areas we own. 46 // All the storage areas we own.
43 typedef base::hash_map<string16, StorageArea*> OriginToStorageAreaMap; 47 typedef base::hash_map<string16, StorageArea*> OriginToStorageAreaMap;
44 OriginToStorageAreaMap origin_to_storage_area_; 48 OriginToStorageAreaMap origin_to_storage_area_;
45 49
46 // The DOMStorageContext that owns us. 50 // The DOMStorageContext that owns us.
47 DOMStorageContext* dom_storage_context_; 51 DOMStorageContext* dom_storage_context_;
48 52
49 // The WebKit storage namespace we manage. 53 // The WebKit storage namespace we manage.
50 WebKit::WebStorageNamespace* storage_namespace_; 54 WebKit::WebStorageNamespace* storage_namespace_;
51 55
52 // Our id. Unique to our parent WebKitContext class. 56 // Our id. Unique to our parent WebKitContext class.
53 int64 id_; 57 int64 id_;
54 58
55 // SessionStorage vs. LocalStorage. 59 // SessionStorage vs. LocalStorage.
56 const DOMStorageType storage_type_; 60 const DOMStorageType dom_storage_type_;
57 61
58 DISALLOW_IMPLICIT_CONSTRUCTORS(StorageNamespace); 62 DISALLOW_IMPLICIT_CONSTRUCTORS(StorageNamespace);
59 }; 63 };
60 64
61 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_STORAGE_NAMESPACE_H_ 65 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_STORAGE_NAMESPACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc ('k') | chrome/browser/in_process_webkit/storage_namespace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698