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
3 // found in the LICENSE file.
5 #include "chrome/browser/sync/profile_sync_components_factory_mock.h"
6 #include "components/sync_driver/change_processor.h"
7 #include "components/sync_driver/model_associator.h"
8 #include "content/public/browser/browser_thread.h"
9 #include "sync/api/attachments/attachment_service_impl.h"
10 #include "sync/internal_api/public/attachments/fake_attachment_store.h"
12 using browser_sync::AssociatorInterface
;
13 using browser_sync::ChangeProcessor
;
15 using testing::InvokeWithoutArgs
;
17 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock() {}
19 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock(
20 AssociatorInterface
* model_associator
, ChangeProcessor
* change_processor
)
21 : model_associator_(model_associator
),
22 change_processor_(change_processor
) {
23 ON_CALL(*this, CreateBookmarkSyncComponents(_
, _
)).
27 &ProfileSyncComponentsFactoryMock::MakeSyncComponents
));
30 ProfileSyncComponentsFactoryMock::~ProfileSyncComponentsFactoryMock() {}
32 scoped_ptr
<syncer::AttachmentService
>
33 ProfileSyncComponentsFactoryMock::CreateAttachmentService(
34 syncer::AttachmentService::Delegate
* delegate
) {
35 return syncer::AttachmentServiceImpl::CreateForTest();
38 ProfileSyncComponentsFactory::SyncComponents
39 ProfileSyncComponentsFactoryMock::MakeSyncComponents() {
40 return SyncComponents(model_associator_
.release(),
41 change_processor_
.release());