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

Unified Diff: components/safe_json/json_sanitizer.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
Index: components/safe_json/json_sanitizer.cc
diff --git a/components/safe_json/json_sanitizer.cc b/components/safe_json/json_sanitizer.cc
index 3ad634d1dfb2b8cc98744343b4fa57161a93aa33..c88dd883269517fbc1e485c3eace2324f73c438a 100644
--- a/components/safe_json/json_sanitizer.cc
+++ b/components/safe_json/json_sanitizer.cc
@@ -61,7 +61,8 @@ void OopJsonSanitizer::OnParseSuccess(std::unique_ptr<base::Value> value) {
// A valid JSON document may only have a dictionary or list as its top-level
// type, but the JSON parser also accepts other types, so we filter them out.
base::Value::Type type = value->GetType();
- if (type != base::Value::TYPE_DICTIONARY && type != base::Value::TYPE_LIST) {
+ if (type != base::Value::Type::DICTIONARY &&
+ type != base::Value::Type::LIST) {
error_callback_.Run("Invalid top-level type");
return;
}
« no previous file with comments | « components/safe_browsing_db/safe_browsing_api_handler_util.cc ('k') | components/safe_json/testing_json_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698