| 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 #ifndef CONTENT_TEST_TEST_BACKGROUND_SYNC_CONTEXT_IMPL_H_ | 5 #ifndef CONTENT_TEST_TEST_BACKGROUND_SYNC_CONTEXT_IMPL_H_ |
| 6 #define CONTENT_TEST_TEST_BACKGROUND_SYNC_CONTEXT_IMPL_H_ | 6 #define CONTENT_TEST_TEST_BACKGROUND_SYNC_CONTEXT_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "content/browser/background_sync/background_sync_context_impl.h" | 11 #include "content/browser/background_sync/background_sync_context_impl.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 class TestBackgroundSyncManager; | 15 class TestBackgroundSyncManager; |
| 15 | 16 |
| 16 // A BackgroundSyncContextImpl for use in unit tests, primarily to create a test | 17 // A BackgroundSyncContextImpl for use in unit tests, primarily to create a test |
| 17 // BackgroundSyncManager. | 18 // BackgroundSyncManager. |
| 18 class TestBackgroundSyncContextImpl : public BackgroundSyncContextImpl { | 19 class TestBackgroundSyncContextImpl : public BackgroundSyncContextImpl { |
| 19 public: | 20 public: |
| 20 TestBackgroundSyncContextImpl() = default; | 21 TestBackgroundSyncContextImpl() = default; |
| 21 | 22 |
| 22 protected: | 23 protected: |
| 23 ~TestBackgroundSyncContextImpl() override = default; | 24 ~TestBackgroundSyncContextImpl() override = default; |
| 24 | 25 |
| 25 // BackgroundSyncContextImpl: | 26 // BackgroundSyncContextImpl: |
| 26 void CreateBackgroundSyncManager( | 27 void CreateBackgroundSyncManager( |
| 27 scoped_refptr<ServiceWorkerContextWrapper> context) override; | 28 scoped_refptr<ServiceWorkerContextWrapper> context) override; |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 DISALLOW_COPY_AND_ASSIGN(TestBackgroundSyncContextImpl); | 31 DISALLOW_COPY_AND_ASSIGN(TestBackgroundSyncContextImpl); |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 } // namespace content | 34 } // namespace content |
| 34 | 35 |
| 35 #endif // CONTENT_TEST_TEST_BACKGROUND_SYNC_CONTEXT_IMPL_H_ | 36 #endif // CONTENT_TEST_TEST_BACKGROUND_SYNC_CONTEXT_IMPL_H_ |
| OLD | NEW |