Chromium Code Reviews| 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..a099077ecaf51ca0cf17f631ad834141ba128414 100644 |
| --- a/components/browser_sync/profile_sync_service.cc |
| +++ b/components/browser_sync/profile_sync_service.cc |
| @@ -21,6 +21,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/metrics/histogram.h" |
| #include "base/profiler/scoped_tracker.h" |
| +#include "base/run_loop.h" |
| #include "base/single_thread_task_runner.h" |
| #include "base/strings/stringprintf.h" |
| #include "base/threading/thread_restrictions.h" |
| @@ -1386,6 +1387,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 +2428,10 @@ void ProfileSyncService::OnSetupInProgressHandleDestroyed() { |
| NotifyObservers(); |
| } |
| +void ProfileSyncService::ClearServerDataForTest(const base::Closure& callback) { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
| + engine_->StartConfiguration(); |
|
skym
2017/03/07 21:32:25
I was always confused about this, why do you call
wylieb
2017/03/07 23:04:40
This is the only place I call StartConfiguration.
skym
2017/03/08 00:23:48
Heh, sorry, I said "again" because I've asked you
|
| + engine_->ClearServerData(callback); |
| +} |
| + |
| } // namespace browser_sync |