| 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 "content/common/leveldb_wrapper.mojom.h" | 9 #include "content/common/leveldb_wrapper.mojom.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 unsigned length() override; | 29 unsigned length() override; |
| 30 blink::WebString key(unsigned index) override; | 30 blink::WebString key(unsigned index) override; |
| 31 blink::WebString getItem(const blink::WebString& key) override; | 31 blink::WebString getItem(const blink::WebString& key) override; |
| 32 void setItem(const blink::WebString& key, | 32 void setItem(const blink::WebString& key, |
| 33 const blink::WebString& value, | 33 const blink::WebString& value, |
| 34 const blink::WebURL& page_url, | 34 const blink::WebURL& page_url, |
| 35 WebStorageArea::Result& result) override; | 35 WebStorageArea::Result& result) override; |
| 36 void removeItem(const blink::WebString& key, | 36 void removeItem(const blink::WebString& key, |
| 37 const blink::WebURL& page_url) override; | 37 const blink::WebURL& page_url) override; |
| 38 void clear(const blink::WebURL& url) override; | 38 void clear(const blink::WebURL& url) override; |
| 39 size_t memoryBytesUsedByCache() const override; | |
| 40 | 39 |
| 41 // LevelDBObserver: | 40 // LevelDBObserver: |
| 42 void KeyChanged(mojo::Array<uint8_t> key, | 41 void KeyChanged(mojo::Array<uint8_t> key, |
| 43 mojo::Array<uint8_t> new_value, | 42 mojo::Array<uint8_t> new_value, |
| 44 mojo::Array<uint8_t> old_value, | 43 mojo::Array<uint8_t> old_value, |
| 45 const mojo::String& source) override; | 44 const mojo::String& source) override; |
| 46 void KeyDeleted(mojo::Array<uint8_t> key, | 45 void KeyDeleted(mojo::Array<uint8_t> key, |
| 47 const mojo::String& source) override; | 46 const mojo::String& source) override; |
| 48 void AllDeleted(const mojo::String& source) override; | 47 void AllDeleted(const mojo::String& source) override; |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 url::Origin origin_; | 50 url::Origin origin_; |
| 52 LevelDBWrapperPtr leveldb_; | 51 LevelDBWrapperPtr leveldb_; |
| 53 mojo::Binding<LevelDBObserver> binding_; | 52 mojo::Binding<LevelDBObserver> binding_; |
| 54 | 53 |
| 55 DISALLOW_COPY_AND_ASSIGN(LocalStorageArea); | 54 DISALLOW_COPY_AND_ASSIGN(LocalStorageArea); |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 } // namespace content | 57 } // namespace content |
| 59 | 58 |
| 60 #endif // CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_AREA_H_ | 59 #endif // CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_AREA_H_ |
| OLD | NEW |