| Index: chrome/common/json_schema_validator.cc
|
| ===================================================================
|
| --- chrome/common/json_schema_validator.cc (revision 106774)
|
| +++ chrome/common/json_schema_validator.cc (working copy)
|
| @@ -93,7 +93,7 @@
|
| case Value::TYPE_LIST:
|
| return "array";
|
| default:
|
| - CHECK(false) << "Unexpected value type: " << value->GetType();
|
| + NOTREACHED() << "Unexpected value type: " << value->GetType();
|
| return "";
|
| }
|
| }
|
| @@ -133,7 +133,7 @@
|
| std::string id;
|
| CHECK(type->GetString("id", &id));
|
|
|
| - CHECK(types_.find(id) == types_.end());
|
| + DCHECK(types_.find(id) == types_.end());
|
| types_[id] = type;
|
| }
|
| }
|
| @@ -156,7 +156,7 @@
|
| if (iter == types_.end())
|
| types_[id] = schema;
|
| else
|
| - CHECK(iter->second == schema);
|
| + DCHECK(iter->second == schema);
|
| }
|
|
|
| // If the schema has a $ref property, the instance must validate against
|
| @@ -191,7 +191,7 @@
|
|
|
| std::string type;
|
| schema->GetString("type", &type);
|
| - CHECK(!type.empty());
|
| + DCHECK(!type.empty());
|
| if (type != "any") {
|
| if (!ValidateType(instance, type, path))
|
| return;
|
| @@ -206,7 +206,7 @@
|
| else if (type == "number" || type == "integer")
|
| ValidateNumber(instance, schema, path);
|
| else if (type != "boolean" && type != "null")
|
| - CHECK(false) << "Unexpected type: " << type;
|
| + NOTREACHED() << "Unexpected type: " << type;
|
| }
|
| }
|
|
|
| @@ -257,7 +257,7 @@
|
| break;
|
|
|
| default:
|
| - CHECK(false) << "Unexpected type in enum: " << choice->GetType();
|
| + NOTREACHED() << "Unexpected type in enum: " << choice->GetType();
|
| }
|
| }
|
|
|
| @@ -320,7 +320,7 @@
|
| if (schema->GetDictionary("items", &single_type)) {
|
| int min_items = 0;
|
| if (schema->GetInteger("minItems", &min_items)) {
|
| - CHECK(min_items >= 0);
|
| + DCHECK(min_items >= 0);
|
| if (instance_size < static_cast<size_t>(min_items)) {
|
| errors_.push_back(Error(path, FormatErrorMessage(
|
| kArrayMinItems, base::IntToString(min_items))));
|
| @@ -329,7 +329,7 @@
|
|
|
| int max_items = 0;
|
| if (schema->GetInteger("maxItems", &max_items)) {
|
| - CHECK(max_items >= 0);
|
| + DCHECK(max_items >= 0);
|
| if (instance_size > static_cast<size_t>(max_items)) {
|
| errors_.push_back(Error(path, FormatErrorMessage(
|
| kArrayMaxItems, base::IntToString(max_items))));
|
|
|