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

Unified Diff: components/ntp_snippets/ntp_snippets_fetcher.h

Issue 1910633005: Display status message for "Add snippets" on chrome://snippets-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: The final version ;) 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_fetcher.h
diff --git a/components/ntp_snippets/ntp_snippets_fetcher.h b/components/ntp_snippets/ntp_snippets_fetcher.h
index ae7fd6c97b85919d9d713199e98ebee26a11ad5e..1c0b7d4e7a109a0d741bd8ed4c7ea2a40ebcc9aa 100644
--- a/components/ntp_snippets/ntp_snippets_fetcher.h
+++ b/components/ntp_snippets/ntp_snippets_fetcher.h
@@ -21,9 +21,13 @@ namespace ntp_snippets {
// Fetches snippet data for the NTP from the server
class NTPSnippetsFetcher : public net::URLFetcherDelegate {
public:
- using SnippetsAvailableCallback = base::Callback<void(const std::string&)>;
+ // If problems occur (explained in |status_message|), |snippets_json| is
+ // empty; otherwise, |status_message| is empty.
+ using SnippetsAvailableCallback =
+ base::Callback<void(const std::string& snippets_json,
+ const std::string& status_message)>;
using SnippetsAvailableCallbackList =
- base::CallbackList<void(const std::string&)>;
+ base::CallbackList<void(const std::string&, const std::string&)>;
NTPSnippetsFetcher(
scoped_refptr<base::SequencedTaskRunner> file_task_runner,
« no previous file with comments | « chrome/browser/ui/webui/snippets_internals_message_handler.cc ('k') | components/ntp_snippets/ntp_snippets_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698