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

Unified Diff: Platform/chromium/public/WebStorageArea.h

Issue 10539097: WebKit-side: Implement StorageArea::containsItem(...) for the chromium port too. Cleanup some depre… Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
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 | « no previous file | WebKit/chromium/src/StorageAreaProxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Platform/chromium/public/WebStorageArea.h
===================================================================
--- Platform/chromium/public/WebStorageArea.h (revision 119965)
+++ Platform/chromium/public/WebStorageArea.h (working copy)
@@ -59,35 +59,20 @@
// no entry for that key.
virtual WebString getItem(const WebString& key) = 0;
+ // Returns |true| if the the area contains a value that corresponds to |key|.
+ virtual bool containsItem(const WebString& key) { return !getItem(key).isNull(); }
+
// Set the value that corresponds to a specific key. Result will either be ResultOK
// or some particular error. The value is NOT set when there's an error. |pageUrl| is the
// url that should be used if a storage event fires.
- virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& pageUrl, Result& result)
- {
- WebString unused;
- setItem(key, newValue, pageUrl, result, unused);
- }
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& pageUrl, Result& result) { }
-
// Remove the value associated with a particular key. |pageUrl| is the url that should be used
// if a storage event fires.
- virtual void removeItem(const WebString& key, const WebURL& pageUrl)
- {
- WebString unused;
- removeItem(key, pageUrl, unused);
- }
+ virtual void removeItem(const WebString& key, const WebURL& pageUrl) { }
// Clear all key/value pairs. |pageUrl| is the url that should be used if a storage event fires.
- virtual void clear(const WebURL& pageUrl)
- {
- bool unused;
- clear(pageUrl, unused);
- }
-
- // DEPRECATED - being replaced by the async variants above which do not return oldValues or block until completion.
- virtual void setItem(const WebString& key, const WebString& newValue, const WebURL&, Result&, WebString& oldValue) { }
- virtual void removeItem(const WebString& key, const WebURL& pageUrl, WebString& oldValue) { }
- virtual void clear(const WebURL& pageUrl, bool& somethingCleared) { }
+ virtual void clear(const WebURL& pageUrl) { }
};
} // namespace WebKit
« no previous file with comments | « no previous file | WebKit/chromium/src/StorageAreaProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698