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

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

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.cc
diff --git a/components/ntp_snippets/remote/ntp_snippets_fetcher.cc b/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
index 8e577878ffa620df986580aaed386f777fdc85f4..bde95efc23cce31135e11e86e6f463ce1d62c443 100644
--- a/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
+++ b/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
@@ -316,9 +316,8 @@ NTPSnippetsFetcher::~NTPSnippetsFetcher() {
token_service_->RemoveObserver(this);
}
-void NTPSnippetsFetcher::SetCallback(
- const SnippetsAvailableCallback& callback) {
- snippets_available_callback_ = callback;
+void NTPSnippetsFetcher::SetCallback(SnippetsAvailableCallback callback) {
+ snippets_available_callback_ = std::move(callback);
}
void NTPSnippetsFetcher::FetchSnippetsFromHosts(
@@ -770,7 +769,7 @@ void NTPSnippetsFetcher::FetchFinished(
DVLOG(1) << "Fetch finished: " << last_status_;
if (!snippets_available_callback_.is_null())
- snippets_available_callback_.Run(std::move(fetched_categories));
+ std::move(snippets_available_callback_).Run(std::move(fetched_categories));
}
bool NTPSnippetsFetcher::DemandQuotaForRequest(bool interactive_request) {

Powered by Google App Engine
This is Rietveld 408576698