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

Unified Diff: base/values.cc

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 years, 8 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') | base/values_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 6ba7e8558e10f7da7bf56dd5fe19c9a609ac47e8..d492a474631c841442d72851ebff94ff3d163241 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -76,11 +76,6 @@ std::unique_ptr<Value> CopyWithoutEmptyChildren(const Value& node) {
} // namespace
// static
-std::unique_ptr<Value> Value::CreateNullValue() {
- return WrapUnique(new Value(Type::NONE));
-}
-
-// static
std::unique_ptr<BinaryValue> BinaryValue::CreateWithCopiedBuffer(
const char* buffer,
size_t size) {
@@ -1091,7 +1086,7 @@ bool ListValue::Set(size_t index, std::unique_ptr<Value> in_value) {
if (index >= list_->size()) {
// Pad out any intermediate indexes with null settings
while (index > list_->size())
- Append(CreateNullValue());
+ Append(MakeUnique<Value>());
Append(std::move(in_value));
} else {
// TODO(dcheng): remove this DCHECK once the raw pointer version is removed?
« no previous file with comments | « base/values.h ('k') | base/values_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698