Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / sync / profile_sync_components_factory_mock.cc
blobeaf5aeab108ae8a15dcdbe4f00ec2e74bb688cf6
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/fake_attachment_store.h"
11 using browser_sync::AssociatorInterface;
12 using browser_sync::ChangeProcessor;
13 using testing::_;
14 using testing::InvokeWithoutArgs;
16 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock() {}
18 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock(
19 AssociatorInterface* model_associator, ChangeProcessor* change_processor)
20 : model_associator_(model_associator),
21 change_processor_(change_processor) {
22 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)).
23 WillByDefault(
24 InvokeWithoutArgs(
25 this,
26 &ProfileSyncComponentsFactoryMock::MakeSyncComponents));
29 ProfileSyncComponentsFactoryMock::~ProfileSyncComponentsFactoryMock() {}
31 scoped_ptr<syncer::AttachmentStore>
32 ProfileSyncComponentsFactoryMock::CreateCustomAttachmentStoreForType(
33 syncer::ModelType type) {
34 scoped_ptr<syncer::AttachmentStore> store(
35 new syncer::FakeAttachmentStore(
36 content::BrowserThread::GetMessageLoopProxyForThread(
37 content::BrowserThread::IO)));
38 return store.Pass();
41 ProfileSyncComponentsFactory::SyncComponents
42 ProfileSyncComponentsFactoryMock::MakeSyncComponents() {
43 return SyncComponents(model_associator_.release(),
44 change_processor_.release());