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

Issue 8364001: Strip special characters in extension omnibox suggestions. (Closed)

Created:
9 years, 2 months ago by Alexei Svitkine (slow)
Modified:
9 years, 1 month ago
CC:
chromium-reviews, James Su
Visibility:
Public.

Description

Strip special characters in extension omnibox suggestions. This makes the drop downs on Mac and Linux match how Windows currently renders these suggestions when they include newline, tab and carriage return characters. Removes invalid characters in matches coming from extension suggestions and apps. BUG=100564 TEST=Manual per bug and added ExtensionAppProviderTest.CreateMatchSanitize KeywordProviderTest.SuggestionMatchSanitize tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107746

Patch Set 1 : '' #

Total comments: 1

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 20

Patch Set 7 : '' #

Total comments: 3

Patch Set 8 : '' #

Total comments: 5

Patch Set 9 : '' #

Total comments: 5

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -22 lines) Patch
M chrome/browser/autocomplete/autocomplete.cc View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_match.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_match.cc View 1 2 3 4 5 6 7 8 9 2 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/extension_app_provider.h View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/extension_app_provider.cc View 1 2 3 4 5 6 7 8 9 2 chunks +32 lines, -21 lines 0 comments Download
M chrome/browser/autocomplete/extension_app_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/extension_process_bindings.js View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 24 (0 generated)
Alexei Svitkine (slow)
9 years, 2 months ago (2011-10-20 19:17:56 UTC) #1
Scott Hess - ex-Googler
http://codereview.chromium.org/8364001/diff/5/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm File chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm (right): http://codereview.chromium.org/8364001/diff/5/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm#newcode114 chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm:114: RemoveChars(matchStringIn, kNewlineChar, &matchString); Should this remove the newline, or ...
9 years, 2 months ago (2011-10-20 19:54:03 UTC) #2
Alexei Svitkine (slow)
> Should this remove the newline, or convert it to a space? What about tabs? ...
9 years, 2 months ago (2011-10-24 15:09:54 UTC) #3
Alexei Svitkine (slow)
On 2011/10/24 15:09:54, Alexei Svitkine wrote: > > Should this remove the newline, or convert ...
9 years, 2 months ago (2011-10-24 15:27:07 UTC) #4
Alexei Svitkine (slow)
I've updated the patch to address this in the actual code in KeywordProvider with another ...
9 years, 2 months ago (2011-10-24 20:31:45 UTC) #5
Peter Kasting
Things I'm worried about: * Is the list of characters to strip sufficient? Are there ...
9 years, 2 months ago (2011-10-24 23:43:26 UTC) #6
Alexei Svitkine (slow)
On 2011/10/24 23:43:26, Peter Kasting wrote: > Things I'm worried about: > > * Is ...
9 years, 2 months ago (2011-10-25 17:05:14 UTC) #7
Peter Kasting
On 2011/10/25 17:05:14, Alexei Svitkine wrote: > On 2011/10/24 23:43:26, Peter Kasting wrote: > > ...
9 years, 2 months ago (2011-10-25 18:34:09 UTC) #8
Alexei Svitkine (slow)
> I dunno. If callers can't actually insert \0, I'd rather not strip it here. ...
9 years, 2 months ago (2011-10-25 18:53:35 UTC) #9
Peter Kasting
http://codereview.chromium.org/8364001/diff/13020/chrome/browser/autocomplete/autocomplete.cc File chrome/browser/autocomplete/autocomplete.cc (right): http://codereview.chromium.org/8364001/diff/13020/chrome/browser/autocomplete/autocomplete.cc#newcode656 chrome/browser/autocomplete/autocomplete.cc:656: for (size_t i = 0; i < matches.size(); i++) ...
9 years, 2 months ago (2011-10-25 20:37:07 UTC) #10
Alexei Svitkine (slow)
http://codereview.chromium.org/8364001/diff/13020/chrome/browser/autocomplete/autocomplete.cc File chrome/browser/autocomplete/autocomplete.cc (right): http://codereview.chromium.org/8364001/diff/13020/chrome/browser/autocomplete/autocomplete.cc#newcode656 chrome/browser/autocomplete/autocomplete.cc:656: for (size_t i = 0; i < matches.size(); i++) ...
9 years, 2 months ago (2011-10-25 21:37:16 UTC) #11
Alexei Svitkine (slow)
> maintainable - so thing change is worth it just for that. s/thing/the/
9 years, 2 months ago (2011-10-25 21:41:23 UTC) #12
Alexei Svitkine (slow)
> > This would be serving a second goal, which is "make all the results ...
9 years, 2 months ago (2011-10-26 00:55:11 UTC) #13
Peter Kasting
There are more problems this change doesn't solve. ExtensionOmniboxSuggestion::ApplyDefaultSuggestionForExtensionKeyword() can insert bogus characters into the ...
9 years, 2 months ago (2011-10-26 01:07:22 UTC) #14
Alexei Svitkine (slow)
You're right - thanks! Looks like it's actually more complicated than putting the logic in ...
9 years, 1 month ago (2011-10-26 13:38:09 UTC) #15
Alexei Svitkine (slow)
I've changed the whitespace trimming to be a leading whitespace trim instead - since the ...
9 years, 1 month ago (2011-10-26 15:00:57 UTC) #16
Peter Kasting
On 2011/10/26 15:00:57, Alexei Svitkine wrote: > I've changed the whitespace trimming to be a ...
9 years, 1 month ago (2011-10-26 17:46:01 UTC) #17
Scott Hess - ex-Googler
lgtm http://codereview.chromium.org/8364001/diff/17014/chrome/browser/autocomplete/autocomplete_match.cc File chrome/browser/autocomplete/autocomplete_match.cc (right): http://codereview.chromium.org/8364001/diff/17014/chrome/browser/autocomplete/autocomplete_match.cc#newcode164 chrome/browser/autocomplete/autocomplete_match.cc:164: const char16 kRemoveChars[] = { '\n', '\r', '\t', ...
9 years, 1 month ago (2011-10-26 21:08:00 UTC) #18
Alexei Svitkine (slow)
On Wed, Oct 26, 2011 at 1:46 PM, <pkasting@chromium.org> wrote: > On 2011/10/26 15:00:57, Alexei ...
9 years, 1 month ago (2011-10-26 21:55:37 UTC) #19
Alexei Svitkine (slow)
http://codereview.chromium.org/8364001/diff/17014/chrome/browser/autocomplete/autocomplete_match.cc File chrome/browser/autocomplete/autocomplete_match.cc (right): http://codereview.chromium.org/8364001/diff/17014/chrome/browser/autocomplete/autocomplete_match.cc#newcode164 chrome/browser/autocomplete/autocomplete_match.cc:164: const char16 kRemoveChars[] = { '\n', '\r', '\t', 0x2028, ...
9 years, 1 month ago (2011-10-27 13:30:53 UTC) #20
Scott Hess - ex-Googler
http://codereview.chromium.org/8364001/diff/17014/chrome/browser/autocomplete/autocomplete_match.cc File chrome/browser/autocomplete/autocomplete_match.cc (right): http://codereview.chromium.org/8364001/diff/17014/chrome/browser/autocomplete/autocomplete_match.cc#newcode167 chrome/browser/autocomplete/autocomplete_match.cc:167: RemoveChars(result, kRemoveChars, &result); On 2011/10/27 13:30:53, Alexei Svitkine wrote: ...
9 years, 1 month ago (2011-10-27 18:28:37 UTC) #21
Peter Kasting
LGTM http://codereview.chromium.org/8364001/diff/22001/chrome/browser/autocomplete/autocomplete_match.cc File chrome/browser/autocomplete/autocomplete_match.cc (right): http://codereview.chromium.org/8364001/diff/22001/chrome/browser/autocomplete/autocomplete_match.cc#newcode164 chrome/browser/autocomplete/autocomplete_match.cc:164: // 0x2028 = line separator; 0x2029 = paragraph ...
9 years, 1 month ago (2011-10-27 18:37:08 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asvitkine@chromium.org/8364001/27002
9 years, 1 month ago (2011-10-28 16:09:19 UTC) #23
commit-bot: I haz the power
9 years, 1 month ago (2011-10-28 17:29:23 UTC) #24
Change committed as 107746

Powered by Google App Engine
This is Rietveld 408576698