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

Unified Diff: chrome/common/json_schema_validator.cc

Issue 7661009: base: Add Is* functions to Value class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tony review Created 9 years, 4 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 | « chrome/common/json_pref_store.cc ('k') | chrome/common/json_schema_validator_unittest_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/json_schema_validator.cc
diff --git a/chrome/common/json_schema_validator.cc b/chrome/common/json_schema_validator.cc
index 0662fcf553482ba826549204269ab28932d30071..34278d33964528c8aa24b69a617574ad748d8824 100644
--- a/chrome/common/json_schema_validator.cc
+++ b/chrome/common/json_schema_validator.cc
@@ -249,8 +249,7 @@ void JSONSchemaValidator::ValidateEnum(Value* instance,
case Value::TYPE_INTEGER:
case Value::TYPE_DOUBLE:
- if (instance->IsType(Value::TYPE_INTEGER) ||
- instance->IsType(Value::TYPE_DOUBLE)) {
+ if (instance->IsInteger() || instance->IsDouble()) {
if (GetNumberValue(choice) == GetNumberValue(instance))
return;
}
« no previous file with comments | « chrome/common/json_pref_store.cc ('k') | chrome/common/json_schema_validator_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698