fix: -Wunsafe-buffer-usage warning in didRegisterForRemoteNotificationsWithDeviceToken (#44348)
* chore: move as_byte_span() to new shell/common/mac_util.h this way it can be used by multiple mm files * fix: -Wunsafe-buffer-usage warnings in UNNotificationResponseToNSDictionary * refactor: use base::HexEncode() instead of rolling our own * fixup! chore: move as_byte_span() to new shell/common/mac_util.h * fixup! chore: move as_byte_span() to new shell/common/mac_util.h fix: move mac_util to the right place in filenames.gni
This commit is contained in:
parent
c42fb09fc9
commit
83d7040096
5 changed files with 49 additions and 25 deletions
18
shell/common/mac_util.h
Normal file
18
shell/common/mac_util.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright (c) 2024 Microsoft, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_MAC_UTIL_H_
|
||||
#define ELECTRON_SHELL_MAC_UTIL_H_
|
||||
|
||||
#include "base/containers/span.h"
|
||||
|
||||
@class NSData;
|
||||
|
||||
namespace electron::util {
|
||||
|
||||
base::span<const uint8_t> as_byte_span(NSData* data);
|
||||
|
||||
} // namespace electron::util
|
||||
|
||||
#endif // ELECTRON_SHELL_MAC_UTIL_H_
|
Loading…
Add table
Add a link
Reference in a new issue