| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 1 // 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 |
| 2 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 3 | 4 |
| 4 #include "chrome/browser/sync/test_profile_sync_service.h" | 5 #include "chrome/browser/sync/test_profile_sync_service.h" |
| 5 | 6 |
| 6 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" | 7 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
| 7 #include "chrome/browser/sync/engine/syncapi.h" | 8 #include "chrome/browser/sync/engine/syncapi.h" |
| 8 #include "chrome/browser/sync/glue/data_type_controller.h" | 9 #include "chrome/browser/sync/glue/data_type_controller.h" |
| 9 #include "chrome/browser/sync/glue/sync_backend_host.h" | 10 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 10 #include "chrome/browser/sync/profile_sync_factory.h" | 11 #include "chrome/browser/sync/profile_sync_factory.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 namespace browser_sync { | 46 namespace browser_sync { |
| 46 | 47 |
| 47 using ::testing::_; | 48 using ::testing::_; |
| 48 SyncBackendHostForProfileSyncTest::SyncBackendHostForProfileSyncTest( | 49 SyncBackendHostForProfileSyncTest::SyncBackendHostForProfileSyncTest( |
| 49 Profile* profile, | 50 Profile* profile, |
| 50 bool set_initial_sync_ended_on_init, | 51 bool set_initial_sync_ended_on_init, |
| 51 bool synchronous_init, | 52 bool synchronous_init, |
| 52 bool fail_initial_download) | 53 bool fail_initial_download) |
| 53 : browser_sync::SyncBackendHost(profile), | 54 : browser_sync::SyncBackendHost(profile), |
| 54 synchronous_init_(synchronous_init), | 55 synchronous_init_(synchronous_init), |
| 55 fail_initial_download_(fail_initial_download) { | 56 fail_initial_download_(fail_initial_download) {} |
| 56 ON_CALL(*this, RequestNudge(_)).WillByDefault( | |
| 57 testing::Invoke(this, | |
| 58 &SyncBackendHostForProfileSyncTest:: | |
| 59 SimulateSyncCycleCompletedInitialSyncEnded)); | |
| 60 EXPECT_CALL(*this, RequestNudge(_)).Times(testing::AnyNumber()); | |
| 61 } | |
| 62 | 57 |
| 63 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {} | 58 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {} |
| 64 | 59 |
| 65 void SyncBackendHostForProfileSyncTest::ConfigureDataTypes( | 60 void SyncBackendHostForProfileSyncTest::ConfigureDataTypes( |
| 66 const DataTypeController::TypeMap& data_type_controllers, | 61 const DataTypeController::TypeMap& data_type_controllers, |
| 67 const syncable::ModelTypeSet& types, | 62 const syncable::ModelTypeSet& types, |
| 68 sync_api::ConfigureReason reason, | 63 sync_api::ConfigureReason reason, |
| 69 base::Callback<void(bool)> ready_task, | 64 base::Callback<void(bool)> ready_task, |
| 70 bool nigori_enabled) { | 65 bool nigori_enabled) { |
| 71 SyncBackendHost::ConfigureDataTypes(data_type_controllers, types, | 66 SyncBackendHost::ConfigureDataTypes(data_type_controllers, types, |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( | 293 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( |
| 299 profile(), | 294 profile(), |
| 300 set_initial_sync_ended_on_init_, | 295 set_initial_sync_ended_on_init_, |
| 301 synchronous_backend_initialization_, | 296 synchronous_backend_initialization_, |
| 302 fail_initial_download_)); | 297 fail_initial_download_)); |
| 303 } | 298 } |
| 304 | 299 |
| 305 std::string TestProfileSyncService::GetLsidForAuthBootstraping() { | 300 std::string TestProfileSyncService::GetLsidForAuthBootstraping() { |
| 306 return "foo"; | 301 return "foo"; |
| 307 } | 302 } |
| OLD | NEW |