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

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

Issue 10689185: Revert 146262 - Revert "Revert 142517 - [Sync] Refactor sync configuration logic." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.h ('k') | sync/engine/sync_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test_profile_sync_service.cc
===================================================================
--- chrome/browser/sync/test_profile_sync_service.cc (revision 146499)
+++ chrome/browser/sync/test_profile_sync_service.cc (working copy)
@@ -42,6 +42,20 @@
SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {}
+void SyncBackendHostForProfileSyncTest::
+ SimulateSyncCycleCompletedInitialSyncEnded(
+ const tracked_objects::Location& location) {
+ syncer::ModelTypeSet sync_ended;
+ if (!fail_initial_download_)
+ sync_ended = syncer::ModelTypeSet::All();
+ syncer::ModelTypePayloadMap download_progress_markers;
+ HandleSyncCycleCompletedOnFrontendLoop(
+ SyncSessionSnapshot(
+ ModelNeutralState(), false, sync_ended, download_progress_markers,
+ false, false, 0, 0, 0, 0, SyncSourceInfo(), false, 0,
+ base::Time::Now(), false));
+}
+
namespace {
syncer::HttpPostProviderFactory* MakeTestHttpBridgeFactory() {
@@ -70,19 +84,21 @@
}
}
-void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer(
- syncer::ConfigureReason reason,
- syncer::ModelTypeSet types_to_config,
- const syncer::ModelSafeRoutingInfo& routing_info,
- const base::Callback<void(syncer::ModelTypeSet)>& ready_task,
- const base::Closure& retry_callback) {
- syncer::ModelTypeSet sync_ended;
- if (!fail_initial_download_)
- sync_ended.PutAll(types_to_config);
+void SyncBackendHostForProfileSyncTest::StartConfiguration(
+ const base::Closure& callback) {
+ SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop();
+ if (IsDownloadingNigoriForTest()) {
+ syncer::ModelTypeSet sync_ended;
- FinishConfigureDataTypesOnFrontendLoop(types_to_config,
- sync_ended,
- ready_task);
+ if (!fail_initial_download_)
+ sync_ended.Put(syncer::NIGORI);
+ syncer::ModelTypePayloadMap download_progress_markers;
+ HandleSyncCycleCompletedOnFrontendLoop(
+ SyncSessionSnapshot(
+ ModelNeutralState(), false, sync_ended, download_progress_markers,
+ false, false, 0, 0, 0, 0, SyncSourceInfo(), false, 0,
+ base::Time::Now(), false));
+ }
}
void SyncBackendHostForProfileSyncTest::SetHistoryServiceExpectations(
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.h ('k') | sync/engine/sync_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698