summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_edit.cc
diff options
context:
space:
mode:
authormrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-06 01:41:00 +0000
committermrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-06 01:41:00 +0000
commit2b5a2651a34256ff392f54ed94a6d3a8e3aea3db (patch)
treeaac96e57422fc7f911fc460769b27d2f9d79d437 /chrome/browser/autocomplete/autocomplete_edit.cc
parent60372514aae852a4596d0daa8d1c948ddb7472d0 (diff)
downloadchromium_src-2b5a2651a34256ff392f54ed94a6d3a8e3aea3db.zip
chromium_src-2b5a2651a34256ff392f54ed94a6d3a8e3aea3db.tar.gz
chromium_src-2b5a2651a34256ff392f54ed94a6d3a8e3aea3db.tar.bz2
Disable HCP URL and term matching when HQP is enabled.
URL term matching was incorrectly using a string where any 'http://' was being stripped. Update HQP so that it uses proper formatting classifications for URL highlighting. Reduce scores of highly scoring matches which cannot be in-line autocompleted for various reasons. Update HQP unit tests to validate URL formatting classifications. Minor renaming of variables to better reflect intention for days_ago. Prevent crash in AutocompleteEditModel::FinalizeInstantQuery if there are no search providers. BUG=79884 TEST=Updated unit tests. Type something into the omnibox and verify that the URL for an HQP result is presented in green. Type something which best matches an URL and verify that the matching substring is shown in bolded green in the URL. Review URL: http://codereview.chromium.org/6902088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84380 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 0e0db56..7b26b1c 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -170,7 +170,9 @@ void AutocompleteEditModel::FinalizeInstantQuery(
} else if (popup_->IsOpen()) {
SearchProvider* search_provider =
autocomplete_controller_->search_provider();
- search_provider->FinalizeInstantQuery(input_text, suggest_text);
+ // There may be no providers during testing; guard against that.
+ if (search_provider)
+ search_provider->FinalizeInstantQuery(input_text, suggest_text);
}
}