| 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 158077adc04fd56541479a7530daef4903073947..a2c19b28eb0bdec51eb8c99b11ffa218008a4ec5 100644 | 
| --- a/chrome/browser/push_messaging/push_messaging_service_impl.cc | 
| +++ b/chrome/browser/push_messaging/push_messaging_service_impl.cc | 
| @@ -43,6 +43,7 @@ | 
| #include "content/public/common/child_process_host.h" | 
| #include "content/public/common/content_switches.h" | 
| #include "content/public/common/push_messaging_status.h" | 
| +#include "content/public/common/push_subscription_options.h" | 
| #include "ui/base/l10n/l10n_util.h" | 
|  | 
| #if defined(ENABLE_BACKGROUND) | 
| @@ -343,10 +344,9 @@ GURL PushMessagingServiceImpl::GetPushEndpoint() { | 
| void PushMessagingServiceImpl::SubscribeFromDocument( | 
| const GURL& requesting_origin, | 
| int64_t service_worker_registration_id, | 
| -    const std::string& sender_id, | 
| int renderer_id, | 
| int render_frame_id, | 
| -    bool user_visible, | 
| +    const content::PushSubscriptionOptions& options, | 
| const content::PushMessagingService::RegisterCallback& callback) { | 
| PushMessagingAppIdentifier app_identifier = | 
| PushMessagingAppIdentifier::Generate(requesting_origin, | 
| @@ -366,7 +366,7 @@ void PushMessagingServiceImpl::SubscribeFromDocument( | 
| if (!web_contents) | 
| return; | 
|  | 
| -  if (!user_visible) { | 
| +  if (!options.user_visible_only) { | 
| web_contents->GetMainFrame()->AddMessageToConsole( | 
| content::CONSOLE_MESSAGE_LEVEL_ERROR, kSilentPushUnsupportedMessage); | 
|  | 
| @@ -380,15 +380,14 @@ void PushMessagingServiceImpl::SubscribeFromDocument( | 
| content::PermissionType::PUSH_MESSAGING, web_contents->GetMainFrame(), | 
| requesting_origin, | 
| base::Bind(&PushMessagingServiceImpl::DidRequestPermission, | 
| -                 weak_factory_.GetWeakPtr(), app_identifier, sender_id, | 
| +                 weak_factory_.GetWeakPtr(), app_identifier, options, | 
| callback)); | 
| } | 
|  | 
| void PushMessagingServiceImpl::SubscribeFromWorker( | 
| const GURL& requesting_origin, | 
| int64_t service_worker_registration_id, | 
| -    const std::string& sender_id, | 
| -    bool user_visible, | 
| +    const content::PushSubscriptionOptions& options, | 
| const content::PushMessagingService::RegisterCallback& register_callback) { | 
| PushMessagingAppIdentifier app_identifier = | 
| PushMessagingAppIdentifier::Generate(requesting_origin, | 
| @@ -403,7 +402,7 @@ void PushMessagingServiceImpl::SubscribeFromWorker( | 
|  | 
| blink::WebPushPermissionStatus permission_status = | 
| PushMessagingServiceImpl::GetPermissionStatus(requesting_origin, | 
| -                                                    user_visible); | 
| +                                                    options.user_visible_only); | 
|  | 
| if (permission_status != blink::WebPushPermissionStatusGranted) { | 
| SubscribeEndWithError(register_callback, | 
| @@ -412,7 +411,7 @@ void PushMessagingServiceImpl::SubscribeFromWorker( | 
| } | 
|  | 
| IncreasePushSubscriptionCount(1, true /* is_pending */); | 
| -  std::vector<std::string> sender_ids(1, sender_id); | 
| +  std::vector<std::string> sender_ids(1, options.sender_info); | 
| GetGCMDriver()->Register(app_identifier.app_id(), sender_ids, | 
| base::Bind(&PushMessagingServiceImpl::DidSubscribe, | 
| weak_factory_.GetWeakPtr(), | 
| @@ -515,7 +514,7 @@ void PushMessagingServiceImpl::DidSubscribeWithEncryptionInfo( | 
|  | 
| void PushMessagingServiceImpl::DidRequestPermission( | 
| const PushMessagingAppIdentifier& app_identifier, | 
| -    const std::string& sender_id, | 
| +    const content::PushSubscriptionOptions& options, | 
| const content::PushMessagingService::RegisterCallback& register_callback, | 
| content::PermissionStatus permission_status) { | 
| if (permission_status != content::PermissionStatus::GRANTED) { | 
| @@ -525,7 +524,7 @@ void PushMessagingServiceImpl::DidRequestPermission( | 
| } | 
|  | 
| IncreasePushSubscriptionCount(1, true /* is_pending */); | 
| -  std::vector<std::string> sender_ids(1, sender_id); | 
| +  std::vector<std::string> sender_ids(1, options.sender_info); | 
| GetGCMDriver()->Register(app_identifier.app_id(), sender_ids, | 
| base::Bind(&PushMessagingServiceImpl::DidSubscribe, | 
| weak_factory_.GetWeakPtr(), | 
|  |