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

Unified Diff: components/policy/core/common/registry_dict_win.cc

Issue 655143002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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: components/policy/core/common/registry_dict_win.cc
diff --git a/components/policy/core/common/registry_dict_win.cc b/components/policy/core/common/registry_dict_win.cc
index 61657b8575f6d631bc40b0ff227114e20e582d30..3da5622b02d6690c43188b688231bbe7d236af49 100644
--- a/components/policy/core/common/registry_dict_win.cc
+++ b/components/policy/core/common/registry_dict_win.cc
@@ -43,7 +43,7 @@ scoped_ptr<base::Value> ConvertValue(const base::Value& value,
if (converted)
result->SetWithoutPathExpansion(entry.key(), converted.release());
}
- return result.PassAs<base::Value>();
+ return result.Pass();
} else if (value.GetAsList(&list)) {
scoped_ptr<base::ListValue> result(new base::ListValue());
for (base::ListValue::const_iterator entry(list->begin());
@@ -129,7 +129,7 @@ scoped_ptr<base::Value> ConvertValue(const base::Value& value,
LOG(WARNING) << "Failed to convert " << value.GetType()
<< " to " << schema.type();
- return scoped_ptr<base::Value>();
+ return nullptr;
}
} // namespace
@@ -315,7 +315,7 @@ scoped_ptr<base::Value> RegistryDict::ConvertToJSON(
if (converted)
result->SetWithoutPathExpansion(entry->first, converted.release());
}
- return result.PassAs<base::Value>();
+ return result.Pass();
}
case base::Value::TYPE_LIST: {
scoped_ptr<base::ListValue> result(new base::ListValue());
@@ -338,13 +338,13 @@ scoped_ptr<base::Value> RegistryDict::ConvertToJSON(
}
break;
}
- return result.PassAs<base::Value>();
+ return result.Pass();
}
default:
LOG(WARNING) << "Can't convert registry key to schema type " << type;
}
- return scoped_ptr<base::Value>();
+ return nullptr;
}
} // namespace policy
« no previous file with comments | « components/policy/core/common/mac_util.cc ('k') | components/proximity_auth/bluetooth_connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698