Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Issue 113996: Move a few functions commonly called with char* to StringPiece. (Closed)

Created:
11 years, 6 months ago by Dean McNamee
Modified:
9 years, 7 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Move a few functions commonly called with char* to StringPiece. In some cases this will avoid the implicit char* -> std::string conversion, object creation, and string copying. One of the biggest benefit is on Windows, where we can save some conversions in FilePath::AppendASCII.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -9 lines) Patch
M base/file_path.h View 2 chunks +2 lines, -1 line 1 comment Download
M base/file_path.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/string_util.h View 2 chunks +3 lines, -3 lines 0 comments Download
M base/string_util.cc View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Dean McNamee
Would be nice to support StringPiece for Append() on Linux/Mac, which would avoid the conversions ...
11 years, 6 months ago (2009-05-29 10:19:18 UTC) #1
Mark Mentovai
11 years, 6 months ago (2009-05-29 13:04:55 UTC) #2
LGTM

http://codereview.chromium.org/113996/diff/1/3
File base/file_path.h (right):

http://codereview.chromium.org/113996/diff/1/3#newcode73
Line 73: #include "base/string_piece.h"  // For implicit conversions.
I don't think comments like this for #includes are terribly useful - the
comments about StringPiece implicit conversions belong in string_piece.h, not
here.

Powered by Google App Engine
This is Rietveld 408576698