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

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

Issue 10408049: Fixup SimpleDomStorageSystem to no longer use obsolete WebKit API that required returns of previous… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 | « no previous file | 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 138129)
+++ webkit/tools/test_shell/simple_dom_storage_system.cc (working copy)
@@ -58,10 +58,10 @@
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 @@
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 -----------------------------
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698