| 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 093400854fe0515a5980c3546a4da03fa4a491ea..9390a0673d8c18c87391baa3cab57106b013dc2f 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(
|
| + 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(
|
|
|