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

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

Issue 369303004: Pass() type followups after https://codereview.chromium.org/367403002/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bleh Created 6 years, 5 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 | « no previous file | components/policy/core/common/registry_dict_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cd6887c20b6ae2cffa1896d27dc896ed321fc4b1..2da49002b84867fa26de75f674f67a61baf9df18 100644
--- a/components/policy/core/common/registry_dict_win.cc
+++ b/components/policy/core/common/registry_dict_win.cc
@@ -70,8 +70,8 @@ scoped_ptr<base::Value> ConvertValue(const base::Value& value,
if (value.GetAsInteger(&int_value) ||
(value.GetAsString(&string_value) &&
base::StringToInt(string_value, &int_value))) {
- return make_scoped_ptr(base::Value::CreateBooleanValue(int_value != 0))
- .PassAs<base::Value>();
+ return scoped_ptr<base::Value>(
+ base::Value::CreateBooleanValue(int_value != 0));
}
break;
}
@@ -79,8 +79,8 @@ scoped_ptr<base::Value> ConvertValue(const base::Value& value,
// Integers may be string-encoded.
if (value.GetAsString(&string_value) &&
base::StringToInt(string_value, &int_value)) {
- return make_scoped_ptr(base::Value::CreateIntegerValue(int_value))
- .PassAs<base::Value>();
+ return scoped_ptr<base::Value>(
+ base::Value::CreateIntegerValue(int_value));
}
break;
}
@@ -88,12 +88,12 @@ scoped_ptr<base::Value> ConvertValue(const base::Value& value,
// Doubles may be string-encoded or integer-encoded.
double double_value = 0;
if (value.GetAsInteger(&int_value)) {
- return make_scoped_ptr(base::Value::CreateDoubleValue(int_value))
- .PassAs<base::Value>();
+ return scoped_ptr<base::Value>(
+ base::Value::CreateDoubleValue(int_value));
} else if (value.GetAsString(&string_value) &&
base::StringToDouble(string_value, &double_value)) {
- return make_scoped_ptr(base::Value::CreateDoubleValue(double_value))
- .PassAs<base::Value>();
+ return scoped_ptr<base::Value>(
+ base::Value::CreateDoubleValue(double_value));
}
break;
}
@@ -252,8 +252,8 @@ void RegistryDict::ReadRegistry(HKEY hive, const base::string16& root) {
case REG_SZ:
case REG_EXPAND_SZ:
SetValue(name,
- make_scoped_ptr(new base::StringValue(
- base::UTF16ToUTF8(it.Value()))).Pass());
+ scoped_ptr<base::Value>(
+ new base::StringValue(base::UTF16ToUTF8(it.Value()))));
continue;
case REG_DWORD_LITTLE_ENDIAN:
case REG_DWORD_BIG_ENDIAN:
@@ -264,8 +264,8 @@ void RegistryDict::ReadRegistry(HKEY hive, const base::string16& root) {
else
dword_value = base::ByteSwapToLE32(dword_value);
SetValue(name,
- make_scoped_ptr(base::Value::CreateIntegerValue(dword_value))
- .PassAs<base::Value>());
+ scoped_ptr<base::Value>(
+ base::Value::CreateIntegerValue(dword_value)));
continue;
}
case REG_NONE:
« no previous file with comments | « no previous file | components/policy/core/common/registry_dict_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698