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

Unified Diff: chromeos/network/proxy/ui_proxy_config_service.cc

Issue 2785883003: Use unique_ptr<DictionaryValue> in ProxyConfigDictionary (Closed)
Patch Set: one constructor Created 3 years, 9 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/network/proxy/ui_proxy_config_service.cc
diff --git a/chromeos/network/proxy/ui_proxy_config_service.cc b/chromeos/network/proxy/ui_proxy_config_service.cc
index 235fcef6c7761a244ce129bbe4cbb62b8d139353..57bf00ec57a0676d23a01feb7fea6d838815acac 100644
--- a/chromeos/network/proxy/ui_proxy_config_service.cc
+++ b/chromeos/network/proxy/ui_proxy_config_service.cc
@@ -5,6 +5,7 @@
#include "chromeos/network/proxy/ui_proxy_config_service.h"
#include <memory>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -143,11 +144,11 @@ void UIProxyConfigService::SetProxyConfig(const std::string& network_guid,
// Store config for this network.
std::unique_ptr<base::DictionaryValue> proxy_config_value(
config.ToPrefProxyConfig());
- ProxyConfigDictionary proxy_config_dict(proxy_config_value.get());
VLOG(1) << "Set proxy for " << current_ui_network_guid_ << " to "
<< *proxy_config_value;
+ ProxyConfigDictionary proxy_config_dict(std::move(proxy_config_value));
proxy_config::SetProxyConfigForNetwork(proxy_config_dict, *network);
current_ui_config_.state = ProxyPrefs::CONFIG_SYSTEM;
}

Powered by Google App Engine
This is Rietveld 408576698