| 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" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| 47 namespace browser_sync { | 47 namespace browser_sync { |
| 48 | 48 |
| 49 SyncBackendHostForProfileSyncTest::SyncBackendHostForProfileSyncTest( | 49 SyncBackendHostForProfileSyncTest::SyncBackendHostForProfileSyncTest( |
| 50 Profile* profile, | 50 Profile* profile, |
| 51 bool set_initial_sync_ended_on_init, | 51 bool set_initial_sync_ended_on_init, |
| 52 bool synchronous_init, | 52 bool synchronous_init, |
| 53 bool fail_initial_download) | 53 bool fail_initial_download) |
| 54 : browser_sync::SyncBackendHost(profile), | 54 : browser_sync::SyncBackendHost(profile->GetDebugName(), profile), |
| 55 synchronous_init_(synchronous_init), | 55 synchronous_init_(synchronous_init), |
| 56 fail_initial_download_(fail_initial_download) {} | 56 fail_initial_download_(fail_initial_download) {} |
| 57 | 57 |
| 58 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {} | 58 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {} |
| 59 | 59 |
| 60 void SyncBackendHostForProfileSyncTest:: | 60 void SyncBackendHostForProfileSyncTest:: |
| 61 SimulateSyncCycleCompletedInitialSyncEnded( | 61 SimulateSyncCycleCompletedInitialSyncEnded( |
| 62 const tracked_objects::Location& location) { | 62 const tracked_objects::Location& location) { |
| 63 syncable::ModelTypeBitSet sync_ended; | 63 syncable::ModelTypeBitSet sync_ended; |
| 64 if (!fail_initial_download_) | 64 if (!fail_initial_download_) |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 fail_initial_download_ = true; | 235 fail_initial_download_ = true; |
| 236 } | 236 } |
| 237 | 237 |
| 238 void TestProfileSyncService::CreateBackend() { | 238 void TestProfileSyncService::CreateBackend() { |
| 239 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( | 239 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( |
| 240 profile(), | 240 profile(), |
| 241 set_initial_sync_ended_on_init_, | 241 set_initial_sync_ended_on_init_, |
| 242 synchronous_backend_initialization_, | 242 synchronous_backend_initialization_, |
| 243 fail_initial_download_)); | 243 fail_initial_download_)); |
| 244 } | 244 } |
| OLD | NEW |