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

Unified Diff: components/ntp_snippets/remote/ntp_snippets_fetcher.h

Issue 2421463002: FetchMore functionality backend (Closed)
Patch Set: Strategy pattern to handle differences in fetching procedure. Created 4 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
Index: components/ntp_snippets/remote/ntp_snippets_fetcher.h
diff --git a/components/ntp_snippets/remote/ntp_snippets_fetcher.h b/components/ntp_snippets/remote/ntp_snippets_fetcher.h
index f5bbf27412cc229053c8a01e15988a324e07afc0..fc727b2d01cf49bf6fee1cbb60abbc064b6590e3 100644
--- a/components/ntp_snippets/remote/ntp_snippets_fetcher.h
+++ b/components/ntp_snippets/remote/ntp_snippets_fetcher.h
@@ -65,7 +65,7 @@ class NTPSnippetsFetcher : public OAuth2TokenService::Consumer,
// occur, |snippets| contains no value (no actual vector in base::Optional).
// Error details can be retrieved using last_status().
using SnippetsAvailableCallback =
- base::Callback<void(OptionalFetchedCategories fetched_categories)>;
+ base::OnceCallback<void(OptionalFetchedCategories fetched_categories)>;
Marc Treib 2016/10/18 08:17:45 If the callback is now for one fetch only, it shou
fhorschig 2016/10/20 13:10:38 The callback is passed into FetchSnippets. The de
Marc Treib 2016/10/20 16:51:39 Well, that's what the previous behavior amounted t
tschumann 2016/10/24 06:38:25 never trust untested code ;-) A test would be real
Marc Treib 2016/10/28 14:49:48 We decided to fix this after this CL (crbug.com/65
// Enumeration listing all possible outcomes for fetch attempts. Used for UMA
// histograms, so do not change existing values. Insert new values at the end,
@@ -104,7 +104,7 @@ class NTPSnippetsFetcher : public OAuth2TokenService::Consumer,
// Set a callback that is called when a new set of snippets are downloaded,
// overriding any previously set callback.
- void SetCallback(const SnippetsAvailableCallback& callback);
+ void SetCallback(SnippetsAvailableCallback callback);
// Fetches snippets from the server. |hosts| restricts the results to a set of
// hosts, e.g. "www.google.com". If |hosts| is empty, no host restrictions are

Powered by Google App Engine
This is Rietveld 408576698