summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:42:48 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:42:48 +0000
commit77c16d74b367f53bc5a63e6f6c35a7fb82b57df7 (patch)
tree270dc8cb57d1b908cc1f7e47425a58e21582aa7e /chrome
parentee300d6fb88bc2fc5631295741640342002c01f9 (diff)
downloadchromium_src-77c16d74b367f53bc5a63e6f6c35a7fb82b57df7.zip
chromium_src-77c16d74b367f53bc5a63e6f6c35a7fb82b57df7.tar.gz
chromium_src-77c16d74b367f53bc5a63e6f6c35a7fb82b57df7.tar.bz2
Don't show accidental search infobar for bookmark keywords.
BUG=6854 TEST=none Review URL: http://codereview.chromium.org/3119007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56413 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autocomplete/autocomplete.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc
index 9a2508b..e15a190 100644
--- a/chrome/browser/autocomplete/autocomplete.cc
+++ b/chrome/browser/autocomplete/autocomplete.cc
@@ -719,7 +719,7 @@ void AutocompleteResult::SortAndCull(const AutocompleteInput& input) {
&AutocompleteMatch::DestinationsEqual),
matches_.end());
- // Find the top max_matches.
+ // Find the top |kMaxMatches| matches.
if (matches_.size() > kMaxMatches) {
std::partial_sort(matches_.begin(), matches_.begin() + kMaxMatches,
matches_.end(), &AutocompleteMatch::MoreRelevant);
@@ -746,6 +746,7 @@ void AutocompleteResult::SortAndCull(const AutocompleteInput& input) {
(input.type() == AutocompleteInput::REQUESTED_URL)) &&
(default_match_ != end()) &&
(default_match_->transition != PageTransition::TYPED) &&
+ (default_match_->transition != PageTransition::KEYWORD) &&
(input.canonicalized_url() != default_match_->destination_url))
alternate_nav_url_ = input.canonicalized_url();
}