| 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 b5f409e4accbf02adb278c330c12f5b82809b7af..9f12a01572a133b3c6de292ef3b834faa9353b48 100644
|
| --- a/chrome/browser/push_messaging/push_messaging_service_impl.cc
|
| +++ b/chrome/browser/push_messaging/push_messaging_service_impl.cc
|
| @@ -45,6 +45,7 @@
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/common/push_messaging_status.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| +#include "url/origin.h"
|
|
|
| #if BUILDFLAG(ENABLE_BACKGROUND)
|
| #include "chrome/browser/background/background_mode_manager.h"
|
| @@ -379,7 +380,7 @@ void PushMessagingServiceImpl::SubscribeFromDocument(
|
| // Push does not allow permission requests from iframes.
|
| profile_->GetPermissionManager()->RequestPermission(
|
| content::PermissionType::PUSH_MESSAGING, web_contents->GetMainFrame(),
|
| - requesting_origin,
|
| + url::Origin(requesting_origin),
|
| base::Bind(&PushMessagingServiceImpl::DidRequestPermission,
|
| weak_factory_.GetWeakPtr(), app_identifier, sender_id,
|
| callback));
|
| @@ -429,8 +430,9 @@ blink::WebPushPermissionStatus PushMessagingServiceImpl::GetPermissionStatus(
|
| // Because the Push API is tied to Service Workers, many usages of the API
|
| // won't have an embedding origin at all. Only consider the requesting
|
| // |origin| when checking whether permission to use the API has been granted.
|
| + url::Origin actual_origin(origin);
|
| return ToPushPermission(profile_->GetPermissionManager()->GetPermissionStatus(
|
| - content::PermissionType::PUSH_MESSAGING, origin, origin));
|
| + content::PermissionType::PUSH_MESSAGING, actual_origin, actual_origin));
|
| }
|
|
|
| bool PushMessagingServiceImpl::SupportNonVisibleMessages() {
|
|
|