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

Issue 894033006: SearchSuggestionParser: Use a StringPiece instead of modifying a string. (Closed)

Created:
5 years, 10 months ago by Matt Giuca
Modified:
5 years, 10 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, Maria
Base URL:
https://chromium.googlesource.com/chromium/src.git@jsonstring-stringpiece
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

SearchSuggestionParser: JSON deserializer now accepts a StringPiece. Internally, it slices the StringPiece instead of erasing pieces of the string, so we have 0 copies of these JSON strings. This is possible now that JSONStringValueSerializer takes a StringPiece. BUG=455068 Committed: https://crrev.com/b04f6a3a5f2f4896bdd8df7c60d3cc6d7a4714fd Cr-Commit-Position: refs/heads/master@{#314936}

Patch Set 1 #

Patch Set 2 : DeserializeJsonData accepts a StringPiece so there are 0 copies from the creation of the string. #

Total comments: 2

Patch Set 3 : Unconditionally call remove_prefix, since there is no penalty. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -5 lines) Patch
M components/omnibox/search_suggestion_parser.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M components/omnibox/search_suggestion_parser.cc View 1 2 1 chunk +3 lines, -4 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Matt Giuca
I just landed https://codereview.chromium.org/895913004/ so now this is possible (previously it would have required us ...
5 years, 10 months ago (2015-02-05 05:30:36 UTC) #2
Peter Kasting
LGTM https://codereview.chromium.org/894033006/diff/20001/components/omnibox/search_suggestion_parser.cc File components/omnibox/search_suggestion_parser.cc (right): https://codereview.chromium.org/894033006/diff/20001/components/omnibox/search_suggestion_parser.cc#newcode352 components/omnibox/search_suggestion_parser.cc:352: if (response_start_index > 0) Nit: This conditional could ...
5 years, 10 months ago (2015-02-05 09:20:36 UTC) #3
Matt Giuca
https://codereview.chromium.org/894033006/diff/20001/components/omnibox/search_suggestion_parser.cc File components/omnibox/search_suggestion_parser.cc (right): https://codereview.chromium.org/894033006/diff/20001/components/omnibox/search_suggestion_parser.cc#newcode352 components/omnibox/search_suggestion_parser.cc:352: if (response_start_index > 0) On 2015/02/05 09:20:36, Peter Kasting ...
5 years, 10 months ago (2015-02-06 00:30:02 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/894033006/40001
5 years, 10 months ago (2015-02-06 00:30:59 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 10 months ago (2015-02-06 01:15:51 UTC) #8
commit-bot: I haz the power
5 years, 10 months ago (2015-02-06 01:16:38 UTC) #9
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b04f6a3a5f2f4896bdd8df7c60d3cc6d7a4714fd
Cr-Commit-Position: refs/heads/master@{#314936}

Powered by Google App Engine
This is Rietveld 408576698