New issue
Advanced search Search tips

Issue 678837 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Accept StringPiece as inputs in net/base/escape.h

Project Member Reported by sa...@chromium.org, Jan 6 2017

Issue description

StringPiece is more permissive as an input parameter than std::string. However, a function accepting StringPiece can require an extra copy if it forwards a StringPiece to a function that requires a std::string. Therefore, accepting StringPiece at low levels in the stack enables higher levels to also accept StringPiece without losing efficiency.

This tracks converting the functions provided by net/base/escape.h to accept string inputs as StringPiece or StringPiece16.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/27b95a92306e43c448f2f863c0bf10eae60fd625

commit 27b95a92306e43c448f2f863c0bf10eae60fd625
Author: sammc <sammc@chromium.org>
Date: Fri Jan 06 01:29:55 2017

Change net/base/escape.h to use StringPiece.

BUG= 678837 

Review-Url: https://codereview.chromium.org/2615633007
Cr-Commit-Position: refs/heads/master@{#441791}

[modify] https://crrev.com/27b95a92306e43c448f2f863c0bf10eae60fd625/net/base/escape.cc
[modify] https://crrev.com/27b95a92306e43c448f2f863c0bf10eae60fd625/net/base/escape.h

Status: Fixed (was: Started)

Sign in to add a comment