Convert content suggestion helper function away from old API

Convert ParseJson to use base::JSONReader::ReadToValue that
return a base::Optional<base::Value> instead of the deprecated
function.

Use base::Value::ToUniquePtrValue to easily find the conversion
to std::unique_ptr<base::Value> when ntp_snippets::SuccessCallback
has been converted to take the base::Value by reference.

Bug: 646113, 925165
Change-Id: I0ffb11fb042e7ef176f864c08d0af182f4d38f58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594531
Reviewed-by: Eric Noyau <noyau@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#656752}
1 file changed