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

Unified Diff: Source/web/DatabaseClientImpl.cpp

Issue 564713002: Web SQL: Remove more worker-related code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Windows build Created 6 years, 3 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 | « Source/modules/webdatabase/DatabaseManager.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/DatabaseClientImpl.cpp
diff --git a/Source/web/DatabaseClientImpl.cpp b/Source/web/DatabaseClientImpl.cpp
index 73f3dcbcad134a28aa862614d4109147c3ebb809..254735290ce94f12b1e6a8fc2e422837fe046a64 100644
--- a/Source/web/DatabaseClientImpl.cpp
+++ b/Source/web/DatabaseClientImpl.cpp
@@ -33,10 +33,8 @@
#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
-#include "core/workers/WorkerGlobalScope.h"
#include "public/web/WebPermissionClient.h"
#include "web/WebLocalFrameImpl.h"
-#include "web/WorkerPermissionClient.h"
namespace blink {
@@ -52,18 +50,12 @@ DatabaseClientImpl::~DatabaseClientImpl()
bool DatabaseClientImpl::allowDatabase(ExecutionContext* executionContext, const String& name, const String& displayName, unsigned long estimatedSize)
{
ASSERT(executionContext->isContextThread());
- ASSERT(executionContext->isDocument() || executionContext->isWorkerGlobalScope());
- if (executionContext->isDocument()) {
- Document* document = toDocument(executionContext);
- WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame());
- if (!webFrame)
- return false;
- if (webFrame->permissionClient())
- return webFrame->permissionClient()->allowDatabase(name, displayName, estimatedSize);
- } else {
- WorkerGlobalScope& workerGlobalScope = *toWorkerGlobalScope(executionContext);
- return WorkerPermissionClient::from(workerGlobalScope)->allowDatabase(name, displayName, estimatedSize);
- }
+ Document* document = toDocument(executionContext);
+ WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame());
+ if (!webFrame)
+ return false;
+ if (webFrame->permissionClient())
+ return webFrame->permissionClient()->allowDatabase(name, displayName, estimatedSize);
return true;
}
« no previous file with comments | « Source/modules/webdatabase/DatabaseManager.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698