| OLD | NEW |
| 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/signin/profile_oauth2_token_service.h" | 7 #include "chrome/browser/signin/profile_oauth2_token_service.h" |
| 8 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 8 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 9 #include "chrome/browser/signin/signin_manager_factory.h" | 9 #include "chrome/browser/signin/signin_manager_factory.h" |
| 10 #include "chrome/browser/sync/profile_sync_service_mock.h" | 10 #include "chrome/browser/sync/profile_sync_service_mock.h" |
| 11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
| 13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
| 14 | 14 |
| 15 ProfileSyncServiceMock::ProfileSyncServiceMock() | |
| 16 : ProfileSyncService( | |
| 17 NULL, | |
| 18 NULL, | |
| 19 NULL, | |
| 20 NULL, | |
| 21 ProfileSyncService::MANUAL_START) {} | |
| 22 | |
| 23 ProfileSyncServiceMock::ProfileSyncServiceMock(Profile* profile) | 15 ProfileSyncServiceMock::ProfileSyncServiceMock(Profile* profile) |
| 24 : ProfileSyncService( | 16 : ProfileSyncService( |
| 25 NULL, | 17 NULL, |
| 26 profile, | 18 profile, |
| 27 NULL, | 19 NULL, |
| 28 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 20 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
| 29 ProfileSyncService::MANUAL_START) {} | 21 ProfileSyncService::MANUAL_START) {} |
| 30 | 22 |
| 31 ProfileSyncServiceMock::~ProfileSyncServiceMock() { | 23 ProfileSyncServiceMock::~ProfileSyncServiceMock() { |
| 32 } | 24 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 46 | 38 |
| 47 ScopedVector<browser_sync::DeviceInfo> | 39 ScopedVector<browser_sync::DeviceInfo> |
| 48 ProfileSyncServiceMock::GetAllSignedInDevices() const { | 40 ProfileSyncServiceMock::GetAllSignedInDevices() const { |
| 49 ScopedVector<browser_sync::DeviceInfo> devices; | 41 ScopedVector<browser_sync::DeviceInfo> devices; |
| 50 std::vector<browser_sync::DeviceInfo*>* device_vector = | 42 std::vector<browser_sync::DeviceInfo*>* device_vector = |
| 51 GetAllSignedInDevicesMock(); | 43 GetAllSignedInDevicesMock(); |
| 52 devices.get() = *device_vector; | 44 devices.get() = *device_vector; |
| 53 return devices.Pass(); | 45 return devices.Pass(); |
| 54 } | 46 } |
| 55 | 47 |
| OLD | NEW |