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

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

Issue 671593002: Do not delay most visited results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Casting fix Created 6 years, 2 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 | « no previous file | chrome/browser/autocomplete/zero_suggest_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/zero_suggest_provider.h
diff --git a/chrome/browser/autocomplete/zero_suggest_provider.h b/chrome/browser/autocomplete/zero_suggest_provider.h
index aaeaa6f88251564efd9f2933ddc06e6b178439b0..6048c0c040920a6ca0504de99b48ecfc865d87d0 100644
--- a/chrome/browser/autocomplete/zero_suggest_provider.h
+++ b/chrome/browser/autocomplete/zero_suggest_provider.h
@@ -119,10 +119,11 @@ class ZeroSuggestProvider : public BaseSearchProvider,
// Returns the relevance score for the verbatim result.
int GetVerbatimRelevance() const;
- // Whether we can show zero suggest on |current_page_url| without
- // sending |current_page_url| as a parameter to the server at |suggest_url|.
- bool CanShowZeroSuggestWithoutSendingURL(const GURL& suggest_url,
- const GURL& current_page_url) const;
+ // Whether we can show zero suggest without sending |current_page_url| to
+ // |suggest_url| search provider. Also checks that other conditions for
+ // non-contextual zero suggest are satisfied.
+ bool ShouldShowNonContextualZeroSuggest(const GURL& suggest_url,
+ const GURL& current_page_url) const;
// Checks whether we have a set of zero suggest results cached, and if so
// populates |matches_| with cached results.
@@ -156,6 +157,9 @@ class ZeroSuggestProvider : public BaseSearchProvider,
history::MostVisitedURLList most_visited_urls_;
+ // Whether we are waiting for a most visited visited urls callback to run.
+ bool waiting_for_most_visited_urls_request_;
+
// For callbacks that may be run after destruction.
base::WeakPtrFactory<ZeroSuggestProvider> weak_ptr_factory_;
« no previous file with comments | « no previous file | chrome/browser/autocomplete/zero_suggest_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698