Commit 61f40095 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Remove uses of deprecated RegisterDictionaryPref

The override of RegisterDictionaryPref taking a std::unique_ptr<base::Value>
is deprecated in favor of the method taking the base::Value by value.

Convert client code to either not pass default value if the value is just
an empty dictionary (as there is an override doing this). If the dictionary
is not empty, convert the code to create and pass it by value.

This CL was uploaded by git cl split.

Bug: 646113
Change-Id: I3cc0af55c8101bf35defc79068a48d11f3c6ff73
Reviewed-on: https://chromium-review.googlesource.com/c/1454523
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629184}
parent ec2d97a0
......@@ -236,17 +236,15 @@ PrefProxyConfigTrackerImpl::GetEffectiveProxyConfig(
// static
void PrefProxyConfigTrackerImpl::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterDictionaryPref(
proxy_config::prefs::kProxy,
std::make_unique<base::Value>(ProxyConfigDictionary::CreateSystem()));
registry->RegisterDictionaryPref(proxy_config::prefs::kProxy,
ProxyConfigDictionary::CreateSystem());
}
// static
void PrefProxyConfigTrackerImpl::RegisterProfilePrefs(
PrefRegistrySimple* registry) {
registry->RegisterDictionaryPref(
proxy_config::prefs::kProxy,
std::make_unique<base::Value>(ProxyConfigDictionary::CreateSystem()));
registry->RegisterDictionaryPref(proxy_config::prefs::kProxy,
ProxyConfigDictionary::CreateSystem());
registry->RegisterBooleanPref(proxy_config::prefs::kUseSharedProxies, false);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment