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

Unified Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 1927993002: Allow dumping raw json fetched from the server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After code review #2 Created 4 years, 8 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 e0eafaf90bce3e7c2efb7c190e47bc4af953630b..e958ade8a27054118944400d0880593c90a41844 100644
--- a/components/ntp_snippets/ntp_snippets_service.h
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -85,6 +85,11 @@ class NTPSnippetsService : public KeyedService {
return last_fetch_status_;
}
+ // Returns the last json from the snippets fetcher.
+ const std::string& last_json() const {
+ return last_fetch_json_;
+ }
+
// (Re)schedules the periodic fetching of snippets. This is necessary because
// the schedule depends on the time of day
void RescheduleFetching();
@@ -202,6 +207,8 @@ class NTPSnippetsService : public KeyedService {
std::string last_fetch_status_;
+ std::string last_fetch_json_;
+
// Timer that calls us back when the next snippet expires.
base::OneShotTimer expiry_timer_;
« no previous file with comments | « chrome/browser/ui/webui/snippets_internals_message_handler.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698