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 |