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

Unified Diff: Source/WebKit/chromium/public/WebStorageArea.h

Issue 10377148: Revert 116712 - Source/WebCore: [chromium] DomStorage events handling needs TLC (2) (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1137/
Patch Set: Created 8 years, 7 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 | « Source/WebKit/chromium/WebKit.gyp ('k') | Source/WebKit/chromium/public/WebStorageEventDispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/public/WebStorageArea.h
===================================================================
--- Source/WebKit/chromium/public/WebStorageArea.h (revision 117067)
+++ Source/WebKit/chromium/public/WebStorageArea.h (working copy)
@@ -38,6 +38,9 @@
class WebURL;
+// In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This
+// class wraps a StorageArea. All the methods have obvious connections to the spec:
+// http://dev.w3.org/html5/webstorage/
class WebStorageArea {
public:
virtual ~WebStorageArea() { }
@@ -60,34 +63,16 @@
virtual WebString getItem(const WebString& key) = 0;
// 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
+ // or some particular error. The value is NOT set when there's an error. url 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&, Result&, WebString& oldValue) = 0;
-
- // Remove the value associated with a particular key. |pageUrl| is the url that should be used
+ // Remove the value associated with a particular key. url 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& url, WebString& oldValue) = 0;
- // 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) = 0;
- virtual void removeItem(const WebString& key, const WebURL& pageUrl, WebString& oldValue) = 0;
- virtual void clear(const WebURL& pageUrl, bool& somethingCleared) = 0;
+ // Clear all key/value pairs. url is the url that should be used if a storage event fires.
+ virtual void clear(const WebURL& url, bool& somethingCleared) = 0;
};
} // namespace WebKit
« no previous file with comments | « Source/WebKit/chromium/WebKit.gyp ('k') | Source/WebKit/chromium/public/WebStorageEventDispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698