Changeset 85966 in webkit
- Timestamp:
- May 6, 2011 12:09:31 PM (13 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r85954 r85966 1 2011-05-06 John Abd-El-Malek <jam@chromium.org> 2 3 Reviewed by James Robinson. 4 5 [chromium]: Reland using WebPermissionClient for checking indexed db usage 6 https://bugs.webkit.org/show_bug.cgi?id=60386 7 8 * public/WebPermissionClient.h: 9 (WebKit::WebPermissionClient::allowIndexedDB): 10 * src/IDBFactoryBackendProxy.cpp: 11 (WebKit::IDBFactoryBackendProxy::open): 12 1 13 2011-05-06 Sheriff Bot <webkit.review.bot@gmail.com> 2 14 -
trunk/Source/WebKit/chromium/public/WebPermissionClient.h
r85954 r85966 35 35 36 36 class WebFrame; 37 class WebSecurityOrigin; 37 38 class WebString; 38 39 … … 44 45 // Controls whether images are allowed for this frame. 45 46 virtual bool allowImages(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; } 47 48 // Controls whether access to Indexed DB are allowed for this frame. 49 virtual bool allowIndexedDB(WebFrame*, const WebString& name, const WebSecurityOrigin&) { return true; } 46 50 47 51 // Controls whether plugins are allowed for this frame. -
trunk/Source/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
r85954 r85966 43 43 #include "WebKit.h" 44 44 #include "WebKitClient.h" 45 #include "WebPermissionClient.h" 45 46 #include "WebVector.h" 47 #include "WebViewImpl.h" 46 48 47 49 using namespace WebCore; … … 63 65 } 64 66 65 void IDBFactoryBackendProxy::open(const String& name, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame, const String& dataDir, int64_t maximumSize, BackingStoreType backingStoreType)67 void IDBFactoryBackendProxy::open(const String& name, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> prpOrigin, Frame* frame, const String& dataDir, int64_t maximumSize, BackingStoreType backingStoreType) 66 68 { 67 WebFrame* webFrame = WebFrameImpl::fromFrame(frame); 69 WebSecurityOrigin origin(prpOrigin); 70 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(frame); 71 WebViewImpl* webView = webFrame->viewImpl(); 72 if (webView->permissionClient() && !webView->permissionClient()->allowIndexedDB(webFrame, name, origin)) { 73 callbacks->onError(WebIDBDatabaseError(0, "The user denied permission to access the database.")); 74 return; 75 } 76 68 77 m_webIDBFactory->open(name, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir, maximumSize, static_cast<WebIDBFactory::BackingStoreType>(backingStoreType)); 69 78 }
Note: See TracChangeset
for help on using the changeset viewer.