Simplify capturing of base::JSONReader::Read() return value.

base::JSONReader::Read() returns a std::unique_ptr<Value>, which can
simply be captured into a std::unique_ptr<Value> variable instead of
calling .release() on the returned unique_ptr and constructing a
unique_ptr from the released raw pointer.

TEST=Run unit tests.

Change-Id: I6be2fb14676be31ae578afceda2410a4b5f6af5e
Commit-Ready: Ben Chan <>
Tested-by: Ben Chan <>
Reviewed-by: Dan Erat <>
diff --git a/chromeos-dbus-bindings/ b/chromeos-dbus-bindings/
index b22c141..361a38e 100644
--- a/chromeos-dbus-bindings/
+++ b/chromeos-dbus-bindings/
@@ -79,7 +79,7 @@
   if (!base::ReadFileToString(path, &contents))
     return false;
-  std::unique_ptr<base::Value> json{base::JSONReader::Read(contents).release()};
+  std::unique_ptr<base::Value> json = base::JSONReader::Read(contents);
   if (!json)
     return false;