OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/sync/glue/change_processor.h" | |
6 #include "chrome/browser/sync/glue/model_associator.h" | |
7 #include "chrome/browser/sync/profile_sync_factory_mock.h" | |
8 | |
9 using browser_sync::AssociatorInterface; | |
10 using browser_sync::ChangeProcessor; | |
11 using testing::_; | |
12 using testing::InvokeWithoutArgs; | |
13 | |
14 ProfileSyncFactoryMock::ProfileSyncFactoryMock() {} | |
15 | |
16 ProfileSyncFactoryMock::ProfileSyncFactoryMock( | |
17 AssociatorInterface* model_associator, ChangeProcessor* change_processor) | |
18 : model_associator_(model_associator), | |
19 change_processor_(change_processor) { | |
20 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)). | |
21 WillByDefault( | |
22 InvokeWithoutArgs( | |
23 this, | |
24 &ProfileSyncFactoryMock::MakeSyncComponents)); | |
25 ON_CALL(*this, CreateSearchEngineSyncComponents(_, _)). | |
26 WillByDefault( | |
27 InvokeWithoutArgs( | |
28 this, | |
29 &ProfileSyncFactoryMock::MakeSyncComponents)); | |
30 ON_CALL(*this, CreateAppNotificationSyncComponents(_, _)). | |
31 WillByDefault( | |
32 InvokeWithoutArgs( | |
33 this, | |
34 &ProfileSyncFactoryMock::MakeSyncComponents)); | |
35 } | |
36 | |
37 ProfileSyncFactoryMock::~ProfileSyncFactoryMock() {} | |
38 | |
39 ProfileSyncFactory::SyncComponents | |
40 ProfileSyncFactoryMock::MakeSyncComponents() { | |
41 return SyncComponents(model_associator_.release(), | |
42 change_processor_.release()); | |
43 } | |
OLD | NEW |