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

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

Issue 12398008: Purge in-memory localStorage areas if the # of areas exceeds the limit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebStorageArea.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebStorageArea.h"
(...skipping 19 matching lines...) Expand all
30 virtual WebKit::WebString key(unsigned index); 30 virtual WebKit::WebString key(unsigned index);
31 virtual WebKit::WebString getItem(const WebKit::WebString& key); 31 virtual WebKit::WebString getItem(const WebKit::WebString& key);
32 virtual void setItem( 32 virtual void setItem(
33 const WebKit::WebString& key, const WebKit::WebString& value, 33 const WebKit::WebString& key, const WebKit::WebString& value,
34 const WebKit::WebURL& page_url, WebStorageArea::Result& result); 34 const WebKit::WebURL& page_url, WebStorageArea::Result& result);
35 virtual void removeItem( 35 virtual void removeItem(
36 const WebKit::WebString& key, const WebKit::WebURL& page_url); 36 const WebKit::WebString& key, const WebKit::WebURL& page_url);
37 virtual void clear(const WebKit::WebURL& url); 37 virtual void clear(const WebKit::WebURL& url);
38 virtual size_t memoryBytesUsedByCache() const; 38 virtual size_t memoryBytesUsedByCache() const;
39 39
40 dom_storage::DomStorageCachedArea* cached_area() {
41 return cached_area_.get();
42 }
43
40 private: 44 private:
41 int connection_id_; 45 int connection_id_;
42 scoped_refptr<dom_storage::DomStorageCachedArea> cached_area_; 46 scoped_refptr<dom_storage::DomStorageCachedArea> cached_area_;
43 }; 47 };
44 48
45 } // namespace content 49 } // namespace content
46 50
47 #endif // CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ 51 #endif // CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698