Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: chrome/browser/sync/profile_sync_service_mock.cc

Issue 162943002: Revert of [sync]: add ManagedUserSigninManagerWrapper and pass to ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/prefs/testing_pref_store.h" 6 #include "base/prefs/testing_pref_store.h"
7 #include "chrome/browser/managed_mode/managed_user_signin_manager_wrapper.h"
8 #include "chrome/browser/signin/profile_oauth2_token_service.h" 7 #include "chrome/browser/signin/profile_oauth2_token_service.h"
9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 8 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
10 #include "chrome/browser/signin/signin_manager.h" 9 #include "chrome/browser/signin/signin_manager.h"
11 #include "chrome/browser/signin/signin_manager_factory.h" 10 #include "chrome/browser/signin/signin_manager_factory.h"
12 #include "chrome/browser/sync/profile_sync_service_mock.h" 11 #include "chrome/browser/sync/profile_sync_service_mock.h"
13 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
14 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
15 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
16 15
17 ProfileSyncServiceMock::ProfileSyncServiceMock(Profile* profile) 16 ProfileSyncServiceMock::ProfileSyncServiceMock(Profile* profile)
18 : ProfileSyncService( 17 : ProfileSyncService(
19 NULL, 18 NULL,
20 profile, 19 profile,
21 new ManagedUserSigninManagerWrapper( 20 SigninManagerFactory::GetForProfile(profile),
22 SigninManagerFactory::GetForProfile(profile)),
23 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), 21 ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
24 ProfileSyncService::MANUAL_START) {} 22 ProfileSyncService::MANUAL_START) {}
25 23
26 ProfileSyncServiceMock::~ProfileSyncServiceMock() { 24 ProfileSyncServiceMock::~ProfileSyncServiceMock() {
27 } 25 }
28 26
29 // static 27 // static
30 TestingProfile* ProfileSyncServiceMock::MakeSignedInTestingProfile() { 28 TestingProfile* ProfileSyncServiceMock::MakeSignedInTestingProfile() {
31 TestingProfile* profile = new TestingProfile(); 29 TestingProfile* profile = new TestingProfile();
32 profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "foo"); 30 profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "foo");
(...skipping 12 matching lines...) Expand all
45 std::vector<browser_sync::DeviceInfo*>* device_vector = 43 std::vector<browser_sync::DeviceInfo*>* device_vector =
46 GetAllSignedInDevicesMock(); 44 GetAllSignedInDevicesMock();
47 devices.get() = *device_vector; 45 devices.get() = *device_vector;
48 return devices.Pass(); 46 return devices.Pass();
49 } 47 }
50 48
51 scoped_ptr<browser_sync::DeviceInfo> 49 scoped_ptr<browser_sync::DeviceInfo>
52 ProfileSyncServiceMock::GetLocalDeviceInfo() const { 50 ProfileSyncServiceMock::GetLocalDeviceInfo() const {
53 return scoped_ptr<browser_sync::DeviceInfo>(GetLocalDeviceInfoMock()).Pass(); 51 return scoped_ptr<browser_sync::DeviceInfo>(GetLocalDeviceInfoMock()).Pass();
54 } 52 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory.cc ('k') | chrome/browser/sync/profile_sync_service_startup_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698