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

Issue 1549063003: Don't unnecessarily copy strings (Closed)

Created:
4 years, 12 months ago by Arjan van Leeuwen
Modified:
4 years, 11 months ago
Reviewers:
brettw, mef, xunjieli
CC:
chromium-reviews, cbentzel+watch_chromium.org, jshin+watch_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't unnecessarily copy strings Add a function base::SplitStringPieceUsingSubstr that splits a string using a substring delimiter without copying the string parts. Use it in HttpRequestHeaders::AddHeadersFromString. BUG=572076 Committed: https://crrev.com/0e8b35ae352e71ea43bf1dc9f6b68128dc8ab187 Cr-Commit-Position: refs/heads/master@{#367504}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add WhitespaceHandling and SplitResult to SplitStringPieceUsingSubstr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -27 lines) Patch
M base/strings/string_split.h View 1 1 chunk +23 lines, -0 lines 0 comments Download
M base/strings/string_split.cc View 1 2 chunks +40 lines, -18 lines 0 comments Download
M base/strings/string_split_unittest.cc View 1 1 chunk +65 lines, -0 lines 0 comments Download
M net/http/http_request_headers.cc View 1 1 chunk +3 lines, -9 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
Arjan van Leeuwen
We ran into this doing some testing at Opera. Looks OK?
4 years, 12 months ago (2015-12-24 12:43:47 UTC) #3
mef
https://codereview.chromium.org/1549063003/diff/1/base/strings/string_split.cc File base/strings/string_split.cc (right): https://codereview.chromium.org/1549063003/diff/1/base/strings/string_split.cc#newcode242 base/strings/string_split.cc:242: StringPiece16 delimiter) { Would it make sense to take ...
4 years, 12 months ago (2015-12-28 17:29:55 UTC) #4
brettw
https://codereview.chromium.org/1549063003/diff/1/base/strings/string_split.cc File base/strings/string_split.cc (right): https://codereview.chromium.org/1549063003/diff/1/base/strings/string_split.cc#newcode242 base/strings/string_split.cc:242: StringPiece16 delimiter) { On 2015/12/28 17:29:55, mef wrote: > ...
4 years, 11 months ago (2015-12-29 04:07:14 UTC) #5
brettw
https://codereview.chromium.org/1549063003/diff/1/base/strings/string_split.h File base/strings/string_split.h (right): https://codereview.chromium.org/1549063003/diff/1/base/strings/string_split.h#newcode114 base/strings/string_split.h:114: BASE_EXPORT std::vector<StringPiece16> SplitStringPieceUsingSubstr( I'd like to make this a ...
4 years, 11 months ago (2015-12-29 22:14:41 UTC) #6
mef
https://codereview.chromium.org/1549063003/diff/1/base/strings/string_split.cc File base/strings/string_split.cc (right): https://codereview.chromium.org/1549063003/diff/1/base/strings/string_split.cc#newcode242 base/strings/string_split.cc:242: StringPiece16 delimiter) { On 2015/12/29 04:07:14, brettw wrote: > ...
4 years, 11 months ago (2015-12-30 19:36:59 UTC) #7
Arjan van Leeuwen
+brettw added parameters as requested, could you take another look?
4 years, 11 months ago (2016-01-04 09:15:55 UTC) #8
mef
lgtm
4 years, 11 months ago (2016-01-04 15:03:50 UTC) #9
brettw
lgtm
4 years, 11 months ago (2016-01-04 18:28:56 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1549063003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1549063003/20001
4 years, 11 months ago (2016-01-05 09:13:53 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 11 months ago (2016-01-05 10:25:02 UTC) #14
commit-bot: I haz the power
4 years, 11 months ago (2016-01-05 10:25:51 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/0e8b35ae352e71ea43bf1dc9f6b68128dc8ab187
Cr-Commit-Position: refs/heads/master@{#367504}

Powered by Google App Engine
This is Rietveld 408576698