diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-26 01:24:00 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-26 01:24:00 +0000 |
commit | 345ff2294048cf8e5d3854f2ac42ab8feea3d9fb (patch) | |
tree | f9fbe36f9e77ef369720d781b2a41db27c2c9392 /webkit/dom_storage | |
parent | 95050bbe16fe8201d69b0c4b48cc2f48efe1d442 (diff) | |
download | chromium_src-345ff2294048cf8e5d3854f2ac42ab8feea3d9fb.zip chromium_src-345ff2294048cf8e5d3854f2ac42ab8feea3d9fb.tar.gz chromium_src-345ff2294048cf8e5d3854f2ac42ab8feea3d9fb.tar.bz2 |
Switch chrome and chromiumDRT over to using the new WebKit API for dispatching
events into webkit/webcore. This also includes informing DomStorageContext
EventObservers of session storage mutations too since we're switching to handling
them in the same way as local storage events.
Note: This is patch 2 of a multi-sided affair. The new event handling won't be fully
turned on until patch 3 on the webkit side. Here's patch 1...
https://bugs.webkit.org/show_bug.cgi?id=84387
BUG=94382
Review URL: https://chromiumcodereview.appspot.com/10201010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/dom_storage')
-rw-r--r-- | webkit/dom_storage/dom_storage_context.h | 2 | ||||
-rw-r--r-- | webkit/dom_storage/dom_storage_host.cc | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/webkit/dom_storage/dom_storage_context.h b/webkit/dom_storage/dom_storage_context.h index 3bcc6ca..ca2b570 100644 --- a/webkit/dom_storage/dom_storage_context.h +++ b/webkit/dom_storage/dom_storage_context.h @@ -67,7 +67,7 @@ class DomStorageContext ~UsageInfo(); }; - // An interface for observing LocalStorage events on the + // An interface for observing Local and Session Storage events on the // background thread. class EventObserver { public: diff --git a/webkit/dom_storage/dom_storage_host.cc b/webkit/dom_storage/dom_storage_host.cc index 1b468c8..b97c02c 100644 --- a/webkit/dom_storage/dom_storage_host.cc +++ b/webkit/dom_storage/dom_storage_host.cc @@ -88,10 +88,8 @@ bool DomStorageHost::SetAreaItem( return false; if (!area->SetItem(key, value, old_value)) return false; - if ((area->namespace_id() == kLocalStorageNamespaceId) && - (old_value->is_null() || old_value->string() != value)) { + if (old_value->is_null() || old_value->string() != value) context_->NotifyItemSet(area, key, value, *old_value, page_url); - } return true; } @@ -103,8 +101,7 @@ bool DomStorageHost::RemoveAreaItem( return false; if (!area->RemoveItem(key, old_value)) return false; - if (area->namespace_id() == kLocalStorageNamespaceId) - context_->NotifyItemRemoved(area, key, *old_value, page_url); + context_->NotifyItemRemoved(area, key, *old_value, page_url); return true; } @@ -114,8 +111,7 @@ bool DomStorageHost::ClearArea(int connection_id, const GURL& page_url) { return false; if (!area->Clear()) return false; - if (area->namespace_id() == kLocalStorageNamespaceId) - context_->NotifyAreaCleared(area, page_url); + context_->NotifyAreaCleared(area, page_url); return true; } |