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

Unified Diff: Source/web/WorkerFileSystemClient.cpp

Issue 50773002: Introduce WebWorkerPermissionClientProxy to deprecate WorkerAllowMainThreadBridge (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated comments, minor code fix Created 7 years, 2 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/web/WorkerAllowMainThreadBridgeBase.h ('k') | Source/web/WorkerPermissionClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WorkerFileSystemClient.cpp
diff --git a/Source/web/WorkerFileSystemClient.cpp b/Source/web/WorkerFileSystemClient.cpp
index fb5eda9685022a311d034c35b575606fb05597ac..abc53bf5dde998246c5b87baf7d9f0cdd2f5599b 100644
--- a/Source/web/WorkerFileSystemClient.cpp
+++ b/Source/web/WorkerFileSystemClient.cpp
@@ -33,6 +33,7 @@
#include "WebWorkerBase.h"
#include "WorkerAllowMainThreadBridgeBase.h"
+#include "WorkerPermissionClient.h"
#include "core/dom/ExecutionContext.h"
#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerThread.h"
@@ -88,6 +89,12 @@ WorkerFileSystemClient::~WorkerFileSystemClient()
bool WorkerFileSystemClient::allowFileSystem(ExecutionContext* context)
{
WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context);
+ WorkerPermissionClient* permissionClient = WorkerPermissionClient::from(workerGlobalScope);
+ if (permissionClient->proxy())
+ return permissionClient->allowFileSystem();
+
+ // FIXME: Deprecate this bridge code when PermissionClientProxy is
+ // implemented by the embedder.
WebCore::WorkerThread* workerThread = workerGlobalScope->thread();
WorkerRunLoop& runLoop = workerThread->runLoop();
WebCore::WorkerLoaderProxy* workerLoaderProxy = &workerThread->workerLoaderProxy();
« no previous file with comments | « Source/web/WorkerAllowMainThreadBridgeBase.h ('k') | Source/web/WorkerPermissionClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698