| 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/invalidation/profile_invalidation_provider_factory.h" | 8 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 TestProfileSyncService::GetJsEventHandler() { | 99 TestProfileSyncService::GetJsEventHandler() { |
| 100 return syncer::WeakHandle<syncer::JsEventHandler>(); | 100 return syncer::WeakHandle<syncer::JsEventHandler>(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 TestProfileSyncService::TestProfileSyncService( | 103 TestProfileSyncService::TestProfileSyncService( |
| 104 ProfileSyncComponentsFactory* factory, | 104 ProfileSyncComponentsFactory* factory, |
| 105 Profile* profile, | 105 Profile* profile, |
| 106 SigninManagerBase* signin, | 106 SigninManagerBase* signin, |
| 107 ProfileOAuth2TokenService* oauth2_token_service, | 107 ProfileOAuth2TokenService* oauth2_token_service, |
| 108 browser_sync::ProfileSyncServiceStartBehavior behavior) | 108 browser_sync::ProfileSyncServiceStartBehavior behavior) |
| 109 : ProfileSyncService(factory, | 109 : ProfileSyncService( |
| 110 profile, | 110 factory, |
| 111 new ManagedUserSigninManagerWrapper(profile, signin), | 111 profile, |
| 112 oauth2_token_service, | 112 make_scoped_ptr(new ManagedUserSigninManagerWrapper(profile, signin)), |
| 113 behavior) { | 113 oauth2_token_service, |
| 114 behavior) { |
| 114 SetSyncSetupCompleted(); | 115 SetSyncSetupCompleted(); |
| 115 } | 116 } |
| 116 | 117 |
| 117 TestProfileSyncService::~TestProfileSyncService() { | 118 TestProfileSyncService::~TestProfileSyncService() { |
| 118 } | 119 } |
| 119 | 120 |
| 120 // static | 121 // static |
| 121 KeyedService* TestProfileSyncService::TestFactoryFunction( | 122 KeyedService* TestProfileSyncService::TestFactoryFunction( |
| 122 content::BrowserContext* context) { | 123 content::BrowserContext* context) { |
| 123 Profile* profile = static_cast<Profile*>(context); | 124 Profile* profile = static_cast<Profile*>(context); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 165 |
| 165 void TestProfileSyncService::OnConfigureDone( | 166 void TestProfileSyncService::OnConfigureDone( |
| 166 const browser_sync::DataTypeManager::ConfigureResult& result) { | 167 const browser_sync::DataTypeManager::ConfigureResult& result) { |
| 167 ProfileSyncService::OnConfigureDone(result); | 168 ProfileSyncService::OnConfigureDone(result); |
| 168 base::MessageLoop::current()->Quit(); | 169 base::MessageLoop::current()->Quit(); |
| 169 } | 170 } |
| 170 | 171 |
| 171 UserShare* TestProfileSyncService::GetUserShare() const { | 172 UserShare* TestProfileSyncService::GetUserShare() const { |
| 172 return backend_->GetUserShare(); | 173 return backend_->GetUserShare(); |
| 173 } | 174 } |
| OLD | NEW |