Omnibox: Make Bookmarks Set Inline_Autocompletion
commit973a886cfda00424c0343fb887da5afa2bec227c
authormpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 10 Apr 2014 21:08:06 +0000 (10 21:08 +0000)
committermpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 10 Apr 2014 21:08:06 +0000 (10 21:08 +0000)
tree22994b367e7dce6577829611d4867145361f9a1c
parentd3cb9d234027fdf031a5bc8634469d0103598260
Omnibox: Make Bookmarks Set Inline_Autocompletion

Make BookmarksProvider set inline_autocompletion and
allowed_to_be_default_match.

This has no effect unless bookmarks are made to score more highly (and
so they'll empirically end up as the top-scoring match).

Includes unit tests.

In the process, fix whether trailing slashes are omitted, for consistency
with other providers.  This will reduce jank if bookmarks are
ever inlining.  Tested interactively.

Likewise, fix whether http:// is omitted.  Tested interactively.

Also, refactor a common piece of code from ShortcutsProvider
to URLPrefix.

Likewise, make a protected function in HistoryProvider public
for use elsewhere.  Mark it static (because it can be).

Also, fix a PreventInlineAutocomplete bug in ShortcutsProvider.
Adds a test for this.  These tests fail before this change.

Also, fix a PreventInlineAutocomplete bug in BuiltinProvider.
Didn't bother adding a test for this because no tests examine
inline_autocompletion here and I didn't want to bother adding
some just for this minor change.  Tested it interactively.
These tests fail before this change.

BUG=

Review URL: https://codereview.chromium.org/229733004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263077 0039d316-1c4b-4281-b951-d872f2087c98
12 files changed:
chrome/browser/autocomplete/autocomplete_provider.h
chrome/browser/autocomplete/bookmark_provider.cc
chrome/browser/autocomplete/bookmark_provider.h
chrome/browser/autocomplete/bookmark_provider_unittest.cc
chrome/browser/autocomplete/builtin_provider.cc
chrome/browser/autocomplete/history_provider.cc
chrome/browser/autocomplete/history_provider.h
chrome/browser/autocomplete/shortcuts_provider.cc
chrome/browser/autocomplete/shortcuts_provider.h
chrome/browser/autocomplete/shortcuts_provider_unittest.cc
chrome/browser/autocomplete/url_prefix.cc
chrome/browser/autocomplete/url_prefix.h