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

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: Minor edit (removing one empty line). 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..d5b262412746b548301a0d4d3f8c98a45e18ae47 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,9 @@ 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);
Bernhard Bauer 2016/04/22 09:42:17 Put the body of the if-statement onto a new line.
jkrcal 2016/04/22 11:11:59 Done.
}
void SnippetsInternalsMessageHandler::SendDiscardedSnippets() {

Powered by Google App Engine
This is Rietveld 408576698