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 d95fccdcf275cf30c22f545529571cfd7cd14f2b..7c8ed990729aea51523cadf8ae37b27d87cdb104 100644 |
| --- a/components/browser_sync/profile_sync_service.cc |
| +++ b/components/browser_sync/profile_sync_service.cc |
| @@ -713,6 +713,7 @@ void ProfileSyncService::OnRefreshTokensLoaded() { |
| void ProfileSyncService::Shutdown() { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| UnregisterAuthNotifications(); |
| + NotifyShutdown(); |
|
skym
2017/01/26 17:00:37
Having this right before ShutdownImpl(...), which
Steven Holte
2017/01/26 20:31:47
Done.
|
| ShutdownImpl(syncer::BROWSER_SHUTDOWN); |
| if (sync_error_controller_) { |
| @@ -854,6 +855,11 @@ void ProfileSyncService::NotifyForeignSessionUpdated() { |
| observer.OnForeignSessionUpdated(); |
| } |
| +void ProfileSyncService::NotifyShutdown() { |
| + for (auto& observer : observers_) |
| + observer.OnSyncShutdown(this); |
| +} |
| + |
| void ProfileSyncService::ClearStaleErrors() { |
| ClearUnrecoverableError(); |
| last_actionable_error_ = SyncProtocolError(); |
| @@ -1373,7 +1379,7 @@ void ProfileSyncService::OnConfigureDone( |
| // Notify listeners that configuration is done. |
| for (auto& observer : observers_) |
| - observer.OnSyncConfigurationCompleted(); |
| + observer.OnSyncConfigurationCompleted(this); |
| DVLOG(1) << "PSS OnConfigureDone called with status: " << configure_status_; |
| // The possible status values: |