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

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: 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/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..fe1af7be71e5b7412b41547c07d0134dd441fcd4 100644
--- a/chromeos/dbus/shill_manager_client_unittest.cc
+++ b/chromeos/dbus/shill_manager_client_unittest.cc
@@ -2,11 +2,15 @@
// 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/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 +165,12 @@ 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;
+ std::unique_ptr<base::DictionaryValue> property_dict_value(
+ new 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.

Powered by Google App Engine
This is Rietveld 408576698