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

Unified Diff: tools/json_schema_compiler/util.cc

Issue 2839753005: Remove base::Value::GetAsBinary (Closed)
Patch Set: ASSERT_TRUE Created 3 years, 8 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 | « mojo/common/values_struct_traits.h ('k') | no next file » | 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 d1eb2e7414cc1c5941f57a211547f554caf357d0..441fc2530772cbd75a1a93536b8084df5ef7f6b1 100644
--- a/tools/json_schema_compiler/util.cc
+++ b/tools/json_schema_compiler/util.cc
@@ -69,20 +69,18 @@ bool PopulateItem(const base::Value& from,
}
bool PopulateItem(const base::Value& from, std::vector<char>* out) {
- const base::Value* binary = nullptr;
- if (!from.GetAsBinary(&binary))
+ if (!from.is_blob())
return false;
- *out = binary->GetBlob();
+ *out = from.GetBlob();
return true;
}
bool PopulateItem(const base::Value& from,
std::vector<char>* out,
base::string16* error) {
- const base::Value* binary = nullptr;
- if (!from.GetAsBinary(&binary))
+ if (!from.is_blob())
return ReportError(from, base::Value::Type::BINARY, error);
- *out = binary->GetBlob();
+ *out = from.GetBlob();
return true;
}
« no previous file with comments | « mojo/common/values_struct_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698