Index: content/browser/loader/navigation_url_loader_impl.cc |
diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc |
index 7cbd9112d6da438e78457b29d62bd51a7fc76658..6c9261b9033ba4825e63e1005777c936f9c78b69 100644 |
--- a/content/browser/loader/navigation_url_loader_impl.cc |
+++ b/content/browser/loader/navigation_url_loader_impl.cc |
@@ -11,6 +11,7 @@ |
#include "content/browser/loader/navigation_url_loader_impl_core.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
+#include "content/public/browser/storage_partition.h" |
#include "content/public/browser/stream_handle.h" |
namespace content { |
@@ -23,7 +24,13 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( |
weak_factory_(this) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
- core_ = new NavigationURLLoaderImplCore(weak_factory_.GetWeakPtr()); |
+ // TODO: Picking the partition based on the URL is incorrect. |
clamy
2015/10/07 07:53:30
nit: name in TODO. You can put mine if you want.
Fabrice (no longer in Chrome)
2015/10/07 12:59:43
Thanks for volunteering!
|
+ // See crbug.com/513539 |
+ StoragePartition* partition = BrowserContext::GetStoragePartitionForSite( |
+ browser_context, request_info->common_params.url); |
+ DCHECK(partition); |
+ core_ = new NavigationURLLoaderImplCore(weak_factory_.GetWeakPtr(), |
+ partition->GetServiceWorkerContext()); |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
base::Bind(&NavigationURLLoaderImplCore::Start, base::Unretained(core_), |