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

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

Issue 10381121: Add SearchProvider's most relevant NavigationResult to |matches_|. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update SearchProviderTest.Navsuggest with test case. Created 8 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 | 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 // 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 non-keyword autocomplete entries that start with 6 // responsible for all non-keyword autocomplete entries that start with
7 // "Search <engine> for ...", including searching for the current input string, 7 // "Search <engine> for ...", including searching for the current input string,
8 // search history, and search suggestions. An instance of it gets created and 8 // search 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 const string16& input_text, 229 const string16& input_text,
230 SuggestResults* suggest_results); 230 SuggestResults* suggest_results);
231 231
232 // Converts the parsed results to a set of AutocompleteMatches and adds them 232 // Converts the parsed results to a set of AutocompleteMatches and adds them
233 // to |matches_|. This also sets |done_| correctly. 233 // to |matches_|. This also sets |done_| correctly.
234 void ConvertResultsToAutocompleteMatches(); 234 void ConvertResultsToAutocompleteMatches();
235 235
236 // Converts the first navigation result in |navigation_results| to an 236 // Converts the first navigation result in |navigation_results| to an
237 // AutocompleteMatch and adds it to |matches_|. 237 // AutocompleteMatch and adds it to |matches_|.
238 void AddNavigationResultsToMatches( 238 void AddNavigationResultsToMatches(
239 const NavigationResults& navigation_results, 239 NavigationResults navigation_results,
240 bool is_keyword); 240 bool is_keyword);
241 241
242 // Adds a match for each result in |results| to |map|. |is_keyword| indicates 242 // Adds a match for each result in |results| to |map|. |is_keyword| indicates
243 // whether the results correspond to the keyword provider or default provider. 243 // whether the results correspond to the keyword provider or default provider.
244 void AddHistoryResultsToMap(const HistoryResults& results, 244 void AddHistoryResultsToMap(const HistoryResults& results,
245 bool is_keyword, 245 bool is_keyword,
246 int did_not_accept_suggestion, 246 int did_not_accept_suggestion,
247 MatchMap* map); 247 MatchMap* map);
248 248
249 // Calculates relevance scores for all |results|. 249 // Calculates relevance scores for all |results|.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // Has FinalizeInstantQuery been invoked since the last |Start|? 343 // Has FinalizeInstantQuery been invoked since the last |Start|?
344 bool instant_finalized_; 344 bool instant_finalized_;
345 345
346 // The |suggest_text| parameter passed to FinalizeInstantQuery. 346 // The |suggest_text| parameter passed to FinalizeInstantQuery.
347 string16 default_provider_suggest_text_; 347 string16 default_provider_suggest_text_;
348 348
349 DISALLOW_COPY_AND_ASSIGN(SearchProvider); 349 DISALLOW_COPY_AND_ASSIGN(SearchProvider);
350 }; 350 };
351 351
352 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ 352 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider.cc » ('j') | chrome/browser/autocomplete/search_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698