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

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

Issue 10274023: Omnibox SearchProvider Experiment Client Implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make BestURLPrefix perform case-insensitive comparison. Created 8 years, 6 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
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.h ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/search_provider.h
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index eea935abce62f2e963aa366664c890fbf4a51504..6fcabee48fd6cf63b69c9fdbb60786c964bb4a93 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -89,6 +89,7 @@ class SearchProvider : public AutocompleteProvider,
static const int kKeywordProviderURLFetcherID;
private:
+ FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, SuggestRelevanceExperiment);
FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, NavigationInline);
FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, NavigationInlineSchemeSubstring);
FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, NavigationInlineDomainClassify);
@@ -226,6 +227,17 @@ class SearchProvider : public AutocompleteProvider,
// Clears the current results.
void ClearResults();
+ // Remove results that cannot inline auto-complete the current input.
+ void RemoveStaleResults();
+ void RemoveStaleSuggestResults(SuggestResults* list, bool is_keyword);
+ void RemoveStaleNavigationResults(NavigationResults* list, bool is_keyword);
+
+ // Apply calculated relevance scores to the current results.
+ void ApplyCalculatedRelevance();
+ void ApplyCalculatedSuggestRelevance(SuggestResults* list, bool is_keyword);
+ void ApplyCalculatedNavigationRelevance(NavigationResults* list,
+ bool is_keyword);
+
// Creates a URLFetcher requesting suggest results from the specified
// |suggestions_url|. The caller owns the returned URLFetcher.
net::URLFetcher* CreateSuggestFetcher(
@@ -343,6 +355,13 @@ class SearchProvider : public AutocompleteProvider,
NavigationResults keyword_navigation_results_;
NavigationResults default_navigation_results_;
+ // A flag indicating use of server supplied relevance scores.
+ bool has_suggested_relevance_;
+
+ // The server supplied verbatim relevance score. Negative values indicate that
+ // there is no suggested score; a value of 0 suppresses the verbatim result.
+ int verbatim_relevance_;
+
// Whether suggest_results_ is valid.
bool have_suggest_results_;
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.h ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698