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

Side by Side Diff: third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.h

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component 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 unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // Parses from the ARRAY_VALUE state. 172 // Parses from the ARRAY_VALUE state.
173 util::Status ParseArrayValue(TokenType type); 173 util::Status ParseArrayValue(TokenType type);
174 174
175 // Parses from the ARRAY_MID state. 175 // Parses from the ARRAY_MID state.
176 util::Status ParseArrayMid(TokenType type); 176 util::Status ParseArrayMid(TokenType type);
177 177
178 // Expects p_ to point to an unquoted literal 178 // Expects p_ to point to an unquoted literal
179 util::Status ParseTrue(); 179 util::Status ParseTrue();
180 util::Status ParseFalse(); 180 util::Status ParseFalse();
181 util::Status ParseNull(); 181 util::Status ParseNull();
182 util::Status ParseEmptyNull();
183
184 // Whether an empty-null is allowed in the current state.
185 bool IsEmptyNullAllowed(TokenType type);
182 186
183 // Report a failure as a util::Status. 187 // Report a failure as a util::Status.
184 util::Status ReportFailure(StringPiece message); 188 util::Status ReportFailure(StringPiece message);
185 189
186 // Report a failure due to an UNKNOWN token type. We check if we hit the 190 // Report a failure due to an UNKNOWN token type. We check if we hit the
187 // end of the stream and if we're finishing or not to detect what type of 191 // end of the stream and if we're finishing or not to detect what type of
188 // status to return in this case. 192 // status to return in this case.
189 util::Status ReportUnknown(StringPiece message); 193 util::Status ReportUnknown(StringPiece message);
190 194
191 // Advance p_ past all whitespace or until the end of the string. 195 // Advance p_ past all whitespace or until the end of the string.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // The character that opened the string, either ' or ". 244 // The character that opened the string, either ' or ".
241 // A value of 0 indicates that string parsing is not in process. 245 // A value of 0 indicates that string parsing is not in process.
242 char string_open_; 246 char string_open_;
243 247
244 // Storage for the chunk that are being parsed in ParseChunk(). 248 // Storage for the chunk that are being parsed in ParseChunk().
245 string chunk_storage_; 249 string chunk_storage_;
246 250
247 // Whether to allow non UTF-8 encoded input and replace invalid code points. 251 // Whether to allow non UTF-8 encoded input and replace invalid code points.
248 bool coerce_to_utf8_; 252 bool coerce_to_utf8_;
249 253
254 // Whether allows empty string represented null array value or object entry
255 // value.
256 bool allow_empty_null_;
257
258 // Whether allows out-of-range floating point numbers or reject them.
259 bool loose_float_number_conversion_;
260
250 GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(JsonStreamParser); 261 GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(JsonStreamParser);
251 }; 262 };
252 263
253 } // namespace converter 264 } // namespace converter
254 } // namespace util 265 } // namespace util
255 } // namespace protobuf 266 } // namespace protobuf
256 267
257 } // namespace google 268 } // namespace google
258 #endif // GOOGLE_PROTOBUF_UTIL_CONVERTER_JSON_STREAM_PARSER_H__ 269 #endif // GOOGLE_PROTOBUF_UTIL_CONVERTER_JSON_STREAM_PARSER_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698