| Index: content/browser/background_sync/background_sync_context_impl.cc
|
| diff --git a/content/browser/background_sync/background_sync_context_impl.cc b/content/browser/background_sync/background_sync_context_impl.cc
|
| index 4e55d839bad0d3dd7d86c6bde36bee940e0a2f97..8cc36fc0af513890b4c7f054094f9279eac1b92a 100644
|
| --- a/content/browser/background_sync/background_sync_context_impl.cc
|
| +++ b/content/browser/background_sync/background_sync_context_impl.cc
|
| @@ -5,9 +5,7 @@
|
| #include "content/browser/background_sync/background_sync_context_impl.h"
|
|
|
| #include "base/bind.h"
|
| -#include "base/stl_util.h"
|
| #include "content/browser/background_sync/background_sync_manager.h"
|
| -#include "content/browser/background_sync/background_sync_service_impl.h"
|
| #include "content/browser/service_worker/service_worker_context_wrapper.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| @@ -50,15 +48,6 @@ void BackgroundSyncContextImpl::CreateService(
|
| base::Passed(&request)));
|
| }
|
|
|
| -void BackgroundSyncContextImpl::ServiceHadConnectionError(
|
| - BackgroundSyncServiceImpl* service) {
|
| - DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| - DCHECK(ContainsValue(services_, service));
|
| -
|
| - services_.erase(service);
|
| - delete service;
|
| -}
|
| -
|
| BackgroundSyncManager* BackgroundSyncContextImpl::background_sync_manager()
|
| const {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| @@ -78,13 +67,13 @@ void BackgroundSyncContextImpl::CreateServiceOnIOThread(
|
| mojo::InterfaceRequest<BackgroundSyncService> request) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| DCHECK(background_sync_manager_);
|
| - services_.insert(new BackgroundSyncServiceImpl(this, request.Pass()));
|
| + services_.EmplaceService(request.Pass(), background_sync_manager());
|
| }
|
|
|
| void BackgroundSyncContextImpl::ShutdownOnIO() {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
|
|
| - STLDeleteElements(&services_);
|
| + services_.Clear();
|
| background_sync_manager_.reset();
|
| }
|
|
|
|
|