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

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

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 3 years, 12 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 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);
186 182
187 // Report a failure as a util::Status. 183 // Report a failure as a util::Status.
188 util::Status ReportFailure(StringPiece message); 184 util::Status ReportFailure(StringPiece message);
189 185
190 // Report a failure due to an UNKNOWN token type. We check if we hit the 186 // Report a failure due to an UNKNOWN token type. We check if we hit the
191 // end of the stream and if we're finishing or not to detect what type of 187 // end of the stream and if we're finishing or not to detect what type of
192 // status to return in this case. 188 // status to return in this case.
193 util::Status ReportUnknown(StringPiece message); 189 util::Status ReportUnknown(StringPiece message);
194 190
195 // Advance p_ past all whitespace or until the end of the string. 191 // Advance p_ past all whitespace or until the end of the string.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // The character that opened the string, either ' or ". 240 // The character that opened the string, either ' or ".
245 // A value of 0 indicates that string parsing is not in process. 241 // A value of 0 indicates that string parsing is not in process.
246 char string_open_; 242 char string_open_;
247 243
248 // Storage for the chunk that are being parsed in ParseChunk(). 244 // Storage for the chunk that are being parsed in ParseChunk().
249 string chunk_storage_; 245 string chunk_storage_;
250 246
251 // Whether to allow non UTF-8 encoded input and replace invalid code points. 247 // Whether to allow non UTF-8 encoded input and replace invalid code points.
252 bool coerce_to_utf8_; 248 bool coerce_to_utf8_;
253 249
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
261 GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(JsonStreamParser); 250 GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(JsonStreamParser);
262 }; 251 };
263 252
264 } // namespace converter 253 } // namespace converter
265 } // namespace util 254 } // namespace util
266 } // namespace protobuf 255 } // namespace protobuf
267 256
268 } // namespace google 257 } // namespace google
269 #endif // GOOGLE_PROTOBUF_UTIL_CONVERTER_JSON_STREAM_PARSER_H__ 258 #endif // GOOGLE_PROTOBUF_UTIL_CONVERTER_JSON_STREAM_PARSER_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698