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..b941c6d38f2af8d0e02625d99c050ccf81a21388 100644 |
--- a/components/browser_sync/profile_sync_service.cc |
+++ b/components/browser_sync/profile_sync_service.cc |
@@ -715,6 +715,7 @@ void ProfileSyncService::Shutdown() { |
UnregisterAuthNotifications(); |
ShutdownImpl(syncer::BROWSER_SHUTDOWN); |
+ NotifyShutdown(); |
if (sync_error_controller_) { |
// Destroy the SyncErrorController when the service shuts down for good. |
RemoveObserver(sync_error_controller_.get()); |
@@ -841,17 +842,22 @@ void ProfileSyncService::UpdateLastSyncedTime() { |
void ProfileSyncService::NotifyObservers() { |
for (auto& observer : observers_) |
- observer.OnStateChanged(); |
+ observer.OnStateChanged(this); |
} |
void ProfileSyncService::NotifySyncCycleCompleted() { |
for (auto& observer : observers_) |
- observer.OnSyncCycleCompleted(); |
+ observer.OnSyncCycleCompleted(this); |
} |
void ProfileSyncService::NotifyForeignSessionUpdated() { |
for (auto& observer : observers_) |
- observer.OnForeignSessionUpdated(); |
+ observer.OnForeignSessionUpdated(this); |
+} |
+ |
+void ProfileSyncService::NotifyShutdown() { |
+ for (auto& observer : observers_) |
+ observer.OnSyncShutdown(this); |
} |
void ProfileSyncService::ClearStaleErrors() { |
@@ -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: |