Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: chrome/browser/autocomplete/autocomplete_result.h

Issue 69703002: Modified GetMatchToPrefetch() to return a valid match for prefetching even when hide_verbatim flag i (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comment Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // suggested matches. This makes it more likely that users will see and 116 // suggested matches. This makes it more likely that users will see and
117 // select useful non-verbatim matches. (Note that hiding the verbatim match 117 // select useful non-verbatim matches. (Note that hiding the verbatim match
118 // this way is similar to how most other browsers' address bars behave.) 118 // this way is similar to how most other browsers' address bars behave.)
119 // 119 //
120 // We avoid hiding when the top two matches are both verbatim in order to 120 // We avoid hiding when the top two matches are both verbatim in order to
121 // avoid potential confusion if a user were to see the second match just below 121 // avoid potential confusion if a user were to see the second match just below
122 // their typing and assume it would be the default action. 122 // their typing and assume it would be the default action.
123 // 123 //
124 // Note that if the top match should be hidden and it is the only match, 124 // Note that if the top match should be hidden and it is the only match,
125 // the dropdown should be closed. 125 // the dropdown should be closed.
126 bool ShouldHideTopMatch() const; 126 bool ShouldHideTopMatch() const;
Mark P 2013/12/12 23:13:07 I wouldn't be surprised if Peter asks you to revis
kmadhusu 2013/12/13 01:00:29 Agreed. I will update the function comments in a f
127 127
128 // Returns true if the top match is a verbatim search or URL match (see
129 // IsVerbatimType() in autocomplete_match.h), and the next match is not also
130 // some kind of verbatim match.
131 bool TopMatchIsVerbatimAndHasNoConsecutiveVerbatimMatches() const;
132
128 const GURL& alternate_nav_url() const { return alternate_nav_url_; } 133 const GURL& alternate_nav_url() const { return alternate_nav_url_; }
129 134
130 // Clears the matches for this result set. 135 // Clears the matches for this result set.
131 void Reset(); 136 void Reset();
132 137
133 void Swap(AutocompleteResult* other); 138 void Swap(AutocompleteResult* other);
134 139
135 #ifndef NDEBUG 140 #ifndef NDEBUG
136 // Does a data integrity check on this result. 141 // Does a data integrity check on this result.
137 void Validate() const; 142 void Validate() const;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // user's local intranet contains site "foo", and the user types "foo", we 195 // user's local intranet contains site "foo", and the user types "foo", we
191 // default to searching for "foo" when the user may have meant to navigate 196 // default to searching for "foo" when the user may have meant to navigate
192 // there. In cases like this, the default match will point to the "search for 197 // there. In cases like this, the default match will point to the "search for
193 // 'foo'" result, and this will contain "http://foo/". 198 // 'foo'" result, and this will contain "http://foo/".
194 GURL alternate_nav_url_; 199 GURL alternate_nav_url_;
195 200
196 DISALLOW_COPY_AND_ASSIGN(AutocompleteResult); 201 DISALLOW_COPY_AND_ASSIGN(AutocompleteResult);
197 }; 202 };
198 203
199 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_H_ 204 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_result.cc » ('j') | chrome/browser/autocomplete/autocomplete_result.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698