Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: content/renderer/dom_storage/webstoragearea_impl.h

Issue 10383123: Switch to using the async DomStorage IPC messages and add a caching layer … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ 5 #ifndef CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
6 #define CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ 6 #define CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
12 13
13 class GURL; 14 class GURL;
14 15
16 namespace dom_storage {
17 class DomStorageCachedArea;
18 }
19
15 class WebStorageAreaImpl : public WebKit::WebStorageArea { 20 class WebStorageAreaImpl : public WebKit::WebStorageArea {
16 public: 21 public:
17 static WebStorageAreaImpl* FromConnectionId(int id); 22 static WebStorageAreaImpl* FromConnectionId(int id);
18 23
19 WebStorageAreaImpl(int64 namespace_id, const GURL& origin); 24 WebStorageAreaImpl(int64 namespace_id, const GURL& origin);
20 virtual ~WebStorageAreaImpl(); 25 virtual ~WebStorageAreaImpl();
21 26
22 // See WebStorageArea.h for documentation on these functions. 27 // See WebStorageArea.h for documentation on these functions.
23 virtual unsigned length(); 28 virtual unsigned length();
24 virtual WebKit::WebString key(unsigned index); 29 virtual WebKit::WebString key(unsigned index);
25 virtual WebKit::WebString getItem(const WebKit::WebString& key); 30 virtual WebKit::WebString getItem(const WebKit::WebString& key);
26 virtual void setItem( 31 virtual void setItem(
27 const WebKit::WebString& key, const WebKit::WebString& value, 32 const WebKit::WebString& key, const WebKit::WebString& value,
28 const WebKit::WebURL& url, WebStorageArea::Result& result, 33 const WebKit::WebURL& page_url, WebStorageArea::Result& result);
29 WebKit::WebString& old_value);
30 virtual void removeItem( 34 virtual void removeItem(
31 const WebKit::WebString& key, const WebKit::WebURL& url, 35 const WebKit::WebString& key, const WebKit::WebURL& page_url);
32 WebKit::WebString& old_value); 36 virtual void clear(const WebKit::WebURL& url);
33 virtual void clear(const WebKit::WebURL& url, bool& cleared_something);
34 37
35 private: 38 private:
36 int connection_id_; 39 int connection_id_;
40 scoped_refptr<dom_storage::DomStorageCachedArea> cached_area_;
37 }; 41 };
38 42
39 #endif // CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ 43 #endif // CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/dom_storage/dom_storage_dispatcher.cc ('k') | content/renderer/dom_storage/webstoragearea_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698