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

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

Issue 18878007: Omnibox: Make the Controller Reorder Matches for Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Harry's comments Created 7 years, 4 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 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 bool ParseSuggestResults(base::Value* root_val, bool is_keyword); 372 bool ParseSuggestResults(base::Value* root_val, bool is_keyword);
373 373
374 // Converts the parsed results to a set of AutocompleteMatches, |matches_|. 374 // Converts the parsed results to a set of AutocompleteMatches, |matches_|.
375 void ConvertResultsToAutocompleteMatches(); 375 void ConvertResultsToAutocompleteMatches();
376 376
377 // Checks if suggested relevances violate certain expected constraints. 377 // Checks if suggested relevances violate certain expected constraints.
378 // See UpdateMatches() for the use and explanation of these constraints. 378 // See UpdateMatches() for the use and explanation of these constraints.
379 bool IsTopMatchNavigationInKeywordMode() const; 379 bool IsTopMatchNavigationInKeywordMode() const;
380 bool IsTopMatchScoreTooLow() const; 380 bool IsTopMatchScoreTooLow() const;
381 bool IsTopMatchSearchWithURLInput() const; 381 bool IsTopMatchSearchWithURLInput() const;
382 bool IsTopMatchNotInlinable() const; 382 bool LacksValidDefaultMatch(
383 bool omnibox_will_reorder_for_legal_default_match) const;
Peter Kasting 2013/08/06 22:56:16 Nit: It's slightly confusing to refer to "omnibox"
Mark P 2013/08/07 00:44:31 Changed to autocomplete_result_will_reorder_for_de
383 384
384 // Updates |matches_| from the latest results; applies calculated relevances 385 // Updates |matches_| from the latest results; applies calculated relevances
385 // if suggested relevances cause undesriable behavior. Updates |done_|. 386 // if suggested relevances cause undesriable behavior. Updates |done_|.
386 void UpdateMatches(); 387 void UpdateMatches();
387 388
388 // Converts an appropriate number of navigation results in 389 // Converts an appropriate number of navigation results in
389 // |navigation_results| to matches and adds them to |matches|. 390 // |navigation_results| to matches and adds them to |matches|.
390 void AddNavigationResultsToMatches( 391 void AddNavigationResultsToMatches(
391 const NavigationResults& navigation_results, 392 const NavigationResults& navigation_results,
392 ACMatches* matches); 393 ACMatches* matches);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 int omnibox_start_margin_; 532 int omnibox_start_margin_;
532 533
533 // If true, search history query suggestions will score low enough that 534 // If true, search history query suggestions will score low enough that
534 // they will not be inlined. 535 // they will not be inlined.
535 bool prevent_search_history_inlining_; 536 bool prevent_search_history_inlining_;
536 537
537 DISALLOW_COPY_AND_ASSIGN(SearchProvider); 538 DISALLOW_COPY_AND_ASSIGN(SearchProvider);
538 }; 539 };
539 540
540 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ 541 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698