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

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

Issue 390233003: Decrement CreateDoubleValue count (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 8e03fbc4f722f136739d4a4220f0746103c42914..d2478f760a64f602b3fccd7641f0e0e50042afc3 100644
--- a/components/policy/core/common/registry_dict_win.cc
+++ b/components/policy/core/common/registry_dict_win.cc
@@ -89,11 +89,11 @@ scoped_ptr<base::Value> ConvertValue(const base::Value& value,
double double_value = 0;
if (value.GetAsInteger(&int_value)) {
return scoped_ptr<base::Value>(
- base::Value::CreateDoubleValue(int_value));
+ new base::FundamentalValue(int_value));
battre 2014/07/16 07:37:12 Do you want to cast to double here? Otherwise you
bartfab (slow) 2014/07/16 09:07:55 Yes, you definitely want to cast. Otherwise, the p
battre 2014/07/16 09:53:20 Maybe that is an indication that going for an over
Evan Stade 2014/07/16 22:15:25 Equally, I think it's an indication that this code
} else if (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;
}

Powered by Google App Engine
This is Rietveld 408576698