Chromium Code Reviews| Index: content/renderer/dom_storage/local_storage_area.h |
| diff --git a/content/renderer/dom_storage/local_storage_area.h b/content/renderer/dom_storage/local_storage_area.h |
| index 1da7af016e34358bcb14d505d53b49b4cd1b0fe2..bf79a41abc6e7d6087dd329b1cced0a5feb5e5eb 100644 |
| --- a/content/renderer/dom_storage/local_storage_area.h |
| +++ b/content/renderer/dom_storage/local_storage_area.h |
| @@ -6,7 +6,6 @@ |
| #define CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_AREA_H_ |
| #include "base/macros.h" |
| -#include "base/memory/ref_counted.h" |
| #include "content/renderer/dom_storage/local_storage_cached_area.h" |
| #include "third_party/WebKit/public/platform/WebStorageArea.h" |
| @@ -17,7 +16,8 @@ namespace content { |
| // for a given origin. |
| class LocalStorageArea : public blink::WebStorageArea { |
| public: |
| - explicit LocalStorageArea(scoped_refptr<LocalStorageCachedArea> cached_area); |
| + // |cached_area| outlives this object. |
| + explicit LocalStorageArea(LocalStorageCachedArea* cached_area); |
| ~LocalStorageArea() override; |
| // blink::WebStorageArea: |
| @@ -32,8 +32,13 @@ class LocalStorageArea : public blink::WebStorageArea { |
| const blink::WebURL& page_url) override; |
| void clear(const blink::WebURL& url) override; |
| + const std::string& id() const { return id_; } |
| + |
| private: |
| - scoped_refptr<LocalStorageCachedArea> cached_area_; |
| + LocalStorageCachedArea* cached_area_; |
| + // A globally unique identifier for this storage area. It's used to pass the |
| + // source storage area, if any, in mutation events. |
| + std::string id_; |
|
dcheng
2016/03/18 06:35:29
Maybe const this so it can only be bound in the co
jam
2016/03/18 16:48:33
i believe this is personal preference (i.e. nothin
|
| DISALLOW_COPY_AND_ASSIGN(LocalStorageArea); |
| }; |