1 // Copyright 2015 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 "components/sync_driver/fake_sync_client.h"
7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
8 #include "components/password_manager/core/browser/password_store.h"
9 #include "components/sync_driver/fake_sync_service.h"
11 namespace sync_driver
{
13 FakeSyncClient::FakeSyncClient()
15 sync_service_(make_scoped_ptr(new FakeSyncService())) {}
17 FakeSyncClient::FakeSyncClient(SyncApiComponentFactory
* factory
)
19 sync_service_(make_scoped_ptr(new FakeSyncService())) {}
21 FakeSyncClient::~FakeSyncClient() {}
23 SyncService
* FakeSyncClient::GetSyncService() {
24 return sync_service_
.get();
27 PrefService
* FakeSyncClient::GetPrefService() {
31 bookmarks::BookmarkModel
* FakeSyncClient::GetBookmarkModel() {
35 history::HistoryService
* FakeSyncClient::GetHistoryService() {
39 scoped_refptr
<password_manager::PasswordStore
>
40 FakeSyncClient::GetPasswordStore() {
41 return scoped_refptr
<password_manager::PasswordStore
>();
44 autofill::PersonalDataManager
* FakeSyncClient::GetPersonalDataManager() {
48 scoped_refptr
<autofill::AutofillWebDataService
>
49 FakeSyncClient::GetWebDataService() {
50 return scoped_refptr
<autofill::AutofillWebDataService
>();
53 base::WeakPtr
<syncer::SyncableService
>
54 FakeSyncClient::GetSyncableServiceForType(syncer::ModelType type
) {
55 return base::WeakPtr
<syncer::SyncableService
>();
58 SyncApiComponentFactory
* FakeSyncClient::GetSyncApiComponentFactory() {
62 } // namespace sync_driver