OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 COMPONENTS_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef COMPONENTS_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
6 #define COMPONENTS_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 6 #define COMPONENTS_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/browser_sync/profile_sync_service.h" | 9 #include "components/browser_sync/profile_sync_service.h" |
10 #include "components/sync/base/weak_handle.h" | 10 #include "components/sync/base/weak_handle.h" |
11 #include "components/sync/driver/data_type_manager.h" | 11 #include "components/sync/driver/data_type_manager.h" |
12 #include "components/sync/js/js_event_handler.h" | 12 #include "components/sync/js/js_event_handler.h" |
13 #include "components/sync/test/engine/test_id_factory.h" | 13 #include "components/sync/test/engine/test_id_factory.h" |
14 | 14 |
15 namespace sync_driver { | 15 namespace sync_driver { |
16 class SyncPrefs; | 16 class SyncPrefs; |
17 } // namespace sync_driver | 17 } // namespace sync_driver |
18 | 18 |
| 19 namespace browser_sync { |
| 20 |
19 class TestProfileSyncService : public ProfileSyncService { | 21 class TestProfileSyncService : public ProfileSyncService { |
20 public: | 22 public: |
21 explicit TestProfileSyncService(InitParams init_params); | 23 explicit TestProfileSyncService(InitParams init_params); |
22 | 24 |
23 ~TestProfileSyncService() override; | 25 ~TestProfileSyncService() override; |
24 | 26 |
25 void OnConfigureDone( | 27 void OnConfigureDone( |
26 const sync_driver::DataTypeManager::ConfigureResult& result) override; | 28 const sync_driver::DataTypeManager::ConfigureResult& result) override; |
27 | 29 |
28 // We implement our own version to avoid some DCHECKs. | 30 // We implement our own version to avoid some DCHECKs. |
(...skipping 11 matching lines...) Expand all Loading... |
40 // js messages on UI loop when it's being destroyed, which are not deleted | 42 // js messages on UI loop when it's being destroyed, which are not deleted |
41 // and cause memory leak in test. | 43 // and cause memory leak in test. |
42 syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() override; | 44 syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() override; |
43 | 45 |
44 private: | 46 private: |
45 syncer::TestIdFactory id_factory_; | 47 syncer::TestIdFactory id_factory_; |
46 | 48 |
47 DISALLOW_COPY_AND_ASSIGN(TestProfileSyncService); | 49 DISALLOW_COPY_AND_ASSIGN(TestProfileSyncService); |
48 }; | 50 }; |
49 | 51 |
| 52 } // namespace browser_sync |
| 53 |
50 #endif // COMPONENTS_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 54 #endif // COMPONENTS_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |