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