| Index: content/browser/service_worker/service_worker_context_wrapper.cc
|
| diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
|
| index 0c32d7168594bb9f4070c13c35cdde1da532f790..0cef01f2ab2005c81707ac26b85abb2b66d382cb 100644
|
| --- a/content/browser/service_worker/service_worker_context_wrapper.cc
|
| +++ b/content/browser/service_worker/service_worker_context_wrapper.cc
|
| @@ -114,7 +114,6 @@ ServiceWorkerContextWrapper::ServiceWorkerContextWrapper(
|
|
|
| ServiceWorkerContextWrapper::~ServiceWorkerContextWrapper() {
|
| DCHECK(!resource_context_);
|
| - DCHECK(!request_context_getter_);
|
| }
|
|
|
| void ServiceWorkerContextWrapper::Init(
|
| @@ -145,25 +144,9 @@ void ServiceWorkerContextWrapper::Shutdown() {
|
| }
|
|
|
| void ServiceWorkerContextWrapper::InitializeResourceContext(
|
| - ResourceContext* resource_context,
|
| - scoped_refptr<net::URLRequestContextGetter> request_context_getter) {
|
| + ResourceContext* resource_context) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| resource_context_ = resource_context;
|
| - request_context_getter_ = request_context_getter;
|
| - // Can be null in tests.
|
| - if (request_context_getter_)
|
| - request_context_getter_->AddObserver(this);
|
| -}
|
| -
|
| -void ServiceWorkerContextWrapper::OnContextShuttingDown() {
|
| - DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| -
|
| - // OnContextShuttingDown is called when the ProfileIOData (ResourceContext) is
|
| - // shutting down, so call ShutdownOnIO() to clear resource_context_.
|
| - // This doesn't seem to be called when using content_shell, so we still must
|
| - // also call ShutdownOnIO() in Shutdown(), which is called when the storage
|
| - // partition is destroyed.
|
| - ShutdownOnIO();
|
| }
|
|
|
| void ServiceWorkerContextWrapper::DeleteAndStartOver() {
|
| @@ -719,10 +702,6 @@ void ServiceWorkerContextWrapper::InitInternal(
|
|
|
| void ServiceWorkerContextWrapper::ShutdownOnIO() {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| - // Can be null in tests.
|
| - if (request_context_getter_)
|
| - request_context_getter_->RemoveObserver(this);
|
| - request_context_getter_ = nullptr;
|
| resource_context_ = nullptr;
|
| context_core_.reset();
|
| }
|
|
|