Chromium Code Reviews| 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, |