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

Unified Diff: chrome/common/json_schema_validator.h

Issue 10696034: Share JSON schema constants. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: ,. Created 8 years, 3 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: chrome/common/json_schema_validator.h
diff --git a/chrome/common/json_schema_validator.h b/chrome/common/json_schema_validator.h
index 1f3717e7e4a21516252b377a44ac11d7960c07af..20ecfbd5305d3b90b940378e79366df2e6e3311f 100644
--- a/chrome/common/json_schema_validator.h
+++ b/chrome/common/json_schema_validator.h
@@ -10,13 +10,7 @@
#include <vector>
#include "base/basictypes.h"
-
-namespace base {
-class DictionaryValue;
-class ListValue;
-class StringValue;
-class Value;
-}
+#include "base/values.h"
//==============================================================================
// This class implements a subset of JSON Schema.
@@ -88,6 +82,11 @@ class JSONSchemaValidator {
// Classifies a Value as one of the JSON schema primitive types.
static std::string GetJSONSchemaType(base::Value* value);
+ // If |schema_type| is a valid JSON schema type then |value_type| is assigned
+ // the corresponding Value type and returns true. Otherwise returns false.
+ static bool GetValueType(const std::string& schema_type,
+ base::Value::Type* value_type);
+
// Utility methods to format error messages. The first method can have one
// wildcard represented by '*', which is replaced with s1. The second method
// can have two, which are replaced by s1 and s2.

Powered by Google App Engine
This is Rietveld 408576698