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