| 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_DOM_STORAGE_DOM_STORAGE_AREA_H_ | 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
| 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ | 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 static GURL OriginFromDatabaseFileName(const FilePath& file_name); | 32 static GURL OriginFromDatabaseFileName(const FilePath& file_name); |
| 33 | 33 |
| 34 DomStorageArea(int64 namespace_id, | 34 DomStorageArea(int64 namespace_id, |
| 35 const GURL& origin, | 35 const GURL& origin, |
| 36 const FilePath& directory, | 36 const FilePath& directory, |
| 37 DomStorageTaskRunner* task_runner); | 37 DomStorageTaskRunner* task_runner); |
| 38 | 38 |
| 39 const GURL& origin() const { return origin_; } | 39 const GURL& origin() const { return origin_; } |
| 40 int64 namespace_id() const { return namespace_id_; } | 40 int64 namespace_id() const { return namespace_id_; } |
| 41 | 41 |
| 42 // Writes a copy of the current set of values in the area to the |map|. |
| 43 void ExtractValues(ValuesMap* map); |
| 44 |
| 42 unsigned Length(); | 45 unsigned Length(); |
| 43 NullableString16 Key(unsigned index); | 46 NullableString16 Key(unsigned index); |
| 44 NullableString16 GetItem(const string16& key); | 47 NullableString16 GetItem(const string16& key); |
| 45 bool SetItem(const string16& key, const string16& value, | 48 bool SetItem(const string16& key, const string16& value, |
| 46 NullableString16* old_value); | 49 NullableString16* old_value); |
| 47 bool RemoveItem(const string16& key, string16* old_value); | 50 bool RemoveItem(const string16& key, string16* old_value); |
| 48 bool Clear(); | 51 bool Clear(); |
| 49 | 52 |
| 50 DomStorageArea* ShallowCopy(int64 destination_namespace_id); | 53 DomStorageArea* ShallowCopy(int64 destination_namespace_id); |
| 51 | 54 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 scoped_ptr<DomStorageDatabase> backing_; | 111 scoped_ptr<DomStorageDatabase> backing_; |
| 109 bool is_initial_import_done_; | 112 bool is_initial_import_done_; |
| 110 bool is_shutdown_; | 113 bool is_shutdown_; |
| 111 scoped_ptr<CommitBatch> commit_batch_; | 114 scoped_ptr<CommitBatch> commit_batch_; |
| 112 scoped_ptr<CommitBatch> in_flight_commit_batch_; | 115 scoped_ptr<CommitBatch> in_flight_commit_batch_; |
| 113 }; | 116 }; |
| 114 | 117 |
| 115 } // namespace dom_storage | 118 } // namespace dom_storage |
| 116 | 119 |
| 117 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ | 120 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
| OLD | NEW |