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

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: Another minor polish + fixing the closely related bug 605520 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: 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..3c0f9a7dc6b4929f5afcf01f0f9bab780194d8fc 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", "");
Bernhard Bauer 2016/04/21 16:28:40 Nit: Use an empty std::string() constructor instea
jkrcal 2016/04/22 09:30:28 Done.
+
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);
+
+ if (!ntp_snippets_service_->get_last_status().empty())
Marc Treib 2016/04/21 13:47:20 nit: Don't call last_status() twice, call it once
jkrcal 2016/04/22 09:30:28 Done.
+ SendString("hosts-status",
+ "Finished: " + ntp_snippets_service_->get_last_status());
}
void SnippetsInternalsMessageHandler::SendDiscardedSnippets() {

Powered by Google App Engine
This is Rietveld 408576698