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

Unified Diff: chromeos/dbus/gsm_sms_client_unittest.cc

Issue 2392693002: Rewrite simple uses of base::ListValue::Append(base::Value*) on CrOS. (Closed)
Patch Set: headers Created 4 years, 2 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: chromeos/dbus/gsm_sms_client_unittest.cc
diff --git a/chromeos/dbus/gsm_sms_client_unittest.cc b/chromeos/dbus/gsm_sms_client_unittest.cc
index 80c9a41e290457b704502d8590076c701bfd821a..6177baface3fe04f69d3815aaaa133dae7fe7603 100644
--- a/chromeos/dbus/gsm_sms_client_unittest.cc
+++ b/chromeos/dbus/gsm_sms_client_unittest.cc
@@ -6,6 +6,9 @@
#include <stdint.h>
+#include <memory>
+#include <utility>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
@@ -312,11 +315,11 @@ TEST_F(GsmSMSClientTest, List) {
response_ = response.get();
// Create expected result.
base::ListValue expected_result;
- base::DictionaryValue* sms = new base::DictionaryValue;
+ std::unique_ptr<base::DictionaryValue> sms(new base::DictionaryValue);
sms->SetWithoutPathExpansion(kNumberKey,
new base::StringValue(kExampleNumber));
sms->SetWithoutPathExpansion(kTextKey, new base::StringValue(kExampleText));
- expected_result.Append(sms);
+ expected_result.Append(std::move(sms));
expected_result_ = &expected_result;
// Call List.
client_->List(kServiceName, dbus::ObjectPath(kObjectPath),

Powered by Google App Engine
This is Rietveld 408576698