Commit c4bdfdec authored by manuk's avatar manuk Committed by Commit Bot

[omnibox] Increase max classifications text length.

Before the classification deduping changes, some providers limited the
texts to 200 characters when classifying. When either the suggestion or
input texts were longer, truncated versions would be used instead. With
the classification deduping changes, all providers follow this behavior.

This can look slightly awkward; e.g. for an input of 220 characters, the
search-what-you-typed suggestion will be un-bolded for the first 200
characters, but bolded for the last 20.

This CL increases the truncation length from 200 to 2000. This should be
large enough to cover most use cases; on a 3840 resolution screen, with
default English fonts, approximately 1100 '|'s fit in the omnibox.

Bug: 366623, 968911
Change-Id: Ic4648c3fa000c09563fe0afae0d4883cefe3d156
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639105Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: manuk hovanesian <manukh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665296}
parent a367b3f7
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
namespace { namespace {
base::string16 clean(base::string16 text) { base::string16 clean(base::string16 text) {
const size_t kMaxTextLength = 200; const size_t kMaxTextLength = 2000;
return base::i18n::ToLower(text.substr(0, kMaxTextLength)); return base::i18n::ToLower(text.substr(0, kMaxTextLength));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment