OLD | NEW |
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 <map> | 7 #include <map> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 disk_cache_thread, | 256 disk_cache_thread, |
257 make_scoped_refptr(quota_manager_proxy))); | 257 make_scoped_refptr(quota_manager_proxy))); |
258 return; | 258 return; |
259 } | 259 } |
260 DCHECK(!context_core_); | 260 DCHECK(!context_core_); |
261 context_core_.reset(new ServiceWorkerContextCore(user_data_directory, | 261 context_core_.reset(new ServiceWorkerContextCore(user_data_directory, |
262 stores_task_runner, | 262 stores_task_runner, |
263 database_task_runner, | 263 database_task_runner, |
264 disk_cache_thread, | 264 disk_cache_thread, |
265 quota_manager_proxy, | 265 quota_manager_proxy, |
266 observer_list_, | 266 observer_list_.get(), |
267 this)); | 267 this)); |
268 } | 268 } |
269 | 269 |
270 void ServiceWorkerContextWrapper::ShutdownOnIO() { | 270 void ServiceWorkerContextWrapper::ShutdownOnIO() { |
271 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 271 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
272 context_core_.reset(); | 272 context_core_.reset(); |
273 } | 273 } |
274 | 274 |
275 void ServiceWorkerContextWrapper::DidDeleteAndStartOver( | 275 void ServiceWorkerContextWrapper::DidDeleteAndStartOver( |
276 ServiceWorkerStatusCode status) { | 276 ServiceWorkerStatusCode status) { |
277 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 277 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
278 if (status != SERVICE_WORKER_OK) { | 278 if (status != SERVICE_WORKER_OK) { |
279 context_core_.reset(); | 279 context_core_.reset(); |
280 return; | 280 return; |
281 } | 281 } |
282 context_core_.reset(new ServiceWorkerContextCore(context_core_.get(), this)); | 282 context_core_.reset(new ServiceWorkerContextCore(context_core_.get(), this)); |
283 DVLOG(1) << "Restarted ServiceWorkerContextCore successfully."; | 283 DVLOG(1) << "Restarted ServiceWorkerContextCore successfully."; |
284 } | 284 } |
285 | 285 |
286 } // namespace content | 286 } // namespace content |
OLD | NEW |