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

Issue 96753004: Ensure zero suggest can handle XSSI-escaped output. (Closed)

Created:
7 years ago by Maria
Modified:
7 years ago
Reviewers:
H Fung, mariakhomenko, Mark P, mabasrai, anwis
CC:
chromium-reviews, James Su
Visibility:
Public.

Description

Ensure zero suggest can handle XSSI-escaped output. Zero suggest request re-uses the same URL as regular suggest and therefore will be requesting xssi=t by default. We should make sure the output is then correctly parsed. BUG=329382 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238360

Patch Set 1 #

Total comments: 1

Patch Set 2 : Update CL to share json parsing code #

Total comments: 9

Patch Set 3 : Comment fix #

Patch Set 4 : Fixing the return value in failure case #

Total comments: 2

Patch Set 5 : added a unit test for invalid response case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -22 lines) Patch
M chrome/browser/autocomplete/search_provider.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.cc View 1 2 3 4 2 chunks +21 lines, -18 lines 0 comments Download
M chrome/browser/autocomplete/search_provider_unittest.cc View 1 2 3 4 1 chunk +27 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/zero_suggest_provider.cc View 1 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Maria
This is the same change as Anuj made to search_provider in https://codereview.chromium.org/45863006/. Needs to be ...
7 years ago (2013-11-29 21:21:01 UTC) #1
H Fung
lgtm https://codereview.chromium.org/96753004/diff/1/chrome/browser/autocomplete/zero_suggest_provider.cc File chrome/browser/autocomplete/zero_suggest_provider.cc (right): https://codereview.chromium.org/96753004/diff/1/chrome/browser/autocomplete/zero_suggest_provider.cc#newcode137 chrome/browser/autocomplete/zero_suggest_provider.cc:137: for (size_t response_start_index = json_data.find("["), i = 0; ...
7 years ago (2013-11-30 00:46:26 UTC) #2
Maria
I changed the code to share JSON-parsing logic. PTAL.
7 years ago (2013-12-01 03:10:43 UTC) #3
Mark P
lgtm (though I don't fully grok the original code, the change you made here I ...
7 years ago (2013-12-02 22:32:19 UTC) #4
H Fung
https://codereview.chromium.org/96753004/diff/20001/chrome/browser/autocomplete/search_provider.cc File chrome/browser/autocomplete/search_provider.cc (right): https://codereview.chromium.org/96753004/diff/20001/chrome/browser/autocomplete/search_provider.cc#newcode1044 chrome/browser/autocomplete/search_provider.cc:1044: return scoped_ptr<Value>(Value::CreateNullValue()); Are you depending on ParseSuggestResults to fail ...
7 years ago (2013-12-02 23:04:52 UTC) #5
Maria
https://codereview.chromium.org/96753004/diff/20001/chrome/browser/autocomplete/search_provider.cc File chrome/browser/autocomplete/search_provider.cc (right): https://codereview.chromium.org/96753004/diff/20001/chrome/browser/autocomplete/search_provider.cc#newcode1044 chrome/browser/autocomplete/search_provider.cc:1044: return scoped_ptr<Value>(Value::CreateNullValue()); On 2013/12/02 23:04:52, H Fung wrote: > ...
7 years ago (2013-12-02 23:24:29 UTC) #6
mariakhomenko
On Mon, Dec 2, 2013 at 3:24 PM, <mariakhomenko@chromium.org> wrote: > > https://codereview.chromium.org/96753004/diff/20001/ > chrome/browser/autocomplete/search_provider.cc ...
7 years ago (2013-12-02 23:40:55 UTC) #7
H Fung
lgtm https://codereview.chromium.org/96753004/diff/20001/chrome/browser/autocomplete/search_provider.cc File chrome/browser/autocomplete/search_provider.cc (right): https://codereview.chromium.org/96753004/diff/20001/chrome/browser/autocomplete/search_provider.cc#newcode1044 chrome/browser/autocomplete/search_provider.cc:1044: return scoped_ptr<Value>(Value::CreateNullValue()); On 2013/12/02 23:24:29, Maria wrote: > ...
7 years ago (2013-12-02 23:43:44 UTC) #8
Mark P
If you're concern about anything, feel free to add Peter to this review. On Mon, ...
7 years ago (2013-12-02 23:45:04 UTC) #9
Maria
I added a unit test to cover the case where we get an invalid response. ...
7 years ago (2013-12-03 00:48:02 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mariakhomenko@chromium.org/96753004/80001
7 years ago (2013-12-03 00:49:27 UTC) #11
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=195747
7 years ago (2013-12-03 03:19:26 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mariakhomenko@chromium.org/96753004/80001
7 years ago (2013-12-03 09:29:22 UTC) #13
commit-bot: I haz the power
Change committed as 238360
7 years ago (2013-12-03 12:00:04 UTC) #14
H Fung
Hi Maria, I just realized that the fix is in M33 and was broken in ...
7 years ago (2013-12-18 00:59:13 UTC) #15
mariakhomenko
Would you mind requesting and doing the merge? I do not have committer status, so ...
7 years ago (2013-12-18 01:12:39 UTC) #16
H Fung
7 years ago (2013-12-18 01:19:40 UTC) #17
Message was sent while issue was closed.
I'll request the merge and see what happens (though I'm not a committer either).

On 2013/12/18 01:12:39, mariakhomenko_google.com wrote:
> Would you mind requesting and doing the merge? I do not have committer
> status, so I would have to ask someone to do it regardless since I don't
> have permissions to run drover.
> 
> Thanks for catching this! And sorry for the trouble.
> 
> Maria
> 
> 
> On Tue, Dec 17, 2013 at 4:59 PM, <mailto:hfung@chromium.org> wrote:
> 
> > Hi Maria,
> > I just realized that the fix is in M33 and was broken in M32
> > (https://codereview.chromium.org/51603002), and our beta ZeroSuggest
> > experiments
> > are broken. Should I request a merge to M32 or do you want to?
> >
> > https://codereview.chromium.org/96753004/
> >
> 
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698