Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2269)

Side by Side Diff: components/browser_sync/test_profile_sync_service.h

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 syncer { 15 namespace sync_driver {
16 class SyncPrefs; 16 class SyncPrefs;
17 } // namespace syncer 17 } // namespace sync_driver
18 18
19 namespace browser_sync { 19 namespace browser_sync {
20 20
21 class TestProfileSyncService : public ProfileSyncService { 21 class TestProfileSyncService : public ProfileSyncService {
22 public: 22 public:
23 explicit TestProfileSyncService(InitParams init_params); 23 explicit TestProfileSyncService(InitParams init_params);
24 24
25 ~TestProfileSyncService() override; 25 ~TestProfileSyncService() override;
26 26
27 void OnConfigureDone( 27 void OnConfigureDone(
28 const syncer::DataTypeManager::ConfigureResult& result) override; 28 const sync_driver::DataTypeManager::ConfigureResult& result) override;
29 29
30 // We implement our own version to avoid some DCHECKs. 30 // We implement our own version to avoid some DCHECKs.
31 syncer::UserShare* GetUserShare() const override; 31 syncer::UserShare* GetUserShare() const override;
32 32
33 syncer::TestIdFactory* id_factory(); 33 syncer::TestIdFactory* id_factory();
34 34
35 // Raise visibility to ease testing. 35 // Raise visibility to ease testing.
36 using ProfileSyncService::NotifyObservers; 36 using ProfileSyncService::NotifyObservers;
37 37
38 syncer::SyncPrefs* sync_prefs() { return &sync_prefs_; } 38 sync_driver::SyncPrefs* sync_prefs() { return &sync_prefs_; }
39 39
40 protected: 40 protected:
41 // Return NULL handle to use in backend initialization to avoid receiving 41 // Return NULL handle to use in backend initialization to avoid receiving
42 // 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
43 // and cause memory leak in test. 43 // and cause memory leak in test.
44 syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() override; 44 syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() override;
45 45
46 private: 46 private:
47 syncer::TestIdFactory id_factory_; 47 syncer::TestIdFactory id_factory_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(TestProfileSyncService); 49 DISALLOW_COPY_AND_ASSIGN(TestProfileSyncService);
50 }; 50 };
51 51
52 } // namespace browser_sync 52 } // namespace browser_sync
53 53
54 #endif // COMPONENTS_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 54 #endif // COMPONENTS_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « components/browser_sync/profile_sync_test_util.cc ('k') | components/browser_sync/test_profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698