Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Unified Diff: chrome/browser/sync/test_profile_sync_service.cc

Issue 10483015: [Sync] Refactor sync configuration logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SetBool -> CallbackCounter Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test_profile_sync_service.cc
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index 6d167345331139596bc4d8d27be82bb0c094f614..4a89b8c1c4c3f55ed6073e620a75df46accacb82 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -44,19 +44,6 @@ SyncBackendHostForProfileSyncTest::SyncBackendHostForProfileSyncTest(
SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {}
-void SyncBackendHostForProfileSyncTest::
- SimulateSyncCycleCompletedInitialSyncEnded(
- const tracked_objects::Location& location) {
- syncable::ModelTypeSet sync_ended;
- if (!fail_initial_download_)
- sync_ended = syncable::ModelTypeSet::All();
- syncable::ModelTypePayloadMap download_progress_markers;
- HandleSyncCycleCompletedOnFrontendLoop(SyncSessionSnapshot(
- SyncerStatus(), ErrorCounters(), 0, false,
- sync_ended, download_progress_markers, false, false, 0, 0, 0, 0,
- SyncSourceInfo(), false, 0, base::Time::Now(), false));
-}
-
namespace {
sync_api::HttpPostProviderFactory* MakeTestHttpBridgeFactory() {
@@ -85,20 +72,19 @@ void SyncBackendHostForProfileSyncTest::InitCore(
}
}
-void SyncBackendHostForProfileSyncTest::StartConfiguration(
- const base::Closure& callback) {
- SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop();
- if (IsDownloadingNigoriForTest()) {
- syncable::ModelTypeSet sync_ended;
+void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer(
+ sync_api::ConfigureReason reason,
+ syncable::ModelTypeSet types_to_config,
+ const browser_sync::ModelSafeRoutingInfo& routing_info,
+ const base::Callback<void(syncable::ModelTypeSet)>& ready_task,
+ const base::Closure& retry_callback) {
+ syncable::ModelTypeSet sync_ended;
+ if (!fail_initial_download_)
+ sync_ended.PutAll(types_to_config);
- if (!fail_initial_download_)
- sync_ended.Put(syncable::NIGORI);
- syncable::ModelTypePayloadMap download_progress_markers;
- HandleSyncCycleCompletedOnFrontendLoop(SyncSessionSnapshot(
- SyncerStatus(), ErrorCounters(), 0, false,
- sync_ended, download_progress_markers, false, false, 0, 0, 0, 0,
- SyncSourceInfo(), false, 0, base::Time::Now(), false));
- }
+ FinishConfigureDataTypesOnFrontendLoop(types_to_config,
+ sync_ended,
+ ready_task);
}
void SyncBackendHostForProfileSyncTest::SetHistoryServiceExpectations(

Powered by Google App Engine
This is Rietveld 408576698