| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_LOCAL_STORAGE_AREA_H_ | 5 #ifndef CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_AREA_H_ |
| 6 #define CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_AREA_H_ | 6 #define CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_AREA_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/renderer/dom_storage/local_storage_cached_area.h" | 10 #include "content/renderer/dom_storage/local_storage_cached_area.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 blink::WebString key(unsigned index) override; | 25 blink::WebString key(unsigned index) override; |
| 26 blink::WebString getItem(const blink::WebString& key) override; | 26 blink::WebString getItem(const blink::WebString& key) override; |
| 27 void setItem(const blink::WebString& key, | 27 void setItem(const blink::WebString& key, |
| 28 const blink::WebString& value, | 28 const blink::WebString& value, |
| 29 const blink::WebURL& page_url, | 29 const blink::WebURL& page_url, |
| 30 WebStorageArea::Result& result) override; | 30 WebStorageArea::Result& result) override; |
| 31 void removeItem(const blink::WebString& key, | 31 void removeItem(const blink::WebString& key, |
| 32 const blink::WebURL& page_url) override; | 32 const blink::WebURL& page_url) override; |
| 33 void clear(const blink::WebURL& url) override; | 33 void clear(const blink::WebURL& url) override; |
| 34 | 34 |
| 35 const std::string& id() const { return id_; } |
| 36 |
| 35 private: | 37 private: |
| 36 scoped_refptr<LocalStorageCachedArea> cached_area_; | 38 scoped_refptr<LocalStorageCachedArea> cached_area_; |
| 39 // A globally unique identifier for this storage area. It's used to pass the |
| 40 // source storage area, if any, in mutation events. |
| 41 std::string id_; |
| 37 | 42 |
| 38 DISALLOW_COPY_AND_ASSIGN(LocalStorageArea); | 43 DISALLOW_COPY_AND_ASSIGN(LocalStorageArea); |
| 39 }; | 44 }; |
| 40 | 45 |
| 41 } // namespace content | 46 } // namespace content |
| 42 | 47 |
| 43 #endif // CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_AREA_H_ | 48 #endif // CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_AREA_H_ |
| OLD | NEW |