| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_ | 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_ |
| 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_ | 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 const string16& key, const string16& value, | 32 const string16& key, const string16& value, |
| 33 WebKit::WebStorageArea::Result* result); | 33 WebKit::WebStorageArea::Result* result); |
| 34 NullableString16 RemoveItem(const string16& key); | 34 NullableString16 RemoveItem(const string16& key); |
| 35 bool Clear(); | 35 bool Clear(); |
| 36 void PurgeMemory(); | 36 void PurgeMemory(); |
| 37 | 37 |
| 38 int64 id() const { return id_; } | 38 int64 id() const { return id_; } |
| 39 | 39 |
| 40 DOMStorageNamespace* owner() const { return owner_; } | 40 DOMStorageNamespace* owner() const { return owner_; } |
| 41 | 41 |
| 42 void CopyDataTo(DOMStorageArea* other); |
| 43 |
| 42 private: | 44 private: |
| 43 // Creates the underlying WebStorageArea on demand. | 45 // Creates the underlying WebStorageArea on demand. |
| 44 void CreateWebStorageAreaIfNecessary(); | 46 void CreateWebStorageAreaIfNecessary(); |
| 45 | 47 |
| 46 // The origin this storage area represents. | 48 // The origin this storage area represents. |
| 47 string16 origin_; | 49 string16 origin_; |
| 48 GURL origin_url_; | 50 GURL origin_url_; |
| 49 | 51 |
| 50 // The storage area we wrap. | 52 // The storage area we wrap. |
| 51 scoped_ptr<WebKit::WebStorageArea> storage_area_; | 53 scoped_ptr<WebKit::WebStorageArea> storage_area_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 66 struct hash<DOMStorageArea*> { | 68 struct hash<DOMStorageArea*> { |
| 67 std::size_t operator()(DOMStorageArea* const& p) const { | 69 std::size_t operator()(DOMStorageArea* const& p) const { |
| 68 return reinterpret_cast<std::size_t>(p); | 70 return reinterpret_cast<std::size_t>(p); |
| 69 } | 71 } |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 } // namespace __gnu_cxx | 74 } // namespace __gnu_cxx |
| 73 #endif | 75 #endif |
| 74 | 76 |
| 75 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_ | 77 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_ |
| OLD | NEW |