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

Unified Diff: chrome/browser/autocomplete/search_provider.h

Issue 12090006: Omnibox: Create Keyword Verbatim Result in Search Provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: roperly resolved (variable rename) Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/search_provider.h
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index 0a0059a4a3ac1fad3e4db3838845d7d99049fa4a..d30e87bf327f15122281cfe08365c465a1c9d6fc 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -3,9 +3,9 @@
// found in the LICENSE file.
//
// This file contains the Search autocomplete provider. This provider is
-// responsible for all non-keyword autocomplete entries that start with
-// "Search <engine> for ...", including searching for the current input string,
-// search history, and search suggestions. An instance of it gets created and
+// responsible for all autocomplete entries that start with "Search <engine>
+// for ...", including searching for the current input string, search
+// history, and search suggestions. An instance of it gets created and
// managed by the autocomplete controller.
#ifndef CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_
@@ -288,11 +288,15 @@ class SearchProvider : public AutocompleteProvider,
bool is_keyword,
MatchMap* map);
- // Get the relevance score for the verbatim result; this value may be provided
- // by the suggest server; otherwise it is calculated locally.
+ // Gets the relevance score for the verbatim result; this value may be
+ // provided by the suggest server; otherwise it is calculated locally.
int GetVerbatimRelevance() const;
- // Calculate the relevance score for the verbatim result.
+ // Calculates the relevance score for the verbatim result.
int CalculateRelevanceForVerbatim() const;
+ // Calculates the relevance score for the keyword verbatim result (if the
+ // input matches one of the profile's keyword).
+ static int CalculateRelevanceForKeywordVerbatim(AutocompleteInput::Type type,
+ bool prefer_keyword);
// |time| is the time at which this query was last seen. |is_keyword|
// indicates whether the results correspond to the keyword provider or default
// provider. |prevent_inline_autocomplete| is true if we should not inline
@@ -300,10 +304,10 @@ class SearchProvider : public AutocompleteProvider,
int CalculateRelevanceForHistory(const base::Time& time,
bool is_keyword,
bool prevent_inline_autocomplete) const;
- // Calculate the relevance for search suggestion results. Set |for_keyword| to
- // true for relevance values applicable to keyword provider results.
+ // Calculates the relevance for search suggestion results. Set |for_keyword|
+ // to true for relevance values applicable to keyword provider results.
int CalculateRelevanceForSuggestion(bool for_keyword) const;
- // Calculate the relevance for navigation results. Set |for_keyword| to true
+ // Calculates the relevance for navigation results. Set |for_keyword| to true
// for relevance values applicable to keyword provider results.
int CalculateRelevanceForNavigation(bool for_keyword) const;
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider_unittest.cc ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698