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 dc78ebcd1d942be05488f5f8474a5d55301c8af0..61657b8575f6d631bc40b0ff227114e20e582d30 100644 |
--- a/components/policy/core/common/registry_dict_win.cc |
+++ b/components/policy/core/common/registry_dict_win.cc |
@@ -86,13 +86,11 @@ scoped_ptr<base::Value> ConvertValue(const base::Value& value, |
case base::Value::TYPE_DOUBLE: { |
// Doubles may be string-encoded or integer-encoded. |
double double_value = 0; |
- if (value.GetAsInteger(&int_value)) { |
- return scoped_ptr<base::Value>( |
- base::Value::CreateDoubleValue(int_value)); |
- } else if (value.GetAsString(&string_value) && |
- base::StringToDouble(string_value, &double_value)) { |
+ if (value.GetAsDouble(&double_value) || |
+ (value.GetAsString(&string_value) && |
+ base::StringToDouble(string_value, &double_value))) { |
return scoped_ptr<base::Value>( |
- base::Value::CreateDoubleValue(double_value)); |
+ new base::FundamentalValue(double_value)); |
} |
break; |
} |