| Index: components/browser_sync/browser/profile_sync_service.cc
|
| diff --git a/components/browser_sync/browser/profile_sync_service.cc b/components/browser_sync/browser/profile_sync_service.cc
|
| index 16c0aa28bba02e30aceb6dc7f3c3d7eaad8bdabe..4168d6b4db0414118c0d5822376711523ae07281 100644
|
| --- a/components/browser_sync/browser/profile_sync_service.cc
|
| +++ b/components/browser_sync/browser/profile_sync_service.cc
|
| @@ -807,6 +807,12 @@ void ProfileSyncService::ShutdownImpl(syncer::ShutdownReason reason) {
|
|
|
| startup_controller_->Reset(GetRegisteredDataTypes());
|
|
|
| + // If the sync DB is getting destroyed, the local DeviceInfo is no longer
|
| + // valid and should be cleared from the cache.
|
| + if (reason == syncer::ShutdownReason::DISABLE_SYNC) {
|
| + local_device_->Clear();
|
| + }
|
| +
|
| // Clear various flags.
|
| expect_sync_configuration_aborted_ = false;
|
| is_auth_in_progress_ = false;
|
|
|