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

Issue 10905292: Add API key to omnibox's suggest requests (Closed)

Created:
8 years, 3 months ago by Mark P
Modified:
8 years, 3 months ago
CC:
chromium-reviews, David Black, afeldman_google.com, Jói
Visibility:
Public.

Description

Add API key to omnibox's suggest requests Mostly closed question: * Is the api key constant over the length of the run? [pfelding guesses yes. working assumpting is yes. The code for the api keys makes it look like the keys are compiled into the binary. joi to answer for sure.] Closed questions: * Send to all google suggest base URLs or only certain ones? [ANSWERED by afeldman: might as well send to everything] * Send on all protocols or just https? [ANSWERED by afeldman: all protocols] * The way I formatted the suggest URL parameter puts the parameter last in the URL. I think this looks better for people looking at URL. However, given the standard structure in template_url.cc of the way replacement is done, that means we end up with an extra & at the end of the URL. Is that a problem? [RESOLVED by dcblack by moving sugkey parameter into template itself] * Do I have to do anything to update users who already have their template URL instantiated? (I think the answer is no, but I'm asking to double-check.) [ANSWERED by pkasting: increment version number in the prepopulated template URL file] BUG= TEST=tested using wireshark Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=156956

Patch Set 1 #

Patch Set 2 : Formatting. #

Total comments: 2

Patch Set 3 : Move sugkey to permanent parameter position. #

Total comments: 4

Patch Set 4 : Peter's comments. #

Patch Set 5 : Rebase. #

Patch Set 6 : 42 -> 43 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -3 lines) Patch
M chrome/browser/search_engines/template_url.cc View 1 2 3 4 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_prepopulate_data.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Mark P
Peter, Can you take a look at this ASAP? People want it checked in by ...
8 years, 3 months ago (2012-09-14 18:54:04 UTC) #1
Mark P
And one more question: * Do I have to do anything to update users who ...
8 years, 3 months ago (2012-09-14 18:54:57 UTC) #2
David Black
http://codereview.chromium.org/10905292/diff/2003/chrome/browser/search_engines/template_url.cc File chrome/browser/search_engines/template_url.cc (right): http://codereview.chromium.org/10905292/diff/2003/chrome/browser/search_engines/template_url.cc#newcode290 chrome/browser/search_engines/template_url.cc:290: url.insert(i->index, "sugkey=" + It looks like you're confusing the ...
8 years, 3 months ago (2012-09-14 19:05:05 UTC) #3
Mark P
http://codereview.chromium.org/10905292/diff/2003/chrome/browser/search_engines/template_url.cc File chrome/browser/search_engines/template_url.cc (right): http://codereview.chromium.org/10905292/diff/2003/chrome/browser/search_engines/template_url.cc#newcode290 chrome/browser/search_engines/template_url.cc:290: url.insert(i->index, "sugkey=" + On 2012/09/14 19:05:05, David Black wrote: ...
8 years, 3 months ago (2012-09-14 19:20:34 UTC) #4
afeldman_google.com
> * Send to all google suggest base URLs or only certain ones? I think ...
8 years, 3 months ago (2012-09-14 19:25:16 UTC) #5
Peter Kasting
LGTM once the below issues are addressed. http://codereview.chromium.org/10905292/diff/9001/chrome/browser/search_engines/template_url.cc File chrome/browser/search_engines/template_url.cc (right): http://codereview.chromium.org/10905292/diff/9001/chrome/browser/search_engines/template_url.cc#newcode291 chrome/browser/search_engines/template_url.cc:291: net::EscapeQueryParamValue(google_apis::GetAPIKey(), false)); ...
8 years, 3 months ago (2012-09-14 20:47:04 UTC) #6
Mark P
I think this is good to go. http://codereview.chromium.org/10905292/diff/9001/chrome/browser/search_engines/template_url_prepopulate_data.cc File chrome/browser/search_engines/template_url_prepopulate_data.cc (right): http://codereview.chromium.org/10905292/diff/9001/chrome/browser/search_engines/template_url_prepopulate_data.cc#newcode1100 chrome/browser/search_engines/template_url_prepopulate_data.cc:1100: "sugkey={google:suggestAPIKeyParameter}", On ...
8 years, 3 months ago (2012-09-14 21:23:23 UTC) #7
Mark P
And publishing the last comment: http://codereview.chromium.org/10905292/diff/9001/chrome/browser/search_engines/template_url.cc File chrome/browser/search_engines/template_url.cc (right): http://codereview.chromium.org/10905292/diff/9001/chrome/browser/search_engines/template_url.cc#newcode291 chrome/browser/search_engines/template_url.cc:291: net::EscapeQueryParamValue(google_apis::GetAPIKey(), false)); On 2012/09/14 ...
8 years, 3 months ago (2012-09-14 21:23:55 UTC) #8
Peter Kasting
Yep LGTM
8 years, 3 months ago (2012-09-14 21:24:50 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mpearson@chromium.org/10905292/7
8 years, 3 months ago (2012-09-14 21:27:20 UTC) #10
commit-bot: I haz the power
Failed to apply patch for chrome/browser/search_engines/template_url_prepopulate_data.cc: While running patch -p1 --forward --force; patching file chrome/browser/search_engines/template_url_prepopulate_data.cc ...
8 years, 3 months ago (2012-09-14 21:27:21 UTC) #11
commit-bot: I haz the power
8 years, 3 months ago (2012-09-14 21:35:14 UTC) #12

Powered by Google App Engine
This is Rietveld 408576698