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

Issue 189793002: Revert 255397 "Fill out the rest of the StringPiece functions fo..." (Closed)

Created:
6 years, 9 months ago by brettw
Modified:
6 years, 9 months ago
Reviewers:
brettw
CC:
chromium-reviews
Visibility:
Public.

Description

Revert 255397 "Fill out the rest of the StringPiece functions fo..." > Fill out the rest of the StringPiece functions for 16-bit. > > I was originally opposed to these since we didn't need them and they were complicated. But I'm wanting to use some of these functions in a different patch, so it seems like a good time to fill out the std::string-like finding functions for StringPiece16. > > This deletes the old StringPieceDetails for which the only point was to share the common stuff between the two BasicStringPiece specializations. > > I used the pattern of having two versions of each function declared in the header and then expanding the template in the .cc file, to avoid template bloat in the header. > > This replaces all of the size_type goop with size_t. Chrome code assumes these are the same and we encourage people to just use size_t in loops, for example, rather than using the size_type of the template they're iterating over. This makes the code more readable in many places. It also solves a problem with declaration ordering since most of the functions that used size_type are now moved above where the size_type is actually declared. > > R=viettrungluu@chromium.org > TBR=akalin, ben > > Review URL: https://codereview.chromium.org/187793004 TBR=brettw@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255492

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+373 lines, -578 lines) Patch
M trunk/src/base/strings/string_piece.h View 5 chunks +157 lines, -171 lines 0 comments Download
M trunk/src/base/strings/string_piece.cc View 9 chunks +84 lines, -264 lines 0 comments Download
M trunk/src/base/strings/string_piece_unittest.cc View 6 chunks +130 lines, -140 lines 0 comments Download
M trunk/src/net/websockets/websocket_basic_handshake_stream.cc View 1 chunk +1 line, -1 line 0 comments Download
M trunk/src/ui/base/resource/data_pack.cc View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
brettw
6 years, 9 months ago (2014-03-07 01:44:53 UTC) #1
brettw
6 years, 9 months ago (2014-03-07 01:45:04 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 manually as r255492 (tree was closed).

Powered by Google App Engine
This is Rietveld 408576698