Commit e60bf859 authored by michaeln@google.com's avatar michaeln@google.com

Fixup SimpleDomStorageSystem to no longer use obsolete WebKit API that...

Fixup SimpleDomStorageSystem to no longer use obsolete WebKit API that requires mutators to return previous values. See http://trac.webkit.org/changeset/117797 for details on the API change.
Review URL: https://chromiumcodereview.appspot.com/10408049

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138335 0039d316-1c4b-4281-b951-d872f2087c98
parent 71a0c6be
......@@ -58,10 +58,10 @@ class SimpleDomStorageSystem::AreaImpl : public WebStorageArea {
virtual WebString key(unsigned index) OVERRIDE;
virtual WebString getItem(const WebString& key) OVERRIDE;
virtual void setItem(const WebString& key, const WebString& newValue,
const WebURL&, Result&, WebString& oldValue) OVERRIDE;
virtual void removeItem(const WebString& key, const WebURL& url,
WebString& oldValue) OVERRIDE;
virtual void clear(const WebURL& url, bool& somethingCleared) OVERRIDE;
const WebURL& pageUrl, Result&) OVERRIDE;
virtual void removeItem(const WebString& key,
const WebURL& pageUrl) OVERRIDE;
virtual void clear(const WebURL& pageUrl) OVERRIDE;
private:
DomStorageHost* Host() {
......@@ -156,44 +156,36 @@ WebString SimpleDomStorageSystem::AreaImpl::getItem(const WebString& key) {
void SimpleDomStorageSystem::AreaImpl::setItem(
const WebString& key, const WebString& newValue,
const WebURL& pageUrl, Result& result, WebString& oldValue) {
const WebURL& pageUrl, Result& result) {
result = ResultBlockedByQuota;
oldValue = NullableString16(true);
if (!Host())
return;
AutoReset<AreaImpl*> auto_reset(&parent_->area_being_processed_, this);
NullableString16 old_value;
NullableString16 unused;
if (!Host()->SetAreaItem(connection_id_, key, newValue, pageUrl,
&old_value))
&unused))
return;
result = ResultOK;
oldValue = old_value;
}
void SimpleDomStorageSystem::AreaImpl::removeItem(
const WebString& key, const WebURL& pageUrl, WebString& oldValue) {
oldValue = NullableString16(true);
const WebString& key, const WebURL& pageUrl) {
if (!Host())
return;
AutoReset<AreaImpl*> auto_reset(&parent_->area_being_processed_, this);
string16 old_value;
if (!Host()->RemoveAreaItem(connection_id_, key, pageUrl, &old_value))
return;
oldValue = old_value;
string16 notused;
Host()->RemoveAreaItem(connection_id_, key, pageUrl, &notused);
}
void SimpleDomStorageSystem::AreaImpl::clear(
const WebURL& pageUrl, bool& somethingCleared) {
if (Host()) {
AutoReset<AreaImpl*> auto_reset(&parent_->area_being_processed_, this);
somethingCleared = Host()->ClearArea(connection_id_, pageUrl);
void SimpleDomStorageSystem::AreaImpl::clear(const WebURL& pageUrl) {
if (!Host())
return;
}
somethingCleared = false;
AutoReset<AreaImpl*> auto_reset(&parent_->area_being_processed_, this);
Host()->ClearArea(connection_id_, pageUrl);
}
// SimpleDomStorageSystem -----------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment