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

Unified Diff: base/values.cc

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index f448f51d2bd3821005d85e976418882c1230466c..7b63413bc583694203b3679bf163738143ca10dd 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -85,8 +85,8 @@ Value::~Value() {
}
// static
-Value* Value::CreateNullValue() {
- return new Value(TYPE_NULL);
+scoped_ptr<Value> Value::CreateNullValue() {
+ return make_scoped_ptr(new Value(TYPE_NULL));
}
bool Value::GetAsBinary(const BinaryValue** out_value) const {
@@ -137,7 +137,7 @@ Value* Value::DeepCopy() const {
// This method should only be getting called for null Values--all subclasses
// need to provide their own implementation;.
DCHECK(IsType(TYPE_NULL));
- return CreateNullValue();
+ return CreateNullValue().release();
}
scoped_ptr<Value> Value::CreateDeepCopy() const {

Powered by Google App Engine
This is Rietveld 408576698