summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/history_url_provider.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-19 17:08:00 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-19 17:08:00 +0000
commitfe4eb9827d908251a0f2fd1a2d46cdf51e94cd7a (patch)
treef2d80a848fc72f90e08f63fb6fb4418bd199707f /chrome/browser/autocomplete/history_url_provider.h
parent7c5048cb78980caeb134eec8748ab892df2237fb (diff)
downloadchromium_src-fe4eb9827d908251a0f2fd1a2d46cdf51e94cd7a.zip
chromium_src-fe4eb9827d908251a0f2fd1a2d46cdf51e94cd7a.tar.gz
chromium_src-fe4eb9827d908251a0f2fd1a2d46cdf51e94cd7a.tar.bz2
Handle intranet hostnames more consistently.
AutocompleteInput::Parse() now usually marks intranet navigations as UNKNOWN and relies on the HistoryURLProvider to do the right thing. In turn the HistoryURLProvider will mark URLs it's never seen as high-quality navigations if they have a hostname that's part of a previously-type intranet URL. So for example, "abc/def" on a clean profile now defaults to searching rather than navigating; but if any URL on host "abc" has been typed before, both "abc/def" and "abc/def ghi" will navigate, despite the space in the second case. This also changes the default behavior for some similar cases like "abc:81", "user:pass@abc", and "user:pass@abc:81". Again these will all now default to searching, but navigate if the host in question has been typed. Unchanged is the behavior of "abc/"; because the scheme-stripping code relies on a single trailing slash triggering a navigation, and because it's convenient for users to force navigation on an unknown host, this is still parsed as a URL. BUG=6788 TEST=Navigate to "who/", then type "who/a b" and note that the default action is to navigate rather than search. Review URL: http://codereview.chromium.org/7661028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/history_url_provider.h')
-rw-r--r--chrome/browser/autocomplete/history_url_provider.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/history_url_provider.h b/chrome/browser/autocomplete/history_url_provider.h
index e928fbf..78925b1 100644
--- a/chrome/browser/autocomplete/history_url_provider.h
+++ b/chrome/browser/autocomplete/history_url_provider.h
@@ -215,6 +215,12 @@ class HistoryURLProvider : public HistoryProvider {
AutocompleteMatch* match,
history::HistoryMatches* matches) const;
+ // Helper function for FixupExactSuggestion, this returns true if the input
+ // corresponds to some intranet URL where the user has previously visited the
+ // host in question. In this case the input should be treated as a URL.
+ bool CanFindIntranetURL(history::URLDatabase* db,
+ const AutocompleteInput& input) const;
+
// Determines if |match| is suitable for inline autocomplete, and promotes it
// if so.
bool PromoteMatchForInlineAutocomplete(