OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/test/test_background_sync_context_impl.h" | 5 #include "content/test/test_background_sync_context_impl.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 8 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
8 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
9 #include "content/test/test_background_sync_manager.h" | 10 #include "content/test/test_background_sync_manager.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 void TestBackgroundSyncContextImpl::CreateBackgroundSyncManager( | 14 void TestBackgroundSyncContextImpl::CreateBackgroundSyncManager( |
14 scoped_refptr<ServiceWorkerContextWrapper> context) { | 15 scoped_refptr<ServiceWorkerContextWrapper> context) { |
15 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 16 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
16 DCHECK(!background_sync_manager()); | 17 DCHECK(!background_sync_manager()); |
17 | 18 |
18 TestBackgroundSyncManager* manager = new TestBackgroundSyncManager(context); | 19 TestBackgroundSyncManager* manager = new TestBackgroundSyncManager(context); |
19 set_background_sync_manager_for_testing( | 20 set_background_sync_manager_for_testing( |
20 make_scoped_ptr<BackgroundSyncManager>(manager)); | 21 base::WrapUnique<BackgroundSyncManager>(manager)); |
21 } | 22 } |
22 | 23 |
23 } // namespace content | 24 } // namespace content |
OLD | NEW |