Chromium Code Reviews| Index: ash/common/system/chromeos/network/tray_sms.cc |
| diff --git a/ash/common/system/chromeos/network/tray_sms.cc b/ash/common/system/chromeos/network/tray_sms.cc |
| index 05d3b5b08511fe97d543ecec63a0e28c1e303296..f15ea483e06614c10e1c57e8cc42aa47022c5fee 100644 |
| --- a/ash/common/system/chromeos/network/tray_sms.cc |
| +++ b/ash/common/system/chromeos/network/tray_sms.cc |
| @@ -4,6 +4,9 @@ |
| #include "ash/common/system/chromeos/network/tray_sms.h" |
| +#include <memory> |
| +#include <utility> |
| + |
| #include "ash/common/material_design/material_design_controller.h" |
| #include "ash/common/metrics/user_metrics_action.h" |
| #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
| @@ -368,10 +371,10 @@ void TraySms::MessageReceived(const base::DictionaryValue& message) { |
| "Received SMS from: " + message_number + " with text: " + message_text, |
| ""); |
| - base::DictionaryValue* dict = new base::DictionaryValue(); |
| + std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
|
sky
2016/10/03 21:48:18
MakeUnique?
|
| dict->SetString(kSmsNumberKey, message_number); |
| dict->SetString(kSmsTextKey, message_text); |
| - messages_.Append(dict); |
| + messages_.Append(std::move(dict)); |
| Update(true); |
| } |