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

Unified Diff: webkit/tools/test_shell/simple_dom_storage_system.cc

Issue 10533093: Implement WebStorageArea::containsItem(key) in chrome and drt/test_shell. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/dom_storage/dom_storage_map.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/simple_dom_storage_system.cc
===================================================================
--- webkit/tools/test_shell/simple_dom_storage_system.cc (revision 141450)
+++ webkit/tools/test_shell/simple_dom_storage_system.cc (working copy)
@@ -54,14 +54,15 @@
AreaImpl(const base::WeakPtr<SimpleDomStorageSystem>& parent,
int namespace_id, const GURL& origin);
virtual ~AreaImpl();
- virtual unsigned length() OVERRIDE;
jochen (gone - plz use gerrit) 2012/06/25 15:21:26 just wondering, why did you remove the OVERRIDEs?
- virtual WebString key(unsigned index) OVERRIDE;
- virtual WebString getItem(const WebString& key) OVERRIDE;
+ virtual unsigned length();
+ virtual WebString key(unsigned index);
+ virtual WebString getItem(const WebString& key);
+ virtual bool containsItem(const WebString& key);
virtual void setItem(const WebString& key, const WebString& newValue,
- const WebURL& pageUrl, Result&) OVERRIDE;
+ const WebURL& pageUrl, Result&);
virtual void removeItem(const WebString& key,
- const WebURL& pageUrl) OVERRIDE;
- virtual void clear(const WebURL& pageUrl) OVERRIDE;
+ const WebURL& pageUrl);
+ virtual void clear(const WebURL& pageUrl);
private:
DomStorageHost* Host() {
@@ -154,6 +155,10 @@
return NullableString16(true);
}
+bool SimpleDomStorageSystem::AreaImpl::containsItem(const WebString& key) {
+ return !getItem(key).isNull();
+}
+
void SimpleDomStorageSystem::AreaImpl::setItem(
const WebString& key, const WebString& newValue,
const WebURL& pageUrl, Result& result) {
« no previous file with comments | « webkit/dom_storage/dom_storage_map.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698