From 62aeb74d7c8ec49b7c47915d4befee8dba3e8c14 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 13 Jul 2022 12:22:17 +0200 Subject: [PATCH] fix: `base::DictionaryValue` usage in APNS notifs (#34897) --- shell/browser/api/electron_api_push_notifications.h | 2 +- shell/browser/api/electron_api_push_notifications_mac.mm | 2 +- shell/browser/mac/electron_application_delegate.mm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/browser/api/electron_api_push_notifications.h b/shell/browser/api/electron_api_push_notifications.h index f818afdd109d..f0f46b5e574e 100644 --- a/shell/browser/api/electron_api_push_notifications.h +++ b/shell/browser/api/electron_api_push_notifications.h @@ -39,7 +39,7 @@ class PushNotifications PushNotifications& operator=(const PushNotifications&) = delete; #if BUILDFLAG(IS_MAC) - void OnDidReceiveAPNSNotification(const base::DictionaryValue& user_info); + void OnDidReceiveAPNSNotification(const base::Value::Dict& user_info); void ResolveAPNSPromiseSetWithToken(const std::string& token_string); void RejectAPNSPromiseSetWithError(const std::string& error_message); #endif diff --git a/shell/browser/api/electron_api_push_notifications_mac.mm b/shell/browser/api/electron_api_push_notifications_mac.mm index c52511625a70..6838293937a8 100644 --- a/shell/browser/api/electron_api_push_notifications_mac.mm +++ b/shell/browser/api/electron_api_push_notifications_mac.mm @@ -53,7 +53,7 @@ void PushNotifications::UnregisterForAPNSNotifications() { } void PushNotifications::OnDidReceiveAPNSNotification( - const base::DictionaryValue& user_info) { + const base::Value::Dict& user_info) { Emit("received-apns-notification", user_info); } diff --git a/shell/browser/mac/electron_application_delegate.mm b/shell/browser/mac/electron_application_delegate.mm index 013f51137e4b..7dc351f4cc65 100644 --- a/shell/browser/mac/electron_application_delegate.mm +++ b/shell/browser/mac/electron_application_delegate.mm @@ -193,7 +193,7 @@ static NSDictionary* UNNotificationResponseToNSDictionary( electron::api::PushNotifications::Get(); if (push_notifications) { electron::api::PushNotifications::Get()->OnDidReceiveAPNSNotification( - electron::NSDictionaryToDictionaryValue(userInfo)); + electron::NSDictionaryToValue(userInfo)); } }