| 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 "chrome/browser/sync/test_profile_sync_service.h" | 5 #include "chrome/browser/sync/test_profile_sync_service.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/managed_mode/managed_user_signin_manager_wrapper.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/glue/sync_backend_host.h" | 11 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 13 #include "chrome/browser/sync/glue/sync_backend_host_core.h" | 12 #include "chrome/browser/sync/glue/sync_backend_host_core.h" |
| 14 #include "chrome/browser/sync/profile_sync_components_factory.h" | 13 #include "chrome/browser/sync/profile_sync_components_factory.h" |
| 15 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" | 14 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" |
| 16 #include "chrome/browser/sync/profile_sync_service_factory.h" | 15 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 17 #include "chrome/browser/sync/test/test_http_bridge_factory.h" | 16 #include "chrome/browser/sync/test/test_http_bridge_factory.h" |
| 18 #include "sync/internal_api/public/test/sync_manager_factory_for_profile_sync_te
st.h" | 17 #include "sync/internal_api/public/test/sync_manager_factory_for_profile_sync_te
st.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 96 } |
| 98 | 97 |
| 99 TestProfileSyncService::TestProfileSyncService( | 98 TestProfileSyncService::TestProfileSyncService( |
| 100 ProfileSyncComponentsFactory* factory, | 99 ProfileSyncComponentsFactory* factory, |
| 101 Profile* profile, | 100 Profile* profile, |
| 102 SigninManagerBase* signin, | 101 SigninManagerBase* signin, |
| 103 ProfileOAuth2TokenService* oauth2_token_service, | 102 ProfileOAuth2TokenService* oauth2_token_service, |
| 104 ProfileSyncService::StartBehavior behavior) | 103 ProfileSyncService::StartBehavior behavior) |
| 105 : ProfileSyncService(factory, | 104 : ProfileSyncService(factory, |
| 106 profile, | 105 profile, |
| 107 new ManagedUserSigninManagerWrapper(signin), | 106 signin, |
| 108 oauth2_token_service, | 107 oauth2_token_service, |
| 109 behavior) { | 108 behavior) { |
| 110 SetSyncSetupCompleted(); | 109 SetSyncSetupCompleted(); |
| 111 } | 110 } |
| 112 | 111 |
| 113 TestProfileSyncService::~TestProfileSyncService() { | 112 TestProfileSyncService::~TestProfileSyncService() { |
| 114 } | 113 } |
| 115 | 114 |
| 116 // static | 115 // static |
| 117 BrowserContextKeyedService* TestProfileSyncService::TestFactoryFunction( | 116 BrowserContextKeyedService* TestProfileSyncService::TestFactoryFunction( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 156 |
| 158 void TestProfileSyncService::OnConfigureDone( | 157 void TestProfileSyncService::OnConfigureDone( |
| 159 const browser_sync::DataTypeManager::ConfigureResult& result) { | 158 const browser_sync::DataTypeManager::ConfigureResult& result) { |
| 160 ProfileSyncService::OnConfigureDone(result); | 159 ProfileSyncService::OnConfigureDone(result); |
| 161 base::MessageLoop::current()->Quit(); | 160 base::MessageLoop::current()->Quit(); |
| 162 } | 161 } |
| 163 | 162 |
| 164 UserShare* TestProfileSyncService::GetUserShare() const { | 163 UserShare* TestProfileSyncService::GetUserShare() const { |
| 165 return backend_->GetUserShare(); | 164 return backend_->GetUserShare(); |
| 166 } | 165 } |
| OLD | NEW |