| Index: base/value_conversions.cc
|
| diff --git a/base/value_conversions.cc b/base/value_conversions.cc
|
| index 9320feecc67293d7ef31ac0ca312d891dc0d3f0b..7f220004e14b27d9165564f2719c37f432fe5b07 100644
|
| --- a/base/value_conversions.cc
|
| +++ b/base/value_conversions.cc
|
| @@ -9,6 +9,7 @@
|
| #include <string>
|
|
|
| #include "base/files/file_path.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/time/time.h"
|
| #include "base/values.h"
|
| @@ -17,8 +18,8 @@ namespace base {
|
|
|
| // |Value| internally stores strings in UTF-8, so we have to convert from the
|
| // system native code to UTF-8 and back.
|
| -Value* CreateFilePathValue(const FilePath& in_value) {
|
| - return new Value(in_value.AsUTF8Unsafe());
|
| +std::unique_ptr<Value> CreateFilePathValue(const FilePath& in_value) {
|
| + return base::MakeUnique<Value>(in_value.AsUTF8Unsafe());
|
| }
|
|
|
| bool GetValueAsFilePath(const Value& value, FilePath* file_path) {
|
| @@ -32,9 +33,9 @@ bool GetValueAsFilePath(const Value& value, FilePath* file_path) {
|
|
|
| // |Value| does not support 64-bit integers, and doubles do not have enough
|
| // precision, so we store the 64-bit time value as a string instead.
|
| -Value* CreateTimeDeltaValue(const TimeDelta& time) {
|
| +std::unique_ptr<Value> CreateTimeDeltaValue(const TimeDelta& time) {
|
| std::string string_value = base::Int64ToString(time.ToInternalValue());
|
| - return new Value(string_value);
|
| + return base::MakeUnique<Value>(string_value);
|
| }
|
|
|
| bool GetValueAsTimeDelta(const Value& value, TimeDelta* time) {
|
|
|