fix: base::DictionaryValue usage in APNS notifs (#34897)

This commit is contained in:
Shelley Vohr 2022-07-13 12:22:17 +02:00 committed by GitHub
parent afd08c9450
commit 62aeb74d7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -39,7 +39,7 @@ class PushNotifications
PushNotifications& operator=(const PushNotifications&) = delete; PushNotifications& operator=(const PushNotifications&) = delete;
#if BUILDFLAG(IS_MAC) #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 ResolveAPNSPromiseSetWithToken(const std::string& token_string);
void RejectAPNSPromiseSetWithError(const std::string& error_message); void RejectAPNSPromiseSetWithError(const std::string& error_message);
#endif #endif

View file

@ -53,7 +53,7 @@ void PushNotifications::UnregisterForAPNSNotifications() {
} }
void PushNotifications::OnDidReceiveAPNSNotification( void PushNotifications::OnDidReceiveAPNSNotification(
const base::DictionaryValue& user_info) { const base::Value::Dict& user_info) {
Emit("received-apns-notification", user_info); Emit("received-apns-notification", user_info);
} }

View file

@ -193,7 +193,7 @@ static NSDictionary* UNNotificationResponseToNSDictionary(
electron::api::PushNotifications::Get(); electron::api::PushNotifications::Get();
if (push_notifications) { if (push_notifications) {
electron::api::PushNotifications::Get()->OnDidReceiveAPNSNotification( electron::api::PushNotifications::Get()->OnDidReceiveAPNSNotification(
electron::NSDictionaryToDictionaryValue(userInfo)); electron::NSDictionaryToValue(userInfo));
} }
} }