| Index: chrome/browser/push_messaging/push_messaging_service_impl.cc
|
| diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.cc b/chrome/browser/push_messaging/push_messaging_service_impl.cc
|
| index 01be33903bd19535549242edf370a773f88fc19c..11c16f159f3b26278880eeffc71a63d486eb2cd8 100644
|
| --- a/chrome/browser/push_messaging/push_messaging_service_impl.cc
|
| +++ b/chrome/browser/push_messaging/push_messaging_service_impl.cc
|
| @@ -252,6 +252,19 @@ void PushMessagingServiceImpl::ShutdownHandler() {
|
| NOTREACHED();
|
| }
|
|
|
| +void PushMessagingServiceImpl::OnStoreReset() {
|
| + // Delete all cached subscriptions, since they are now invalid.
|
| + for (const auto& identifier : PushMessagingAppIdentifier::GetAll(profile_)) {
|
| + // Clear all the subscriptions in parallel, to reduce risk that shutdown
|
| + // occurs before we finish clearing them.
|
| + ClearPushSubscriptionId(profile_, identifier.origin(),
|
| + identifier.service_worker_registration_id(),
|
| + base::Bind(&base::DoNothing));
|
| + // TODO(johnme): Fire pushsubscriptionchange/pushsubscriptionlost SW event.
|
| + }
|
| + PushMessagingAppIdentifier::DeleteAllFromPrefs(profile_);
|
| +}
|
| +
|
| // OnMessage methods -----------------------------------------------------------
|
|
|
| void PushMessagingServiceImpl::OnMessage(const std::string& app_id,
|
|
|