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

Unified Diff: chrome/browser/ui/webui/snippets_internals_message_handler.h

Issue 2569663004: [NTPSnippets] Switch from TickClock to Clock for storing the last background fetched time. (Closed)
Patch Set: Created 4 years 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/ui/webui/snippets_internals_message_handler.h
diff --git a/chrome/browser/ui/webui/snippets_internals_message_handler.h b/chrome/browser/ui/webui/snippets_internals_message_handler.h
index d6911cfe20d8a3fce0bbe9dff2fdca72f55a034d..07bb68a587700fe6cfa7a31a352e2c0cd6cb8d86 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.h
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.h
@@ -22,12 +22,14 @@ namespace base {
class ListValue;
} // namespace base
+class PrefService;
+
// The implementation for the chrome://snippets-internals page.
class SnippetsInternalsMessageHandler
: public content::WebUIMessageHandler,
public ntp_snippets::ContentSuggestionsService::Observer {
public:
- SnippetsInternalsMessageHandler();
+ explicit SnippetsInternalsMessageHandler(PrefService* pref_service);
~SnippetsInternalsMessageHandler() override;
private:
@@ -52,9 +54,11 @@ class SnippetsInternalsMessageHandler
void HandleClearDismissedSuggestions(const base::ListValue* args);
void HandleToggleDismissedSuggestions(const base::ListValue* args);
void ClearClassification(const base::ListValue* args);
+ void FetchRemoteSuggestionsInTheBackground(const base::ListValue* args);
void SendAllContent();
void SendClassification();
+ void SendLastRemoteSuggestionsBackgroundFetchTime();
void SendContentSuggestions();
void SendBoolean(const std::string& name, bool value);
void SendString(const std::string& name, const std::string& value);
@@ -72,6 +76,7 @@ class SnippetsInternalsMessageHandler
ntp_snippets::RemoteSuggestionsProvider* ntp_snippets_service_;
ntp_snippets::ContentSuggestionsService* content_suggestions_service_;
+ PrefService* pref_service_;
std::map<ntp_snippets::Category,
DismissedState,

Powered by Google App Engine
This is Rietveld 408576698