Remove uses of deprecated override of PrefValueMap::SetValue
Convert client of the deprecated of PrefValueMap::SetValue taking a std::unique_ptr<base::Value> to the recommended override taking a base::Value directly. The conversion is done using the following rules: - If the value is built inline using std::make_unique<base::Value> then change to just construct a base::Value directly, - If the value is built use base::Value::CreateDeepCopy(), then change to use base::Clone() which returns a base::Value instead of a std::unique_ptr<base::Value>, - If the std::unique_ptr<base::Value> is just forwarded by the caller, dcheck it is not null (the check was present in the old method implementation) and use base::Value::FromUniquePtrValue to convert the std::unique_ptr<base::Value> to a base::Value. This CL fixes uses in src/components/policy. This CL was uploaded by git cl split. Bug: 646113 Change-Id: Ief82c150539f913edd8f44f36caf566baaf39819 Reviewed-on: https://chromium-review.googlesource.com/c/1446360Reviewed-by:Maksim Ivanov <emaxx@chromium.org> Commit-Queue: Maksim Ivanov <emaxx@chromium.org> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#628485}
Showing
Please register or sign in to comment