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

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

Issue 334713008: Use AttachmentUploadImpl instead of FakeAttachmentUploader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply CR feedback from tim. Created 6 years, 6 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 "chrome/browser/sync/profile_sync_service_mock.h"
6
5 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
6 #include "base/prefs/testing_pref_store.h" 8 #include "base/prefs/testing_pref_store.h"
7 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
8 #include "chrome/browser/signin/signin_manager_factory.h" 10 #include "chrome/browser/signin/signin_manager_factory.h"
9 #include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" 11 #include "chrome/browser/sync/managed_user_signin_manager_wrapper.h"
10 #include "chrome/browser/sync/profile_sync_service_mock.h"
11 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
12 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
13 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
14 #include "components/signin/core/browser/profile_oauth2_token_service.h" 15 #include "components/signin/core/browser/profile_oauth2_token_service.h"
15 #include "components/signin/core/browser/signin_manager.h" 16 #include "components/signin/core/browser/signin_manager.h"
16 17
17 ProfileSyncServiceMock::ProfileSyncServiceMock(Profile* profile) 18 ProfileSyncServiceMock::ProfileSyncServiceMock(Profile* profile)
18 : ProfileSyncService( 19 : ProfileSyncService(
19 NULL, 20 NULL,
20 profile, 21 profile,
21 new ManagedUserSigninManagerWrapper( 22 make_scoped_ptr(new ManagedUserSigninManagerWrapper(
22 profile, 23 profile,
23 SigninManagerFactory::GetForProfile(profile)), 24 SigninManagerFactory::GetForProfile(profile))),
24 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), 25 ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
25 browser_sync::MANUAL_START) {} 26 browser_sync::MANUAL_START) {
27 }
26 28
27 ProfileSyncServiceMock::~ProfileSyncServiceMock() { 29 ProfileSyncServiceMock::~ProfileSyncServiceMock() {
28 } 30 }
29 31
30 // static 32 // static
31 TestingProfile* ProfileSyncServiceMock::MakeSignedInTestingProfile() { 33 TestingProfile* ProfileSyncServiceMock::MakeSignedInTestingProfile() {
32 TestingProfile* profile = new TestingProfile(); 34 TestingProfile* profile = new TestingProfile();
33 profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "foo"); 35 profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "foo");
34 return profile; 36 return profile;
35 } 37 }
(...skipping 10 matching lines...) Expand all
46 std::vector<browser_sync::DeviceInfo*>* device_vector = 48 std::vector<browser_sync::DeviceInfo*>* device_vector =
47 GetAllSignedInDevicesMock(); 49 GetAllSignedInDevicesMock();
48 devices.get() = *device_vector; 50 devices.get() = *device_vector;
49 return devices.Pass(); 51 return devices.Pass();
50 } 52 }
51 53
52 scoped_ptr<browser_sync::DeviceInfo> 54 scoped_ptr<browser_sync::DeviceInfo>
53 ProfileSyncServiceMock::GetLocalDeviceInfo() const { 55 ProfileSyncServiceMock::GetLocalDeviceInfo() const {
54 return scoped_ptr<browser_sync::DeviceInfo>(GetLocalDeviceInfoMock()).Pass(); 56 return scoped_ptr<browser_sync::DeviceInfo>(GetLocalDeviceInfoMock()).Pass();
55 } 57 }
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