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

Unified Diff: components/wifi/network_properties.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 years, 6 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: components/wifi/network_properties.cc
diff --git a/components/wifi/network_properties.cc b/components/wifi/network_properties.cc
index e8991259e3a3005ca77e84d71568e48f8082c173..9d7a23181e384bdd16943bcb165286bb37ed6a8f 100644
--- a/components/wifi/network_properties.cc
+++ b/components/wifi/network_properties.cc
@@ -4,6 +4,8 @@
#include "components/wifi/network_properties.h"
+#include <utility>
+
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -52,14 +54,14 @@ std::unique_ptr<base::DictionaryValue> NetworkProperties::ToValue(
frequency_list->AppendInteger(*it);
}
if (!frequency_list->empty())
- wifi->Set(onc::wifi::kFrequencyList, frequency_list.release());
+ wifi->Set(onc::wifi::kFrequencyList, std::move(frequency_list));
if (!bssid.empty())
wifi->SetString(onc::wifi::kBSSID, bssid);
wifi->SetString(onc::wifi::kSSID, ssid);
wifi->SetString(onc::wifi::kHexSSID,
base::HexEncode(ssid.c_str(), ssid.size()));
}
- value->Set(onc::network_type::kWiFi, wifi.release());
+ value->Set(onc::network_type::kWiFi, std::move(wifi));
return value;
}

Powered by Google App Engine
This is Rietveld 408576698