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
9using browser_sync::AssociatorInterface;
10using browser_sync::ChangeProcessor;
11using testing::_;
12using testing::InvokeWithoutArgs;
13
14ProfileSyncFactoryMock::ProfileSyncFactoryMock() {}
15
16ProfileSyncFactoryMock::ProfileSyncFactoryMock(
17    AssociatorInterface* bookmark_model_associator,
18    ChangeProcessor* bookmark_change_processor)
19    : bookmark_model_associator_(bookmark_model_associator),
20      bookmark_change_processor_(bookmark_change_processor) {
21  ON_CALL(*this, CreateBookmarkSyncComponents(_, _)).
22      WillByDefault(
23          InvokeWithoutArgs(
24              this,
25              &ProfileSyncFactoryMock::MakeBookmarkSyncComponents));
26}
27
28ProfileSyncFactoryMock::~ProfileSyncFactoryMock() {}
29
30ProfileSyncFactory::SyncComponents
31ProfileSyncFactoryMock::MakeBookmarkSyncComponents() {
32  return SyncComponents(bookmark_model_associator_.release(),
33                        bookmark_change_processor_.release());
34}
35