Remove deprecated ListValue::Append(Value*) overload on Linux.
Less comments, more type safety.
BUG=581865
R=danakj@chromium.org
TBR=sky@chromium.org
Review-Url: https://codereview.chromium.org/2014103002
Cr-Commit-Position: refs/heads/master@{#419360}
CrOS-Libchrome-Original-Commit: 71bb8453e8df8e6b5b596a3d4b038b42d03529d2
diff --git a/base/values.cc b/base/values.cc
index 4d9db78..5103f3e 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -320,7 +320,7 @@
size_t size) {
std::unique_ptr<char[]> buffer_copy(new char[size]);
memcpy(buffer_copy.get(), buffer, size);
- return base::MakeUnique<BinaryValue>(std::move(buffer_copy), size);
+ return MakeUnique<BinaryValue>(std::move(buffer_copy), size);
}
bool BinaryValue::GetAsBinary(const BinaryValue** out_value) const {
@@ -1042,29 +1042,31 @@
list_.push_back(std::move(in_value));
}
+#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
void ListValue::Append(Value* in_value) {
DCHECK(in_value);
Append(WrapUnique(in_value));
}
+#endif
void ListValue::AppendBoolean(bool in_value) {
- Append(new FundamentalValue(in_value));
+ Append(MakeUnique<FundamentalValue>(in_value));
}
void ListValue::AppendInteger(int in_value) {
- Append(new FundamentalValue(in_value));
+ Append(MakeUnique<FundamentalValue>(in_value));
}
void ListValue::AppendDouble(double in_value) {
- Append(new FundamentalValue(in_value));
+ Append(MakeUnique<FundamentalValue>(in_value));
}
void ListValue::AppendString(StringPiece in_value) {
- Append(new StringValue(in_value.as_string()));
+ Append(MakeUnique<StringValue>(in_value.as_string()));
}
void ListValue::AppendString(const string16& in_value) {
- Append(new StringValue(in_value));
+ Append(MakeUnique<StringValue>(in_value));
}
void ListValue::AppendStrings(const std::vector<std::string>& in_values) {