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

Issue 126052: Fixes bug where keyword editor would end up prefixing all keyword urls... (Closed)

Created:
11 years, 6 months ago by sky
Modified:
9 years, 7 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fixes bug where keyword editor would end up prefixing all keyword urls with "http://" if they didn't have one. This proves problematic as for the google search url we don't have http:// and don't want it. The fix is to only add http:// if the url field is editable. If the url field isn't editable, we know the user hasn't editted it and don't need to try and fix it up. BUG=13282 TEST=see bug, but also make sure you don't run into any other problems with the keyword editor. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=18410

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -71 lines) Patch
M chrome/browser/autocomplete/keyword_provider.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/autocomplete/search_provider_unittest.cc View 4 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/browser_init.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/dom_ui/new_tab_ui.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/importer/importer.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/template_url.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search_engines/template_url.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/search_engines/template_url_model.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/search_engines/template_url_model_unittest.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/search_engines/template_url_prepopulate_data.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_unittest.cc View 12 chunks +25 lines, -24 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/views/edit_keyword_controller.cc View 1 2 2 chunks +14 lines, -9 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
sky
11 years, 6 months ago (2009-06-12 16:18:20 UTC) #1
Peter Kasting
http://codereview.chromium.org/126052/diff/1/2 File chrome/browser/views/edit_keyword_controller.cc (right): http://codereview.chromium.org/126052/diff/1/2#newcode313 Line 313: // cause problems if we added a scheme ...
11 years, 6 months ago (2009-06-12 19:47:12 UTC) #2
sky
New patch uploaded.
11 years, 6 months ago (2009-06-12 20:21:55 UTC) #3
Peter Kasting
http://codereview.chromium.org/126052/diff/1004/1005 File chrome/browser/views/edit_keyword_controller.cc (right): http://codereview.chromium.org/126052/diff/1004/1005#newcode331 Line 331: // scheme. This works, but the helper function ...
11 years, 6 months ago (2009-06-12 20:37:25 UTC) #4
sky
On 2009/06/12 20:37:25, pkasting wrote: > http://codereview.chromium.org/126052/diff/1004/1005 > File chrome/browser/views/edit_keyword_controller.cc (right): > > http://codereview.chromium.org/126052/diff/1004/1005#newcode331 > ...
11 years, 6 months ago (2009-06-12 22:53:57 UTC) #5
Peter Kasting
On 2009/06/12 22:53:57, sky wrote: > There are a couple of things worth explaining. ReplaceSearchTerms ...
11 years, 6 months ago (2009-06-12 23:09:46 UTC) #6
sky
Updated as per our conversation. I'm also upping the prepopulate id to make sure if ...
11 years, 6 months ago (2009-06-15 17:11:05 UTC) #7
Peter Kasting
LGTM. You were right about there being lots of callers. If you want, either of ...
11 years, 6 months ago (2009-06-15 18:02:50 UTC) #8
sky
11 years, 6 months ago (2009-06-15 18:06:21 UTC) #9
On 2009/06/15 18:02:50, pkasting wrote:
> LGTM.
> 
> You were right about there being lots of callers.  If you want, either of the
> following would be fine:
> * Since every caller seems to do WideToUTF8(), ReplaceSearchTerms() could
return
> a UTF-8 string.
> * You could write a small wrapper function that just did
> GURL(WideToUTF8(ReplaceSearchTerms(...))); and call that most places.
> 
> Neither of these are things I'm strongly suggesting, I just mention them in
case
> the current verbosity bugs you.  Checking in as-is is totally fine with me.

TemplateURL/TemplateURLRef needs to be converted to string16. When that's done,
it'll be a good time to convert ReplaceSearchTerms to UTF8. For now I'm holding
off.

Powered by Google App Engine
This is Rietveld 408576698