OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/sync/glue/change_processor.h" | 5 #include "chrome/browser/sync/glue/change_processor.h" |
6 #include "chrome/browser/sync/glue/model_associator.h" | 6 #include "chrome/browser/sync/glue/model_associator.h" |
7 #include "chrome/browser/sync/profile_sync_factory_mock.h" | 7 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" |
8 | 8 |
9 using browser_sync::AssociatorInterface; | 9 using browser_sync::AssociatorInterface; |
10 using browser_sync::ChangeProcessor; | 10 using browser_sync::ChangeProcessor; |
11 using testing::_; | 11 using testing::_; |
12 using testing::InvokeWithoutArgs; | 12 using testing::InvokeWithoutArgs; |
13 | 13 |
14 ProfileSyncFactoryMock::ProfileSyncFactoryMock() {} | 14 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock() {} |
15 | 15 |
16 ProfileSyncFactoryMock::ProfileSyncFactoryMock( | 16 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock( |
17 AssociatorInterface* model_associator, ChangeProcessor* change_processor) | 17 AssociatorInterface* model_associator, ChangeProcessor* change_processor) |
18 : model_associator_(model_associator), | 18 : model_associator_(model_associator), |
19 change_processor_(change_processor) { | 19 change_processor_(change_processor) { |
20 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)). | 20 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)). |
21 WillByDefault( | 21 WillByDefault( |
22 InvokeWithoutArgs( | 22 InvokeWithoutArgs( |
23 this, | 23 this, |
24 &ProfileSyncFactoryMock::MakeSyncComponents)); | 24 &ProfileSyncComponentsFactoryMock::MakeSyncComponents)); |
25 ON_CALL(*this, CreateSearchEngineSyncComponents(_, _)). | 25 ON_CALL(*this, CreateSearchEngineSyncComponents(_, _)). |
26 WillByDefault( | 26 WillByDefault( |
27 InvokeWithoutArgs( | 27 InvokeWithoutArgs( |
28 this, | 28 this, |
29 &ProfileSyncFactoryMock::MakeSyncComponents)); | 29 &ProfileSyncComponentsFactoryMock::MakeSyncComponents)); |
30 ON_CALL(*this, CreateAppNotificationSyncComponents(_, _)). | 30 ON_CALL(*this, CreateAppNotificationSyncComponents(_, _)). |
31 WillByDefault( | 31 WillByDefault( |
32 InvokeWithoutArgs( | 32 InvokeWithoutArgs( |
33 this, | 33 this, |
34 &ProfileSyncFactoryMock::MakeSyncComponents)); | 34 &ProfileSyncComponentsFactoryMock::MakeSyncComponents)); |
35 } | 35 } |
36 | 36 |
37 ProfileSyncFactoryMock::~ProfileSyncFactoryMock() {} | 37 ProfileSyncComponentsFactoryMock::~ProfileSyncComponentsFactoryMock() {} |
38 | 38 |
39 ProfileSyncFactory::SyncComponents | 39 ProfileSyncComponentsFactory::SyncComponents |
40 ProfileSyncFactoryMock::MakeSyncComponents() { | 40 ProfileSyncComponentsFactoryMock::MakeSyncComponents() { |
Nicolas Zea
2011/11/22 00:01:03
and here
| |
41 return SyncComponents(model_associator_.release(), | 41 return SyncComponents(model_associator_.release(), |
42 change_processor_.release()); | 42 change_processor_.release()); |
43 } | 43 } |
OLD | NEW |