Migrate GURL method callers to get StringPieces rather than strings |
|
Issue descriptionGURL has host_piece and path_piece, but those APIs are newer, and less used . Many consumers do not need to copy the underlying string, so we should either migrate them to use the _piece version, or simplify GURL's API and only vend StringPieces (callers can just use as_string() on the result).
,
Apr 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/03345cedd4e1b5ca27baab9ca20de23e6cfac7ff commit 03345cedd4e1b5ca27baab9ca20de23e6cfac7ff Author: Reilly Grant <reillyg@chromium.org> Date: Mon Apr 30 23:16:32 2018 Use host_piece() when comparing web store URL This change avoids allocating an additional std::string by using the host_piece() method on GURL instead of using host() when comparing against another GURL. Bug: 663729 Change-Id: I3afd3aeccc0ecca4c04a77543adbdb856a78940e Reviewed-on: https://chromium-review.googlesource.com/1036444 Commit-Queue: Reilly Grant <reillyg@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#554914} [modify] https://crrev.com/03345cedd4e1b5ca27baab9ca20de23e6cfac7ff/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc |
|
►
Sign in to add a comment |
|
Comment 1 by bugdroid1@chromium.org
, Nov 14 2016