| Index: tools/json_schema_compiler/util.cc
|
| diff --git a/tools/json_schema_compiler/util.cc b/tools/json_schema_compiler/util.cc
|
| index 2806cfcf0f923c268dc1d9dd284fbe67f136342f..5897a62cb6a5ab42d770031eb1b9ea4d22a3d698 100644
|
| --- a/tools/json_schema_compiler/util.cc
|
| +++ b/tools/json_schema_compiler/util.cc
|
| @@ -9,24 +9,48 @@
|
| namespace json_schema_compiler {
|
| namespace util {
|
|
|
| -bool GetItemFromList(const base::ListValue& from, int index, int* out) {
|
| +bool GetItemFromList(const base::ListValue& from,
|
| + int index,
|
| + ITEMS_ARE_NOT_BINARY /* binary_tag */,
|
| + int* out) {
|
| return from.GetInteger(index, out);
|
| }
|
|
|
| -bool GetItemFromList(const base::ListValue& from, int index, bool* out) {
|
| +bool GetItemFromList(const base::ListValue& from,
|
| + int index,
|
| + ITEMS_ARE_NOT_BINARY /* binary_tag */,
|
| + bool* out) {
|
| return from.GetBoolean(index, out);
|
| }
|
|
|
| -bool GetItemFromList(const base::ListValue& from, int index, double* out) {
|
| +bool GetItemFromList(const base::ListValue& from,
|
| + int index,
|
| + ITEMS_ARE_NOT_BINARY /* binary_tag */,
|
| + double* out) {
|
| return from.GetDouble(index, out);
|
| }
|
|
|
| -bool GetItemFromList(const base::ListValue& from, int index, std::string* out) {
|
| +bool GetItemFromList(const base::ListValue& from,
|
| + int index,
|
| + ITEMS_ARE_NOT_BINARY /* binary_tag */,
|
| + std::string* out) {
|
| return from.GetString(index, out);
|
| }
|
|
|
| bool GetItemFromList(const base::ListValue& from,
|
| int index,
|
| + ITEMS_ARE_BINARY /* binary_tag */,
|
| + std::string* out) {
|
| + const base::BinaryValue* value = NULL;
|
| + if (!from.GetBinary(index, &value))
|
| + return false;
|
| + out->assign(value->GetBuffer(), value->GetSize());
|
| + return true;
|
| +}
|
| +
|
| +bool GetItemFromList(const base::ListValue& from,
|
| + int index,
|
| + ITEMS_ARE_NOT_BINARY /* binary_tag */,
|
| linked_ptr<base::Value>* out) {
|
| const base::Value* value = NULL;
|
| if (!from.Get(index, &value))
|
| @@ -35,8 +59,10 @@ bool GetItemFromList(const base::ListValue& from,
|
| return true;
|
| }
|
|
|
| -bool GetItemFromList(const base::ListValue& from, int index,
|
| - linked_ptr<base::DictionaryValue>* out) {
|
| +bool GetItemFromList(const base::ListValue& from,
|
| + int index,
|
| + ITEMS_ARE_NOT_BINARY /* binary_tag */,
|
| + linked_ptr<base::DictionaryValue>* out) {
|
| const base::DictionaryValue* dict = NULL;
|
| if (!from.GetDictionary(index, &dict))
|
| return false;
|
|
|