Index: components/browser_sync/profile_sync_service.cc |
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc |
index 2909868bc33e3addeee8a618ad28c941de3a26e5..188a4a0c89ccba2f357a8763be939850f6a2b27c 100644 |
--- a/components/browser_sync/profile_sync_service.cc |
+++ b/components/browser_sync/profile_sync_service.cc |
@@ -1386,6 +1386,7 @@ bool ProfileSyncService::IsFirstSetupInProgress() const { |
std::unique_ptr<syncer::SyncSetupInProgressHandle> |
ProfileSyncService::GetSetupInProgressHandle() { |
DCHECK(thread_checker_.CalledOnValidThread()); |
+ |
if (++outstanding_setup_in_progress_handles_ == 1) { |
DCHECK(!startup_controller_->IsSetupInProgress()); |
startup_controller_->SetSetupInProgress(true); |
@@ -2426,4 +2427,12 @@ void ProfileSyncService::OnSetupInProgressHandleDestroyed() { |
NotifyObservers(); |
} |
+void ProfileSyncService::ClearServerDataForTest(const base::Closure& callback) { |
pavely
2017/03/08 21:15:14
Why is this function placed at the end of file?
wylieb
2017/03/09 18:42:26
Good point. I moved it under ClearAndRestart...
|
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ // Sync has a restriction that the engine must be in configuration mode |
+ // in order to run clear server data. |
+ engine_->StartConfiguration(); |
+ engine_->ClearServerData(callback); |
+} |
+ |
} // namespace browser_sync |