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 WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_ | 5 #ifndef WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
6 #define WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_ | 6 #define WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/nullable_string16.h" | 12 #include "base/strings/nullable_string16.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 #include "webkit/common/dom_storage/dom_storage_types.h" | 15 #include "webkit/common/dom_storage/dom_storage_types.h" |
16 #include "webkit/storage/webkit_storage_export.h" | 16 #include "webkit/storage/webkit_storage_export.h" |
17 | 17 |
18 namespace dom_storage { | 18 namespace dom_storage { |
19 | 19 |
20 class DomStorageDatabaseAdapter; | 20 class DomStorageDatabaseAdapter; |
21 class DomStorageMap; | 21 class DomStorageMap; |
22 class DomStorageTaskRunner; | 22 class DomStorageTaskRunner; |
(...skipping 22 matching lines...) Expand all Loading... |
45 SessionStorageDatabase* session_storage_backing, | 45 SessionStorageDatabase* session_storage_backing, |
46 DomStorageTaskRunner* task_runner); | 46 DomStorageTaskRunner* task_runner); |
47 | 47 |
48 const GURL& origin() const { return origin_; } | 48 const GURL& origin() const { return origin_; } |
49 int64 namespace_id() const { return namespace_id_; } | 49 int64 namespace_id() const { return namespace_id_; } |
50 | 50 |
51 // Writes a copy of the current set of values in the area to the |map|. | 51 // Writes a copy of the current set of values in the area to the |map|. |
52 void ExtractValues(ValuesMap* map); | 52 void ExtractValues(ValuesMap* map); |
53 | 53 |
54 unsigned Length(); | 54 unsigned Length(); |
55 NullableString16 Key(unsigned index); | 55 base::NullableString16 Key(unsigned index); |
56 NullableString16 GetItem(const base::string16& key); | 56 base::NullableString16 GetItem(const base::string16& key); |
57 bool SetItem(const base::string16& key, const base::string16& value, | 57 bool SetItem(const base::string16& key, const base::string16& value, |
58 NullableString16* old_value); | 58 base::NullableString16* old_value); |
59 bool RemoveItem(const base::string16& key, base::string16* old_value); | 59 bool RemoveItem(const base::string16& key, base::string16* old_value); |
60 bool Clear(); | 60 bool Clear(); |
61 void FastClear(); | 61 void FastClear(); |
62 | 62 |
63 DomStorageArea* ShallowCopy( | 63 DomStorageArea* ShallowCopy( |
64 int64 destination_namespace_id, | 64 int64 destination_namespace_id, |
65 const std::string& destination_persistent_namespace_id); | 65 const std::string& destination_persistent_namespace_id); |
66 | 66 |
67 bool HasUncommittedChanges() const; | 67 bool HasUncommittedChanges() const; |
68 | 68 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 scoped_refptr<SessionStorageDatabase> session_storage_backing_; | 129 scoped_refptr<SessionStorageDatabase> session_storage_backing_; |
130 bool is_initial_import_done_; | 130 bool is_initial_import_done_; |
131 bool is_shutdown_; | 131 bool is_shutdown_; |
132 scoped_ptr<CommitBatch> commit_batch_; | 132 scoped_ptr<CommitBatch> commit_batch_; |
133 int commit_batches_in_flight_; | 133 int commit_batches_in_flight_; |
134 }; | 134 }; |
135 | 135 |
136 } // namespace dom_storage | 136 } // namespace dom_storage |
137 | 137 |
138 #endif // WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_ | 138 #endif // WEBKIT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
OLD | NEW |