refactor: use base::as_byte_span() in EncodeToken(). (#45752)
This matches the change in upstream's serial_chooser_context.cc. https://chromium-review.googlesource.com/c/chromium/src/+/5247305 Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
671178cfdb
commit
4015b8c48e
1 changed files with 1 additions and 2 deletions
|
@ -28,8 +28,7 @@ namespace {
|
|||
std::string EncodeToken(const base::UnguessableToken& token) {
|
||||
const uint64_t data[2] = {token.GetHighForSerialization(),
|
||||
token.GetLowForSerialization()};
|
||||
return base::Base64Encode(
|
||||
std::string_view(reinterpret_cast<const char*>(&data[0]), sizeof(data)));
|
||||
return base::Base64Encode(base::as_byte_span(data));
|
||||
}
|
||||
|
||||
base::Value PortInfoToValue(const device::mojom::SerialPortInfo& port) {
|
||||
|
|
Loading…
Add table
Reference in a new issue