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

Unified Diff: tools/json_schema_compiler/util.cc

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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 | « tools/json_schema_compiler/test/idl_schemas_unittest.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/util.cc
diff --git a/tools/json_schema_compiler/util.cc b/tools/json_schema_compiler/util.cc
index a15c9f514f242c697c1f921d01d4a6018d8a7f55..9f4286a7526257230887c5530dd05a24f4fec467 100644
--- a/tools/json_schema_compiler/util.cc
+++ b/tools/json_schema_compiler/util.cc
@@ -32,7 +32,7 @@ bool PopulateItem(const base::Value& from, int* out) {
bool PopulateItem(const base::Value& from, int* out, base::string16* error) {
if (!from.GetAsInteger(out))
- return ReportError(from, base::Value::TYPE_INTEGER, error);
+ return ReportError(from, base::Value::Type::INTEGER, error);
return true;
}
@@ -42,7 +42,7 @@ bool PopulateItem(const base::Value& from, bool* out) {
bool PopulateItem(const base::Value& from, bool* out, base::string16* error) {
if (!from.GetAsBoolean(out))
- return ReportError(from, base::Value::TYPE_BOOLEAN, error);
+ return ReportError(from, base::Value::Type::BOOLEAN, error);
return true;
}
@@ -52,7 +52,7 @@ bool PopulateItem(const base::Value& from, double* out) {
bool PopulateItem(const base::Value& from, double* out, base::string16* error) {
if (!from.GetAsDouble(out))
- return ReportError(from, base::Value::TYPE_DOUBLE, error);
+ return ReportError(from, base::Value::Type::DOUBLE, error);
return true;
}
@@ -64,7 +64,7 @@ bool PopulateItem(const base::Value& from,
std::string* out,
base::string16* error) {
if (!from.GetAsString(out))
- return ReportError(from, base::Value::TYPE_STRING, error);
+ return ReportError(from, base::Value::Type::STRING, error);
return true;
}
@@ -81,7 +81,7 @@ bool PopulateItem(const base::Value& from,
base::string16* error) {
const base::BinaryValue* binary = nullptr;
if (!from.GetAsBinary(&binary))
- return ReportError(from, base::Value::TYPE_BINARY, error);
+ return ReportError(from, base::Value::Type::BINARY, error);
out->assign(binary->GetBuffer(), binary->GetBuffer() + binary->GetSize());
return true;
}
@@ -112,7 +112,7 @@ bool PopulateItem(const base::Value& from,
base::string16* error) {
const base::DictionaryValue* dict = nullptr;
if (!from.GetAsDictionary(&dict))
- return ReportError(from, base::Value::TYPE_DICTIONARY, error);
+ return ReportError(from, base::Value::Type::DICTIONARY, error);
*out = dict->CreateDeepCopy();
return true;
}
« no previous file with comments | « tools/json_schema_compiler/test/idl_schemas_unittest.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698