New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 668538 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Change FieldTrial::State members to be const std::string* to avoid temp strings

Project Member Reported by asvitk...@chromium.org, Nov 24 2016

Issue description

Change FieldTrial::State members to be const std::string* to avoid temp strings.

It was previously changed to use StringPiece members - but turns out there's a bunch of places that still want them at std::strings - including e.g. lookups in std::maps - which with the current set up require making copies.

Instead, let's make the fields const std::string*. This would tie the lifetime of the State object to the underlying FieldTrial - which is OK since FieldTrials are never deleted and State is generally not long-lived either. They should be pointers and not refs since the object needs to have a non-ininitialized state.


 
Status: Fixed (was: Assigned)

Sign in to add a comment