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

Unified Diff: components/ntp_snippets/ntp_snippets_fetcher.h

Issue 2274953002: Inform server of dismissed articles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 4 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_fetcher.h
diff --git a/components/ntp_snippets/ntp_snippets_fetcher.h b/components/ntp_snippets/ntp_snippets_fetcher.h
index 33f6c180ff2cc205d0bee64c7cfe6b7c2af5d015..daa8bae58d0cf2b3aee947b3e58e7f6161925fcd 100644
--- a/components/ntp_snippets/ntp_snippets_fetcher.h
+++ b/components/ntp_snippets/ntp_snippets_fetcher.h
@@ -91,6 +91,7 @@ class NTPSnippetsFetcher : public OAuth2TokenService::Consumer,
// Fetches snippets from the server. |hosts| restricts the results to a set of
// hosts, e.g. "www.google.com". An empty host set produces an error.
Marc Treib 2016/08/25 09:01:41 Not your doing, but: Do you mind updating this com
sfiera 2016/08/25 10:39:56 Done.
+ // Suggestions in |excluded_ids| will not be returned.
//
// If an ongoing fetch exists, it will be cancelled and a new one started,
// without triggering an additional callback (i.e. not noticeable by
@@ -100,6 +101,7 @@ class NTPSnippetsFetcher : public OAuth2TokenService::Consumer,
// |interactive_request| is set to true (use only for user-initiated fetches).
void FetchSnippetsFromHosts(const std::set<std::string>& hosts,
const std::string& language_code,
+ const std::set<std::string>& excluded_ids,
int count,
bool interactive_request);
@@ -146,6 +148,7 @@ class NTPSnippetsFetcher : public OAuth2TokenService::Consumer,
bool only_return_personalized_results;
std::string user_locale;
std::set<std::string> host_restricts;
+ std::set<std::string> excluded_ids;
int count_to_fetch;
RequestParams();
@@ -201,6 +204,9 @@ class NTPSnippetsFetcher : public OAuth2TokenService::Consumer,
// Hosts to restrict the snippets to.
std::set<std::string> hosts_;
+ // Snippets to exclude from the results.
+ std::set<std::string> excluded_ids_;
+
// Count of snippets to fetch.
int count_to_fetch_;

Powered by Google App Engine
This is Rietveld 408576698