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

Unified Diff: components/proxy_config/pref_proxy_config_tracker_impl.cc

Issue 2784513002: Move PrefRegistrySimple to use unique_ptr<Value> (Closed)
Patch Set: Android 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
« no previous file with comments | « components/prefs/pref_service_unittest.cc ('k') | components/signin/core/browser/signin_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proxy_config/pref_proxy_config_tracker_impl.cc
diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.cc b/components/proxy_config/pref_proxy_config_tracker_impl.cc
index a7ffcb86b3af320bdfaee7cbb5a8e94fda33e081..9c8da06904abb0db3520518b0269936b643a4e3a 100644
--- a/components/proxy_config/pref_proxy_config_tracker_impl.cc
+++ b/components/proxy_config/pref_proxy_config_tracker_impl.cc
@@ -6,6 +6,8 @@
#include <stddef.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
@@ -205,19 +207,19 @@ net::ProxyConfigService::ConfigAvailability
// static
void PrefProxyConfigTrackerImpl::RegisterPrefs(PrefRegistrySimple* registry) {
- base::DictionaryValue* default_settings =
- ProxyConfigDictionary::CreateSystem();
+ std::unique_ptr<base::DictionaryValue> default_settings(
+ ProxyConfigDictionary::CreateSystem());
registry->RegisterDictionaryPref(proxy_config::prefs::kProxy,
- default_settings);
+ std::move(default_settings));
}
// static
void PrefProxyConfigTrackerImpl::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* pref_service) {
- base::DictionaryValue* default_settings =
- ProxyConfigDictionary::CreateSystem();
+ std::unique_ptr<base::DictionaryValue> default_settings(
+ ProxyConfigDictionary::CreateSystem());
pref_service->RegisterDictionaryPref(proxy_config::prefs::kProxy,
- default_settings);
+ std::move(default_settings));
pref_service->RegisterBooleanPref(proxy_config::prefs::kUseSharedProxies,
false);
}
« no previous file with comments | « components/prefs/pref_service_unittest.cc ('k') | components/signin/core/browser/signin_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698