Chromium Code Reviews| 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/signin/signin_manager.h" | 7 #include "chrome/browser/signin/signin_manager.h" |
| 8 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" | 8 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
| 9 #include "chrome/browser/sync/glue/data_type_controller.h" | 9 #include "chrome/browser/sync/glue/data_type_controller.h" |
| 10 #include "chrome/browser/sync/glue/sync_backend_host.h" | 10 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 MessageLoop::current()->Run(); | 79 MessageLoop::current()->Run(); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer( | 83 void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer( |
| 84 syncer::ConfigureReason reason, | 84 syncer::ConfigureReason reason, |
| 85 syncer::ModelTypeSet types_to_config, | 85 syncer::ModelTypeSet types_to_config, |
| 86 const syncer::ModelSafeRoutingInfo& routing_info, | 86 const syncer::ModelSafeRoutingInfo& routing_info, |
| 87 const base::Callback<void(syncer::ModelTypeSet)>& ready_task, | 87 const base::Callback<void(syncer::ModelTypeSet)>& ready_task, |
| 88 const base::Closure& retry_callback) { | 88 const base::Closure& retry_callback) { |
| 89 syncer::ModelTypeSet sync_ended; | 89 syncer::ModelTypeSet failed_configuration_types; |
| 90 if (!fail_initial_download_) | 90 if (fail_initial_download_) { |
|
Nicolas Zea
2012/07/24 18:09:31
nit: remove curly brace
akalin
2012/07/24 18:59:39
Done.
| |
| 91 sync_ended.PutAll(types_to_config); | 91 failed_configuration_types = types_to_config; |
| 92 } | |
| 92 | 93 |
| 93 FinishConfigureDataTypesOnFrontendLoop(types_to_config, | 94 FinishConfigureDataTypesOnFrontendLoop(failed_configuration_types, |
| 94 sync_ended, | |
| 95 ready_task); | 95 ready_task); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace browser_sync | 98 } // namespace browser_sync |
| 99 | 99 |
| 100 syncer::TestIdFactory* TestProfileSyncService::id_factory() { | 100 syncer::TestIdFactory* TestProfileSyncService::id_factory() { |
| 101 return &id_factory_; | 101 return &id_factory_; |
| 102 } | 102 } |
| 103 | 103 |
| 104 browser_sync::SyncBackendHostForProfileSyncTest* | 104 browser_sync::SyncBackendHostForProfileSyncTest* |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 void TestProfileSyncService::CreateBackend() { | 213 void TestProfileSyncService::CreateBackend() { |
| 214 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( | 214 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( |
| 215 profile(), | 215 profile(), |
| 216 sync_prefs_.AsWeakPtr(), | 216 sync_prefs_.AsWeakPtr(), |
| 217 invalidator_storage_.AsWeakPtr(), | 217 invalidator_storage_.AsWeakPtr(), |
| 218 set_initial_sync_ended_on_init_, | 218 set_initial_sync_ended_on_init_, |
| 219 synchronous_backend_initialization_, | 219 synchronous_backend_initialization_, |
| 220 fail_initial_download_, | 220 fail_initial_download_, |
| 221 use_real_database_)); | 221 use_real_database_)); |
| 222 } | 222 } |
| OLD | NEW |