OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/sync/abstract_profile_sync_service_test.h" | 7 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
8 #include "chrome/browser/sync/glue/data_type_controller.h" | 8 #include "chrome/browser/sync/glue/data_type_controller.h" |
9 #include "chrome/browser/sync/glue/sync_backend_host.h" | 9 #include "chrome/browser/sync/glue/sync_backend_host.h" |
10 #include "chrome/browser/sync/internal_api/user_share.h" | 10 #include "chrome/browser/sync/internal_api/user_share.h" |
11 #include "chrome/browser/sync/js/js_reply_handler.h" | 11 #include "chrome/browser/sync/js/js_reply_handler.h" |
12 #include "chrome/browser/sync/profile_sync_factory.h" | 12 #include "chrome/browser/sync/profile_sync_components_factory.h" |
13 #include "chrome/browser/sync/sessions/session_state.h" | 13 #include "chrome/browser/sync/sessions/session_state.h" |
14 #include "chrome/browser/sync/signin_manager.h" | 14 #include "chrome/browser/sync/signin_manager.h" |
15 #include "chrome/browser/sync/syncable/directory_manager.h" | 15 #include "chrome/browser/sync/syncable/directory_manager.h" |
16 #include "chrome/browser/sync/syncable/syncable.h" | 16 #include "chrome/browser/sync/syncable/syncable.h" |
17 #include "chrome/browser/sync/test/test_http_bridge_factory.h" | 17 #include "chrome/browser/sync/test/test_http_bridge_factory.h" |
18 #include "chrome/common/chrome_notification_types.h" | 18 #include "chrome/common/chrome_notification_types.h" |
19 | 19 |
20 using browser_sync::ModelSafeRoutingInfo; | 20 using browser_sync::ModelSafeRoutingInfo; |
21 using browser_sync::sessions::ErrorCounters; | 21 using browser_sync::sessions::ErrorCounters; |
22 using browser_sync::sessions::SyncSourceInfo; | 22 using browser_sync::sessions::SyncSourceInfo; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 return &id_factory_; | 128 return &id_factory_; |
129 } | 129 } |
130 | 130 |
131 browser_sync::SyncBackendHostForProfileSyncTest* | 131 browser_sync::SyncBackendHostForProfileSyncTest* |
132 TestProfileSyncService::GetBackendForTest() { | 132 TestProfileSyncService::GetBackendForTest() { |
133 return static_cast<browser_sync::SyncBackendHostForProfileSyncTest*>( | 133 return static_cast<browser_sync::SyncBackendHostForProfileSyncTest*>( |
134 ProfileSyncService::GetBackendForTest()); | 134 ProfileSyncService::GetBackendForTest()); |
135 } | 135 } |
136 | 136 |
137 TestProfileSyncService::TestProfileSyncService( | 137 TestProfileSyncService::TestProfileSyncService( |
138 ProfileSyncFactory* factory, | 138 ProfileSyncComponentsFactory* factory, |
139 Profile* profile, | 139 Profile* profile, |
140 const std::string& test_user, | 140 const std::string& test_user, |
141 bool synchronous_backend_initialization, | 141 bool synchronous_backend_initialization, |
142 Task* initial_condition_setup_task) | 142 Task* initial_condition_setup_task) |
143 : ProfileSyncService(factory, profile, new FakeSigninManager(), test_user), | 143 : ProfileSyncService(factory, profile, new FakeSigninManager(), test_user), |
144 synchronous_backend_initialization_( | 144 synchronous_backend_initialization_( |
145 synchronous_backend_initialization), | 145 synchronous_backend_initialization), |
146 synchronous_sync_configuration_(false), | 146 synchronous_sync_configuration_(false), |
147 initial_condition_setup_task_(initial_condition_setup_task), | 147 initial_condition_setup_task_(initial_condition_setup_task), |
148 set_initial_sync_ended_on_init_(true), | 148 set_initial_sync_ended_on_init_(true), |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 237 } |
238 | 238 |
239 void TestProfileSyncService::CreateBackend() { | 239 void TestProfileSyncService::CreateBackend() { |
240 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( | 240 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( |
241 profile(), | 241 profile(), |
242 sync_prefs_.AsWeakPtr(), | 242 sync_prefs_.AsWeakPtr(), |
243 set_initial_sync_ended_on_init_, | 243 set_initial_sync_ended_on_init_, |
244 synchronous_backend_initialization_, | 244 synchronous_backend_initialization_, |
245 fail_initial_download_)); | 245 fail_initial_download_)); |
246 } | 246 } |
OLD | NEW |