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

Unified Diff: chromeos/dbus/shill_manager_client_unittest.cc

Issue 2392693002: Rewrite simple uses of base::ListValue::Append(base::Value*) on CrOS. (Closed)
Patch Set: MakeUnique 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
« no previous file with comments | « chromeos/dbus/gsm_sms_client_unittest.cc ('k') | chromeos/dbus/shill_profile_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_manager_client_unittest.cc
diff --git a/chromeos/dbus/shill_manager_client_unittest.cc b/chromeos/dbus/shill_manager_client_unittest.cc
index 12ec4f01b6cdc276c2f493dd70f60779969f3489..83f1412d1ad4d185a963158b28308d7cb5e74f00 100644
--- a/chromeos/dbus/shill_manager_client_unittest.cc
+++ b/chromeos/dbus/shill_manager_client_unittest.cc
@@ -2,11 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chromeos/dbus/shill_manager_client.h"
+
+#include <memory>
+#include <utility>
+
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/values.h"
#include "chromeos/dbus/shill_client_unittest_base.h"
-#include "chromeos/dbus/shill_manager_client.h"
#include "dbus/message.h"
#include "dbus/object_path.h"
#include "dbus/values_util.h"
@@ -161,11 +166,11 @@ TEST_F(ShillManagerClientTest, GetNetworksForGeolocation) {
// Create the expected value.
base::DictionaryValue type_dict_value;
base::ListValue* type_entry_value = new base::ListValue;
- base::DictionaryValue* property_dict_value = new base::DictionaryValue;
+ auto property_dict_value = base::MakeUnique<base::DictionaryValue>();
property_dict_value->SetWithoutPathExpansion(
shill::kGeoMacAddressProperty,
new base::StringValue("01:23:45:67:89:AB"));
- type_entry_value->Append(property_dict_value);
+ type_entry_value->Append(std::move(property_dict_value));
type_dict_value.SetWithoutPathExpansion("wifi", type_entry_value);
// Set expectations.
« no previous file with comments | « chromeos/dbus/gsm_sms_client_unittest.cc ('k') | chromeos/dbus/shill_profile_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698