OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_DOM_STORAGE_DOM_STORAGE_CACHED_AREA_H_ | 5 #ifndef CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_CACHED_AREA_H_ |
6 #define CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_CACHED_AREA_H_ | 6 #define CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_CACHED_AREA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/strings/nullable_string16.h" | 12 #include "base/strings/nullable_string16.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace dom_storage { | 16 namespace content { |
17 class DomStorageMap; | 17 class DOMStorageMap; |
jam
2013/08/06 16:13:49
nit: just move this to line 22
kinuko
2013/08/07 14:29:52
Done.
| |
18 } | 18 } |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 class DomStorageProxy; | 22 class DomStorageProxy; |
23 | 23 |
24 // Unlike the other classes in the dom_storage library, this one is intended | 24 // Unlike the other classes in the dom_storage library, this one is intended |
25 // for use in renderer processes. It maintains a complete cache of the | 25 // for use in renderer processes. It maintains a complete cache of the |
26 // origin's Map of key/value pairs for fast access. The cache is primed on | 26 // origin's Map of key/value pairs for fast access. The cache is primed on |
27 // first access and changes are written to the backend thru the |proxy|. | 27 // first access and changes are written to the backend thru the |proxy|. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 | 80 |
81 bool should_ignore_key_mutation(const base::string16& key) const { | 81 bool should_ignore_key_mutation(const base::string16& key) const { |
82 return ignore_key_mutations_.find(key) != ignore_key_mutations_.end(); | 82 return ignore_key_mutations_.find(key) != ignore_key_mutations_.end(); |
83 } | 83 } |
84 | 84 |
85 bool ignore_all_mutations_; | 85 bool ignore_all_mutations_; |
86 std::map<base::string16, int> ignore_key_mutations_; | 86 std::map<base::string16, int> ignore_key_mutations_; |
87 | 87 |
88 int64 namespace_id_; | 88 int64 namespace_id_; |
89 GURL origin_; | 89 GURL origin_; |
90 scoped_refptr<dom_storage::DomStorageMap> map_; | 90 scoped_refptr<DOMStorageMap> map_; |
91 scoped_refptr<DomStorageProxy> proxy_; | 91 scoped_refptr<DomStorageProxy> proxy_; |
92 base::WeakPtrFactory<DomStorageCachedArea> weak_factory_; | 92 base::WeakPtrFactory<DomStorageCachedArea> weak_factory_; |
93 }; | 93 }; |
94 | 94 |
95 } // namespace content | 95 } // namespace content |
96 | 96 |
97 #endif // CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_CACHED_AREA_H_ | 97 #endif // CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_CACHED_AREA_H_ |
OLD | NEW |