commit | 21e19401af0b12d13ddc14d4a167f1b02ec65a6b | [log] [tgz] |
---|---|---|
author | Johannes Henkel <[email protected]> | Fri Dec 20 03:23:17 2019 |
committer | Commit Bot <[email protected]> | Fri Dec 20 03:23:17 2019 |
tree | b05d36095a84ec6b9a6cc25e68462fba68b17d08 | |
parent | 33387b0321ff593e1874e17fff43fbe063828ded [diff] |
[DevTools] Use base::span<const uint8_t> for devtools messages in content/public The interfaces in content/public currently use const std::string& for devtools messages. This requires client code as well as implementation code to use an std::string for representing the messages (depending on the code that's providing the const std::string&). Moving to base::span allows code to use any container that gives access to a sequence of bytes without having to make a copy, including: - std::string (just like now) - std::vector<uint8_t> (base::span<const uint8_t>'s implicit constructor takes it). - the BigBuffer from Mojo (provides a base::span<const uint8_t> already). - base::span<const uint8_t> - crdtp::span<uint8_t> (base::span<const uint8_t>'s implicit constructor takes it). - base::StringPiece (going to / from this one requires a reinterpret_cast, but at least it's efficient). The switch removes a few copies of byte sequences (e.g. from BigBuffer to std::string). It introduces a few conversions between the non-owning representations, but these are cheap. This PR includes a roll of third_party/inspector_protocol. New revision is: 3b0551d3904f7fc067e78905ce697002187fa7a5 Change-Id: I4bea62307378f72ae95fa631db42c3bc95694d2e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1965407 Reviewed-by: Charlie Harrison <[email protected]> Reviewed-by: Stephane Zermatten <[email protected]> Reviewed-by: Josh Karlin <[email protected]> Reviewed-by: Yusuf Ozuysal <[email protected]> Reviewed-by: Istiaque Ahmed <[email protected]> Reviewed-by: Ken Rockot <[email protected]> Reviewed-by: Andrey Kosyakov <[email protected]> Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Johannes Henkel <[email protected]> Cr-Commit-Position: refs/heads/master@{#726674}
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 .