commit | 73ee4ee83c24dcb05b35423bf2e9cbb4b66060c4 | [log] [tgz] |
---|---|---|
author | Kyle Horimoto <khorimoto@google.com> | Thu Jul 26 19:12:18 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jul 26 19:12:18 2018 |
tree | b5bbb4f4db5879a7eacfeb17d0044003e8c28e6f | |
parent | 2265de70455f330d4463e0b559152dc98c93c551 [diff] |
[CrOS MultiDevice] Adjust RemoteDevice Mojo struct for setup flow. As part of the MultiDeviceSetup flow, we use JS <==> C++ Mojo bindings, so we were transferring RemoteDevice objects from C++ to JS. RemoteDevice objects hold a "public_key" field, which is a std::string containing randomly-generated bits. These bits are not all necessarily ASCII characters and often contain NULL characters before the end of the string. The std::string class handles this situation, but JS strings do not. Thus, transferring the public_key field was problematic because the key would not be received correctly on the JS side. This CL modifies device_sync.mojom's RemoteDevice struct: * The device ID (human-readable string) is included instead of the public key. * StructTraits use RemoteDeviceRef::DerivePublicKey() to retrieve the public key on the other side of the pipe. Additionally, this CL modifies multidevice_setup.mojom such that SetHostDevice() now takes a device ID instead of a public key as a parameter. Bug: 824568 Change-Id: I16bda595ce25ba9321f11d3f455fbbeec71d7809 Reviewed-on: https://chromium-review.googlesource.com/1149328 Reviewed-by: Ryan Hansberry <hansberry@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#578392}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .