|
OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_MAP_H_ | |
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_MAP_H_ | |
7 #pragma once | |
8 | |
9 #include <map> | |
10 | |
11 #include "base/memory/ref_counted.h" | |
12 #include "base/nullable_string16.h" | |
13 #include "base/string16.h" | |
14 | |
15 class FilePath; | |
16 class GURL; | |
17 | |
18 namespace dom_storage { | |
19 | |
20 class DomStorageMap | |
benm (inactive)
2012/02/02 16:23:19
This looks very similar to the DomStorageArea CL I
michaeln
2012/02/03 00:33:42
Ack about the 'area' being responsible for reading
| |
21 : public base::RefCountedThreadSafe<DomStorageMap> { | |
22 public: | |
23 unsigned Length(); | |
24 NullableString16 Key(unsigned index); | |
25 NullableString16 GetItem(const string16& key); | |
26 bool SetItem(const string16& key, const string16& value, | |
27 NullableString16* old_value); | |
28 bool RemoveItem(const string16& key, string16* old_value); | |
29 | |
30 DomStorageMap* DeepCopy(); | |
31 | |
benm (inactive)
2012/02/02 16:23:19
The way that the DomStorageDatabase is set up righ
michaeln
2012/02/03 00:33:42
Done, added a SwapValues(values_map) method.
| |
32 private: | |
33 friend class base::RefCountedThreadSafe<DomStorageMap>; | |
34 typedef std::map<string16, NullableString16> ValuesMap; | |
35 | |
36 ~DomStorageMap() {} | |
37 | |
38 ValuesMap values_; | |
39 }; | |
40 | |
41 } // namespace dom_storage | |
42 | |
43 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ | |
OLD | NEW |