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

Unified Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 2162533002: Adding a request counter to the snippets fetcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@traffic-monitor
Patch Set: Bernhard's comments Created 4 years, 5 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: components/ntp_snippets/ntp_snippets_service.h
diff --git a/components/ntp_snippets/ntp_snippets_service.h b/components/ntp_snippets/ntp_snippets_service.h
index 9b2562d9a55db40f8d66053817da38e47ef6306e..d3cf7bad3c0c6826c83a0471a733eac29e477ae2 100644
--- a/components/ntp_snippets/ntp_snippets_service.h
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -100,12 +100,17 @@ class NTPSnippetsService : public KeyedService,
bool initialized() const { return ready() || state_ == State::DISABLED; }
// Fetches snippets from the server and adds them to the current ones.
- void FetchSnippets();
+ // Requests can be marked more important by setting |force_request| to true
+ // (such request might circumvent the daily quota for requests, etc.) Useful
+ // for requests triggered by the user.
+ void FetchSnippets(bool force_request);
+
// Fetches snippets from the server for specified hosts (overriding
// suggestions from the suggestion service) and adds them to the current ones.
// Only called from chrome://snippets-internals, DO NOT USE otherwise!
// Ignored while |loaded()| is false.
- void FetchSnippetsFromHosts(const std::set<std::string>& hosts);
+ void FetchSnippetsFromHosts(const std::set<std::string>& hosts,
+ bool force_request);
// Available snippets.
const NTPSnippet::PtrVector& snippets() const { return snippets_; }
« no previous file with comments | « components/ntp_snippets/ntp_snippets_fetcher_unittest.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698