OLD | NEW |
---|---|
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 // This file contains the Search autocomplete provider. This provider is | 5 // This file contains the Search autocomplete provider. This provider is |
6 // responsible for all autocomplete entries that start with "Search <engine> | 6 // responsible for all autocomplete entries that start with "Search <engine> |
7 // for ...", including searching for the current input string, search | 7 // for ...", including searching for the current input string, search |
8 // history, and search suggestions. An instance of it gets created and | 8 // history, and search suggestions. An instance of it gets created and |
9 // managed by the autocomplete controller. | 9 // managed by the autocomplete controller. |
10 | 10 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 const TemplateURL* template_url, | 222 const TemplateURL* template_url, |
223 const AutocompleteInput& input); | 223 const AutocompleteInput& input); |
224 | 224 |
225 // Converts the parsed results to a set of AutocompleteMatches, |matches_|. | 225 // Converts the parsed results to a set of AutocompleteMatches, |matches_|. |
226 void ConvertResultsToAutocompleteMatches(); | 226 void ConvertResultsToAutocompleteMatches(); |
227 | 227 |
228 // Returns an iterator to the first match in |matches_| which might | 228 // Returns an iterator to the first match in |matches_| which might |
229 // be chosen as default. | 229 // be chosen as default. |
230 ACMatches::const_iterator FindTopMatch() const; | 230 ACMatches::const_iterator FindTopMatch() const; |
231 | 231 |
232 // Checks if suggested relevances violate certain expected constraints. | 232 // Checks if suggested relevances violate an expected constraint. |
233 // See UpdateMatches() for the use and explanation of these constraints. | 233 // See UpdateMatches() for the use and explanation of this constraint |
234 bool HasKeywordDefaultMatchInKeywordMode() const; | 234 // and others defined in the code (that don't need helper functions). |
msw
2014/08/15 19:06:06
nit: " // and other constraints enforced without
Mark P
2014/08/15 19:14:49
Done.
| |
235 bool IsTopMatchSearchWithURLInput() const; | 235 bool IsTopMatchSearchWithURLInput() const; |
236 | 236 |
237 // Converts an appropriate number of navigation results in | 237 // Converts an appropriate number of navigation results in |
238 // |navigation_results| to matches and adds them to |matches|. | 238 // |navigation_results| to matches and adds them to |matches|. |
239 void AddNavigationResultsToMatches( | 239 void AddNavigationResultsToMatches( |
240 const SearchSuggestionParser::NavigationResults& navigation_results, | 240 const SearchSuggestionParser::NavigationResults& navigation_results, |
241 ACMatches* matches); | 241 ACMatches* matches); |
242 | 242 |
243 // Adds a match for each result in |results| to |map|. |is_keyword| indicates | 243 // Adds a match for each result in |results| to |map|. |is_keyword| indicates |
244 // whether the results correspond to the keyword provider or default provider. | 244 // whether the results correspond to the keyword provider or default provider. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
356 base::TimeTicks token_expiration_time_; | 356 base::TimeTicks token_expiration_time_; |
357 | 357 |
358 // Answers prefetch management. | 358 // Answers prefetch management. |
359 AnswersQueryData prefetch_data_; // Data to use for query prefetching. | 359 AnswersQueryData prefetch_data_; // Data to use for query prefetching. |
360 AnswersQueryData last_answer_seen_; // Last answer seen. | 360 AnswersQueryData last_answer_seen_; // Last answer seen. |
361 | 361 |
362 DISALLOW_COPY_AND_ASSIGN(SearchProvider); | 362 DISALLOW_COPY_AND_ASSIGN(SearchProvider); |
363 }; | 363 }; |
364 | 364 |
365 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ | 365 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ |
OLD | NEW |