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

Side by Side Diff: components/omnibox/autocomplete_result.h

Issue 1155673002: Omnibox - Add About Flag to Reverse Title and URLs in the Dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac and add command line flag to histograms.xml Created 5 years, 7 months 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
« no previous file with comments | « components/omnibox/autocomplete_match.cc ('k') | components/omnibox/autocomplete_result.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_OMNIBOX_AUTOCOMPLETE_RESULT_H_ 5 #ifndef COMPONENTS_OMNIBOX_AUTOCOMPLETE_RESULT_H_
6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_RESULT_H_ 6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_RESULT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 AutocompleteResult(); 63 AutocompleteResult();
64 ~AutocompleteResult(); 64 ~AutocompleteResult();
65 65
66 // Copies matches from |old_matches| to provide a consistant result set. See 66 // Copies matches from |old_matches| to provide a consistant result set. See
67 // comments in code for specifics. 67 // comments in code for specifics.
68 void CopyOldMatches(const AutocompleteInput& input, 68 void CopyOldMatches(const AutocompleteInput& input,
69 const AutocompleteResult& old_matches, 69 const AutocompleteResult& old_matches,
70 TemplateURLService* template_url_service); 70 TemplateURLService* template_url_service);
71 71
72 // Adds a new set of matches to the result set. Does not re-sort. 72 // Adds a new set of matches to the result set. Does not re-sort. Calls
73 void AppendMatches(const ACMatches& matches); 73 // PossiblySwapContentsAndDescriptionForURLSuggestion(input)" on all added
74 // matches; see comments there for more information.
75 void AppendMatches(const AutocompleteInput& input,
76 const ACMatches& matches);
74 77
75 // Removes duplicates, puts the list in sorted order and culls to leave only 78 // Removes duplicates, puts the list in sorted order and culls to leave only
76 // the best kMaxMatches matches. Sets the default match to the best match 79 // the best kMaxMatches matches. Sets the default match to the best match
77 // and updates the alternate nav URL. 80 // and updates the alternate nav URL.
78 void SortAndCull(const AutocompleteInput& input, 81 void SortAndCull(const AutocompleteInput& input,
79 TemplateURLService* template_url_service); 82 TemplateURLService* template_url_service);
80 83
81 // Returns true if at least one match was copied from the last result. 84 // Returns true if at least one match was copied from the last result.
82 bool HasCopiedMatches() const; 85 bool HasCopiedMatches() const;
83 86
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // user's local intranet contains site "foo", and the user types "foo", we 199 // user's local intranet contains site "foo", and the user types "foo", we
197 // default to searching for "foo" when the user may have meant to navigate 200 // default to searching for "foo" when the user may have meant to navigate
198 // there. In cases like this, the default match will point to the "search for 201 // there. In cases like this, the default match will point to the "search for
199 // 'foo'" result, and this will contain "http://foo/". 202 // 'foo'" result, and this will contain "http://foo/".
200 GURL alternate_nav_url_; 203 GURL alternate_nav_url_;
201 204
202 DISALLOW_COPY_AND_ASSIGN(AutocompleteResult); 205 DISALLOW_COPY_AND_ASSIGN(AutocompleteResult);
203 }; 206 };
204 207
205 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_RESULT_H_ 208 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_RESULT_H_
OLDNEW
« no previous file with comments | « components/omnibox/autocomplete_match.cc ('k') | components/omnibox/autocomplete_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698