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

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

Issue 2549163002: RemoteContentSuggestions: Stores the time of the last successful background fetch in a pref (Closed)
Patch Set: Address comments treib@ 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: 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 62236a8a375cab50981b1a7798b0ce55f963798c..c788e0bfcfa34d04426334957a21b8bc696c92d4 100644
--- a/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
+++ b/components/ntp_snippets/remote/ntp_snippets_fetcher.cc
@@ -997,6 +997,9 @@ void NTPSnippetsFetcher::FetchFinished(OptionalFetchedCategories categories,
const std::string& error_details) {
DCHECK(status_code == FetchResult::SUCCESS || !categories.has_value());
+ LOG(ERROR) << " ================ ststus_code="
markusheintz_ 2016/12/08 09:50:24 Removed
+ << static_cast<int>(status_code);
+
last_status_ = FetchResultToString(status_code) + error_details;
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Snippets.FetchResult",
@@ -1005,7 +1008,7 @@ void NTPSnippetsFetcher::FetchFinished(OptionalFetchedCategories categories,
DVLOG(1) << "Fetch finished: " << last_status_;
- std::move(callback).Run(std::move(categories));
+ std::move(callback).Run(std::move(categories), status_code);
}
bool NTPSnippetsFetcher::JsonToSnippets(const base::Value& parsed,
« no previous file with comments | « components/ntp_snippets/remote/ntp_snippets_fetcher.h ('k') | components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698