Chromium Code Reviews| Index: content/browser/service_worker/service_worker_dispatcher_host.cc |
| diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc |
| index 2c68c82a3ef598b0c94388ea3e0f3f08943f3bcb..90e476bbf919faf484397dbdb98cc5f703f17596 100644 |
| --- a/content/browser/service_worker/service_worker_dispatcher_host.cc |
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/logging.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "content/browser/fileapi/chrome_blob_storage_context.h" |
| #include "content/browser/message_port_message_filter.h" |
| #include "content/browser/message_port_service.h" |
| #include "content/browser/service_worker/embedded_worker_registry.h" |
| @@ -19,6 +20,7 @@ |
| #include "ipc/ipc_message_macros.h" |
| #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" |
| #include "url/gurl.h" |
| +#include "webkit/browser/blob/blob_storage_context.h" |
|
jkarlin
2014/08/12 19:22:15
I'll remove this line
jkarlin
2014/08/13 00:14:00
Needed to keep this one after all.
|
| using blink::WebServiceWorkerError; |
| @@ -74,17 +76,25 @@ ServiceWorkerDispatcherHost::~ServiceWorkerDispatcherHost() { |
| } |
| void ServiceWorkerDispatcherHost::Init( |
| - ServiceWorkerContextWrapper* context_wrapper) { |
| + ServiceWorkerContextWrapper* context_wrapper, |
| + net::URLRequestContext* request_context, |
|
michaeln
2014/08/13 00:11:28
i think this would need to be a URLRequestContextG
jkarlin
2014/08/13 00:34:41
Done.
|
| + ChromeBlobStorageContext* blob_storage) { |
| if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
| - BrowserThread::PostTask( |
| - BrowserThread::IO, FROM_HERE, |
| - base::Bind(&ServiceWorkerDispatcherHost::Init, |
| - this, make_scoped_refptr(context_wrapper))); |
| + BrowserThread::PostTask(BrowserThread::IO, |
| + FROM_HERE, |
| + base::Bind(&ServiceWorkerDispatcherHost::Init, |
| + this, |
| + make_scoped_refptr(context_wrapper), |
| + base::Unretained(request_context), |
| + make_scoped_refptr(blob_storage))); |
| return; |
| } |
| context_wrapper_ = context_wrapper; |
| GetContext()->embedded_worker_registry()->AddChildProcessSender( |
| render_process_id_, this); |
| + if (blob_storage->context()) |
| + context_wrapper_->SetBlobParametersForCache( |
| + request_context, blob_storage->context()->AsWeakPtr()); |
| } |
| void ServiceWorkerDispatcherHost::OnFilterAdded(IPC::Sender* sender) { |