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

Unified Diff: trunk/src/sync/internal_api/test/sync_manager_for_profile_sync_test.cc

Issue 98323003: Revert 238348 "Clean up TestProfileSyncService and related tests" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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: trunk/src/sync/internal_api/test/sync_manager_for_profile_sync_test.cc
===================================================================
--- trunk/src/sync/internal_api/test/sync_manager_for_profile_sync_test.cc (revision 238367)
+++ trunk/src/sync/internal_api/test/sync_manager_for_profile_sync_test.cc (working copy)
@@ -12,9 +12,11 @@
SyncManagerForProfileSyncTest::SyncManagerForProfileSyncTest(
std::string name,
- base::Closure init_callback)
+ base::Closure init_callback,
+ bool set_initial_sync_ended)
: SyncManagerImpl(name),
- init_callback_(init_callback) {}
+ init_callback_(init_callback),
+ set_initial_sync_ended_(set_initial_sync_ended) {}
SyncManagerForProfileSyncTest::~SyncManagerForProfileSyncTest() {}
@@ -25,14 +27,18 @@
if (!init_callback_.is_null())
init_callback_.Run();
- ModelTypeSet early_download_types;
- early_download_types.PutAll(ControlTypes());
- early_download_types.PutAll(PriorityUserTypes());
- for (ModelTypeSet::Iterator it = early_download_types.First();
- it.Good(); it.Inc()) {
- if (!directory->InitialSyncEndedForType(it.Get())) {
- syncer::TestUserShare::CreateRoot(it.Get(), user_share);
+ if (set_initial_sync_ended_) {
+ ModelTypeSet early_download_types;
+ early_download_types.PutAll(ControlTypes());
+ early_download_types.PutAll(PriorityUserTypes());
+ for (ModelTypeSet::Iterator it = early_download_types.First();
+ it.Good(); it.Inc()) {
+ if (!directory->InitialSyncEndedForType(it.Get())) {
+ syncer::TestUserShare::CreateRoot(it.Get(), user_share);
+ }
}
+ } else {
+ VLOG(2) << "Skipping directory init";
}
SyncManagerImpl::NotifyInitializationSuccess();

Powered by Google App Engine
This is Rietveld 408576698