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

Unified Diff: chrome/renderer/worker_permission_client_proxy.cc

Issue 273513005: Avoid sync IPCs for FileSystem API [chromium] (2/4) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 7 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
Index: chrome/renderer/worker_permission_client_proxy.cc
diff --git a/chrome/renderer/worker_permission_client_proxy.cc b/chrome/renderer/worker_permission_client_proxy.cc
index 7d8a65e87ea92419838ee79d97a2ed33ebdd0744..46311668c8400bfbf82f6c6e93e70ef079143aef 100644
--- a/chrome/renderer/worker_permission_client_proxy.cc
+++ b/chrome/renderer/worker_permission_client_proxy.cc
@@ -7,6 +7,7 @@
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
#include "ipc/ipc_sync_message_filter.h"
+#include "third_party/WebKit/public/platform/WebPermissionCallbacks.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
@@ -46,7 +47,17 @@ bool WorkerPermissionClientProxy::allowFileSystem() {
return false;
bool result = false;
- sync_message_filter_->Send(new ChromeViewHostMsg_AllowFileSystem(
+ sync_message_filter_->Send(new ChromeViewHostMsg_RequestFileSystemAccessSync(
+ routing_id_, document_origin_url_, top_frame_origin_url_, &result));
+ return result;
+}
+
+bool WorkerPermissionClientProxy::requestFileSystemAccessSync() {
+ if (is_unique_origin_)
+ return false;
+
+ bool result = false;
+ sync_message_filter_->Send(new ChromeViewHostMsg_RequestFileSystemAccessSync(
routing_id_, document_origin_url_, top_frame_origin_url_, &result));
return result;
}
« no previous file with comments | « chrome/renderer/worker_permission_client_proxy.h ('k') | content/browser/shared_worker/shared_worker_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698