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

Side by Side Diff: content/browser/service_worker/service_worker_context_wrapper.cc

Issue 305723003: Shut down the ServiceWorker system as the browser's shutting down. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove a redundant clear() 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/service_worker_context_wrapper.h" 5 #include "content/browser/service_worker/service_worker_context_wrapper.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "content/browser/service_worker/service_worker_context_core.h" 9 #include "content/browser/service_worker/service_worker_context_core.h"
10 #include "content/browser/service_worker/service_worker_context_observer.h" 10 #include "content/browser/service_worker/service_worker_context_observer.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 pattern, 110 pattern,
111 continuation)); 111 continuation));
112 return; 112 return;
113 } 113 }
114 114
115 context()->UnregisterServiceWorker( 115 context()->UnregisterServiceWorker(
116 pattern, 116 pattern,
117 base::Bind(&FinishUnregistrationOnIO, continuation)); 117 base::Bind(&FinishUnregistrationOnIO, continuation));
118 } 118 }
119 119
120 void ServiceWorkerContextWrapper::Terminate() {
121 DCHECK_CURRENTLY_ON(BrowserThread::UI);
122 process_manager_->Shutdown();
123 }
124
120 void ServiceWorkerContextWrapper::AddObserver( 125 void ServiceWorkerContextWrapper::AddObserver(
121 ServiceWorkerContextObserver* observer) { 126 ServiceWorkerContextObserver* observer) {
122 observer_list_->AddObserver(observer); 127 observer_list_->AddObserver(observer);
123 } 128 }
124 129
125 void ServiceWorkerContextWrapper::RemoveObserver( 130 void ServiceWorkerContextWrapper::RemoveObserver(
126 ServiceWorkerContextObserver* observer) { 131 ServiceWorkerContextObserver* observer) {
127 observer_list_->RemoveObserver(observer); 132 observer_list_->RemoveObserver(observer);
128 } 133 }
129 134
(...skipping 22 matching lines...) Expand all
152 observer_list_, 157 observer_list_,
153 this)); 158 this));
154 } 159 }
155 160
156 void ServiceWorkerContextWrapper::ShutdownOnIO() { 161 void ServiceWorkerContextWrapper::ShutdownOnIO() {
157 DCHECK_CURRENTLY_ON(BrowserThread::IO); 162 DCHECK_CURRENTLY_ON(BrowserThread::IO);
158 context_core_.reset(); 163 context_core_.reset();
159 } 164 }
160 165
161 } // namespace content 166 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698