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

Unified Diff: chrome/browser/ui/webui/snippets_internals_message_handler.cc

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
« no previous file with comments | « chrome/browser/resources/snippets_internals.html ('k') | components/ntp_snippets/ntp_snippets_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/snippets_internals_message_handler.cc
diff --git a/chrome/browser/ui/webui/snippets_internals_message_handler.cc b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
index 363919fbec35873db79e2b69c843a73f07445273..bd3fe9e489114f0c39565282c7688fb486d4a5f9 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
@@ -122,6 +122,8 @@ void SnippetsInternalsMessageHandler::HandleDownload(
const base::ListValue* args) {
DCHECK_EQ(1u, args->GetSize());
+ SendString("hosts-status", std::string());
+
std::string hosts_string;
args->GetString(0, &hosts_string);
@@ -160,6 +162,10 @@ void SnippetsInternalsMessageHandler::SendSnippets() {
result.Set("list", std::move(snippets_list));
web_ui()->CallJavascriptFunction("chrome.SnippetsInternals.receiveSnippets",
result);
+
+ const std::string& status = ntp_snippets_service_->last_status();
+ if (!status.empty())
+ SendString("hosts-status", "Finished: " + status);
}
void SnippetsInternalsMessageHandler::SendDiscardedSnippets() {
« no previous file with comments | « chrome/browser/resources/snippets_internals.html ('k') | components/ntp_snippets/ntp_snippets_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698