diff options
Diffstat (limited to 'base/json/json_file_value_serializer.h')
-rw-r--r-- | base/json/json_file_value_serializer.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/base/json/json_file_value_serializer.h b/base/json/json_file_value_serializer.h index 67d2342b4c..a93950a608 100644 --- a/base/json/json_file_value_serializer.h +++ b/base/json/json_file_value_serializer.h @@ -48,8 +48,9 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { class BASE_EXPORT JSONFileValueDeserializer : public base::ValueDeserializer { public: // |json_file_path_| is the path of a file that will be source of the - // deserialization. - explicit JSONFileValueDeserializer(const base::FilePath& json_file_path); + // deserialization. |options| is a bitmask of JSONParserOptions. + explicit JSONFileValueDeserializer(const base::FilePath& json_file_path, + int options = 0); ~JSONFileValueDeserializer() override; @@ -82,10 +83,6 @@ class BASE_EXPORT JSONFileValueDeserializer : public base::ValueDeserializer { // be a JsonFileError. static const char* GetErrorMessageForCode(int error_code); - void set_allow_trailing_comma(bool new_value) { - allow_trailing_comma_ = new_value; - } - // Returns the size (in bytes) of JSON string read from disk in the last // successful |Deserialize()| call. size_t get_last_read_size() const { return last_read_size_; } @@ -96,7 +93,7 @@ class BASE_EXPORT JSONFileValueDeserializer : public base::ValueDeserializer { int ReadFileToString(std::string* json_string); const base::FilePath json_file_path_; - bool allow_trailing_comma_; + const int options_; size_t last_read_size_; DISALLOW_IMPLICIT_CONSTRUCTORS(JSONFileValueDeserializer); |