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

Unified Diff: content/browser/shared_worker/shared_worker_host.cc

Issue 338353007: Implementation of shared worker code path for WebView file system permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_sharedworker
Patch Set: rebase Created 6 years, 6 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: content/browser/shared_worker/shared_worker_host.cc
diff --git a/content/browser/shared_worker/shared_worker_host.cc b/content/browser/shared_worker/shared_worker_host.cc
index 9fc9d67ec3af8af663c2b3d2ec769767fb18c384..57d026cbd7ec8e684940705f563fafc692c02370 100644
--- a/content/browser/shared_worker/shared_worker_host.cc
+++ b/content/browser/shared_worker/shared_worker_host.cc
@@ -220,12 +220,25 @@ void SharedWorkerHost::AllowDatabase(const GURL& url,
GetRenderFrameIDsForWorker());
}
-void SharedWorkerHost::AllowFileSystem(const GURL& url,
- bool* result) {
+void SharedWorkerHost::RequestFileSystemAccessSync(const GURL& url,
+ IPC::Message* reply_msg) {
if (!instance_)
return;
- *result = GetContentClient()->browser()->AllowWorkerFileSystem(
- url, instance_->resource_context(), GetRenderFrameIDsForWorker());
+ GetContentClient()->browser()->RequestWorkerFileSystemAccessSync(
+ url,
+ instance_->resource_context(),
+ GetRenderFrameIDsForWorker(),
+ base::Bind(&SharedWorkerHost::RequestFileSystemAccessSyncResponse,
+ base::Unretained(this),
Andrew T Wilson (Slow) 2014/06/20 22:04:26 Is this object guaranteed to still be around when
jam 2014/06/23 07:02:00 (i was going backwards and left the same comment o
Xi Han 2014/06/23 20:43:34 I adopt weak_factory for this pointer; and use sco
+ reply_msg));
+}
+
+void SharedWorkerHost::RequestFileSystemAccessSyncResponse(
+ IPC::Message* reply_msg,
+ bool allowed) {
+ WorkerProcessHostMsg_RequestFileSystemAccessSync::WriteReplyParams(reply_msg,
+ allowed);
+ Send(reply_msg);
}
void SharedWorkerHost::AllowIndexedDB(const GURL& url,

Powered by Google App Engine
This is Rietveld 408576698