Simplify StorageArea getter functions
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 May 2013 22:11:11 +0000 (22:11 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 May 2013 22:11:11 +0000 (22:11 +0000)
commitcbf420c440774a6be924b43fe205228f21a826e7
tree7390f9aba0090019fac04643a713e8e621da127d
parente36fca815cfc48cfbb7c3571e1dfa23b2fe339a6
Simplify StorageArea getter functions
https://bugs.webkit.org/show_bug.cgi?id=116399

Reviewed by Sam Weinig.

Source/WebCore:

Move the security and private browsing checks from StorageArea to Storage so we can share
more code between WebKit1 and WebKit2.

* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
Update to new StorageArea interface. The security checks are unnecessary here anyway because
InspectorDOMStorageAgent::findStorageArea will only return a StorageArea that can be accessed
by the frame's security origin.

* storage/Storage.cpp:
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::contains):
* storage/StorageArea.h:
(StorageArea):
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::key):
(WebCore::StorageAreaImpl::item):
(WebCore::StorageAreaImpl::contains):
* storage/StorageAreaImpl.h:
(StorageAreaImpl):

Source/WebKit2:

Remove security and private browsing checks.

* WebProcess/Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::key):
(WebKit::StorageAreaImpl::item):
(WebKit::StorageAreaImpl::contains):
* WebProcess/Storage/StorageAreaImpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorDOMStorageAgent.cpp
Source/WebCore/storage/Storage.cpp
Source/WebCore/storage/StorageArea.h
Source/WebCore/storage/StorageAreaImpl.cpp
Source/WebCore/storage/StorageAreaImpl.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Storage/StorageAreaImpl.cpp
Source/WebKit2/WebProcess/Storage/StorageAreaImpl.h