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 "base/prefs/pref_service.h"
6 #include "base/prefs/testing_pref_store.h"
7 #include "chrome/browser/signin/signin_manager_factory.h"
8 #include "chrome/browser/sync/profile_sync_service_mock.h"
9 #include "chrome/common/pref_names.h"
10 #include "chrome/common/url_constants.h"
11 #include "chrome/test/base/testing_profile.h"
13 ProfileSyncServiceMock::ProfileSyncServiceMock()
14 : ProfileSyncService(NULL
,
17 ProfileSyncService::MANUAL_START
) {
20 ProfileSyncServiceMock::ProfileSyncServiceMock(
21 Profile
* profile
) : ProfileSyncService(NULL
,
24 ProfileSyncService::MANUAL_START
) {
27 ProfileSyncServiceMock::~ProfileSyncServiceMock() {
31 TestingProfile
* ProfileSyncServiceMock::MakeSignedInTestingProfile() {
32 TestingProfile
* profile
= new TestingProfile();
33 profile
->GetPrefs()->SetString(prefs::kGoogleServicesUsername
, "foo");
38 ProfileKeyedService
* ProfileSyncServiceMock::BuildMockProfileSyncService(
40 return new ProfileSyncServiceMock(profile
);