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

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

Issue 67693004: Omnibox: Don't Let Users Escape Keyword Mode Accidentally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: namespace Created 7 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider.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 (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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 // |autocomplete_result_will_reorder_for_default_match| is false, 423 // |autocomplete_result_will_reorder_for_default_match| is false,
424 // this simply means the first match; otherwise, it means the first 424 // this simply means the first match; otherwise, it means the first
425 // match for which the |allowed_to_be_default_match| member is true. 425 // match for which the |allowed_to_be_default_match| member is true.
426 ACMatches::const_iterator FindTopMatch( 426 ACMatches::const_iterator FindTopMatch(
427 bool autocomplete_result_will_reorder_for_default_match) const; 427 bool autocomplete_result_will_reorder_for_default_match) const;
428 428
429 // Checks if suggested relevances violate certain expected constraints. 429 // Checks if suggested relevances violate certain expected constraints.
430 // See UpdateMatches() for the use and explanation of these constraints. 430 // See UpdateMatches() for the use and explanation of these constraints.
431 bool IsTopMatchNavigationInKeywordMode( 431 bool IsTopMatchNavigationInKeywordMode(
432 bool autocomplete_result_will_reorder_for_default_match) const; 432 bool autocomplete_result_will_reorder_for_default_match) const;
433 bool HasKeywordDefaultMatchInKeywordMode() const;
433 bool IsTopMatchScoreTooLow( 434 bool IsTopMatchScoreTooLow(
434 bool autocomplete_result_will_reorder_for_default_match) const; 435 bool autocomplete_result_will_reorder_for_default_match) const;
435 bool IsTopMatchSearchWithURLInput( 436 bool IsTopMatchSearchWithURLInput(
436 bool autocomplete_result_will_reorder_for_default_match) const; 437 bool autocomplete_result_will_reorder_for_default_match) const;
437 bool HasValidDefaultMatch( 438 bool HasValidDefaultMatch(
438 bool autocomplete_result_will_reorder_for_default_match) const; 439 bool autocomplete_result_will_reorder_for_default_match) const;
439 440
440 // Updates |matches_| from the latest results; applies calculated relevances 441 // Updates |matches_| from the latest results; applies calculated relevances
441 // if suggested relevances cause undesriable behavior. Updates |done_|. 442 // if suggested relevances cause undesriable behavior. Updates |done_|.
442 void UpdateMatches(); 443 void UpdateMatches();
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 // If true, search history query suggestions will score low enough that 633 // If true, search history query suggestions will score low enough that
633 // they will not be inlined. 634 // they will not be inlined.
634 bool prevent_search_history_inlining_; 635 bool prevent_search_history_inlining_;
635 636
636 GURL current_page_url_; 637 GURL current_page_url_;
637 638
638 DISALLOW_COPY_AND_ASSIGN(SearchProvider); 639 DISALLOW_COPY_AND_ASSIGN(SearchProvider);
639 }; 640 };
640 641
641 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ 642 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698