Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: base/values.cc

Issue 2014103002: Remove deprecated ListValue::Append(Value*) overload on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ADL fail Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/values.h ('k') | chrome/browser/bookmarks/managed_bookmark_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index 4d9db78ebba8e6a83e8714e97f8e34a99d46f3c3..5103f3e7d3a11061043090683ac6ea370cc72777 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -320,7 +320,7 @@ std::unique_ptr<BinaryValue> BinaryValue::CreateWithCopiedBuffer(
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 @@ void ListValue::Append(std::unique_ptr<Value> in_value) {
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) {
« no previous file with comments | « base/values.h ('k') | chrome/browser/bookmarks/managed_bookmark_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698