| Index: base/json/json_file_value_serializer.h
|
| diff --git a/base/json/json_file_value_serializer.h b/base/json/json_file_value_serializer.h
|
| index f0f556c2dc68a23457ad2aa8ec3db7a8a209947d..6cfcbe83c2f8295fcd5f277bf637b6afda809e2a 100644
|
| --- a/base/json/json_file_value_serializer.h
|
| +++ b/base/json/json_file_value_serializer.h
|
| @@ -14,15 +14,13 @@
|
|
|
| class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
|
| public:
|
| - // json_file_patch is the path of a file that will be source of the
|
| + // |json_file_path_| is the path of a file that will be source of the
|
| // deserialization or the destination of the serialization.
|
| // When deserializing, the file should exist, but when serializing, the
|
| // serializer will attempt to create the file at the specified location.
|
| - explicit JSONFileValueSerializer(const base::FilePath& json_file_path)
|
| - : json_file_path_(json_file_path),
|
| - allow_trailing_comma_(false) {}
|
| + explicit JSONFileValueSerializer(const base::FilePath& json_file_path);
|
|
|
| - ~JSONFileValueSerializer() override {}
|
| + ~JSONFileValueSerializer() override;
|
|
|
| // DO NOT USE except in unit tests to verify the file was written properly.
|
| // We should never serialize directly to a file since this will block the
|
| @@ -71,11 +69,16 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
|
| allow_trailing_comma_ = new_value;
|
| }
|
|
|
| + // Returns the syze (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_; }
|
| +
|
| private:
|
| bool SerializeInternal(const base::Value& root, bool omit_binary_values);
|
|
|
| - base::FilePath json_file_path_;
|
| + const base::FilePath json_file_path_;
|
| bool allow_trailing_comma_;
|
| + size_t last_read_size_;
|
|
|
| // A wrapper for ReadFileToString which returns a non-zero JsonFileError if
|
| // there were file errors.
|
|
|