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/chrome/browser/spellchecker. This CL was uploaded by git cl split. Bug: 646113 Change-Id: I0cc2c207c8e1fdf11710c29aa0ca78fb982758a8 Reviewed-on: https://chromium-review.googlesource.com/c/1446356Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#627979}
Showing
Please register or sign in to comment