| 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 45d30e23d9176985afe26428309d0cce8151032e..9c9f371e17fd9975b1a382aef6c95138fb743c25 100644
|
| --- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
|
| +++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
|
| @@ -177,8 +177,9 @@ void SnippetsInternalsMessageHandler::SendSnippets() {
|
| std::unique_ptr<base::ListValue> snippets_list(new base::ListValue);
|
|
|
| int index = 0;
|
| - for (auto& snippet : *ntp_snippets_service_)
|
| - snippets_list->Append(PrepareSnippet(snippet, index++, false));
|
| + for (const std::unique_ptr<ntp_snippets::NTPSnippet>& snippet :
|
| + ntp_snippets_service_->snippets())
|
| + snippets_list->Append(PrepareSnippet(*snippet, index++, false));
|
|
|
| base::DictionaryValue result;
|
| result.Set("list", std::move(snippets_list));
|
| @@ -194,7 +195,7 @@ void SnippetsInternalsMessageHandler::SendDiscardedSnippets() {
|
| std::unique_ptr<base::ListValue> snippets_list(new base::ListValue);
|
|
|
| int index = 0;
|
| - for (auto& snippet : ntp_snippets_service_->discarded_snippets())
|
| + for (const auto& snippet : ntp_snippets_service_->discarded_snippets())
|
| snippets_list->Append(PrepareSnippet(*snippet, index++, true));
|
|
|
| base::DictionaryValue result;
|
|
|