[Code Health] Remove uses of Value::CreateDeepCopy()
This CL was uploaded by git cl split. R=dvallet@chromium.org Bug: 1187013 Change-Id: I4e3bcb270873140e500aac7103365733e20b3b4a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2873616 Auto-Submit: Austin Sullivan <asully@chromium.org> Reviewed-by: David Vallet <dvallet@chromium.org> Commit-Queue: David Vallet <dvallet@chromium.org> Cr-Commit-Position: refs/heads/master@{#879719}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
b3cbcdeb19
commit
f2c4484440
@ -7,6 +7,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/values.h"
|
||||
#include "headless/lib/browser/protocol/base_string_adapter.h"
|
||||
#include "headless/public/util/error_reporter.h"
|
||||
|
||||
@ -49,7 +50,7 @@ inline std::unique_ptr<base::Value> ToValue(const std::string& value) {
|
||||
|
||||
template <>
|
||||
inline std::unique_ptr<base::Value> ToValue(const base::Value& value) {
|
||||
return value.CreateDeepCopy();
|
||||
return base::Value::ToUniquePtrValue(value.Clone());
|
||||
}
|
||||
|
||||
template <>
|
||||
@ -140,7 +141,7 @@ template <>
|
||||
struct FromValue<base::Value> {
|
||||
static std::unique_ptr<base::Value> Parse(const base::Value& value,
|
||||
ErrorReporter* errors) {
|
||||
return value.CreateDeepCopy();
|
||||
return base::Value::ToUniquePtrValue(value.Clone());
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user