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

Unified Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 2811673002: Reland: Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: Workaround with std::move Created 3 years, 8 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: chrome/browser/chromeos/options/wifi_config_view.cc
diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc
index 65edd85bbfa7fde4bd8b53c49eec0bb632237bed..2ce524b226eb724ca7a3606be668b89a23df4bcb 100644
--- a/chrome/browser/chromeos/options/wifi_config_view.cc
+++ b/chrome/browser/chromeos/options/wifi_config_view.cc
@@ -6,8 +6,11 @@
#include <stddef.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chromeos/enrollment_dialog_view.h"
@@ -889,12 +892,12 @@ void WifiConfigView::SetEapProperties(base::DictionaryValue* properties,
properties->SetStringWithoutPathExpansion(
shill::kEapPasswordProperty, GetPassphrase());
}
- base::ListValue* pem_list = new base::ListValue;
+ auto pem_list = base::MakeUnique<base::ListValue>();
std::string ca_cert_pem = GetEapServerCaCertPEM();
if (!ca_cert_pem.empty())
pem_list->AppendString(ca_cert_pem);
- properties->SetWithoutPathExpansion(
- shill::kEapCaCertPemProperty, pem_list);
+ properties->SetWithoutPathExpansion(shill::kEapCaCertPemProperty,
+ std::move(pem_list));
}
void WifiConfigView::Cancel() {
« no previous file with comments | « chrome/browser/chromeos/options/vpn_config_view.cc ('k') | chrome/browser/chromeos/platform_keys/key_permissions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698