Chromium Code Reviews| Index: content/browser/push_messaging/push_messaging_message_filter.cc |
| diff --git a/content/browser/push_messaging/push_messaging_message_filter.cc b/content/browser/push_messaging/push_messaging_message_filter.cc |
| index ef75724c1aecc32ee0f7dbcbc9f6f42a13e50fb9..bf83c6b18331d3833e32e6d7b96013c87db3fd27 100644 |
| --- a/content/browser/push_messaging/push_messaging_message_filter.cc |
| +++ b/content/browser/push_messaging/push_messaging_message_filter.cc |
| @@ -298,9 +298,17 @@ void PushMessagingMessageFilter::OnSubscribeFromWorker( |
| } |
| data.requesting_origin = service_worker_registration->pattern().GetOrigin(); |
| - // If there is a sender_info in the subscription options, it will be used, |
| - // otherwise the registration sender_info will be used. |
| - CheckForExistingRegistration(data, options); |
| + if (!options.sender_info.empty()) { |
| + service_worker_context_->StoreRegistrationUserData( |
|
Michael van Ouwerkerk
2016/03/30 09:50:04
Yikes! Glad we got that one.
harkness
2016/03/30 10:51:49
yup! (although ideally we'd completely remove the
|
| + service_worker_registration_id, data.requesting_origin, |
| + kPushSenderIdServiceWorkerKey, options.sender_info, |
| + base::Bind(&PushMessagingMessageFilter::DidPersistSenderInfo, |
| + weak_factory_io_to_io_.GetWeakPtr(), data, options)); |
| + } else { |
| + // If there is a sender_info in the subscription options, it will be used, |
| + // otherwise the registration sender_info will be used. |
| + CheckForExistingRegistration(data, options); |
| + } |
| } |
| void PushMessagingMessageFilter::DidPersistSenderInfo( |