| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_ | 5 #ifndef BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_ |
| 6 #define BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_ | 6 #define BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "base/base_export.h" | 12 #include "base/base_export.h" |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/macros.h" |
| 13 #include "base/values.h" | 15 #include "base/values.h" |
| 14 | 16 |
| 15 class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { | 17 class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { |
| 16 public: | 18 public: |
| 17 // |json_file_path_| is the path of a file that will be destination of the | 19 // |json_file_path_| is the path of a file that will be destination of the |
| 18 // serialization. The serializer will attempt to create the file at the | 20 // serialization. The serializer will attempt to create the file at the |
| 19 // specified location. | 21 // specified location. |
| 20 explicit JSONFileValueSerializer(const base::FilePath& json_file_path); | 22 explicit JSONFileValueSerializer(const base::FilePath& json_file_path); |
| 21 | 23 |
| 22 ~JSONFileValueSerializer() override; | 24 ~JSONFileValueSerializer() override; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 97 |
| 96 const base::FilePath json_file_path_; | 98 const base::FilePath json_file_path_; |
| 97 bool allow_trailing_comma_; | 99 bool allow_trailing_comma_; |
| 98 size_t last_read_size_; | 100 size_t last_read_size_; |
| 99 | 101 |
| 100 DISALLOW_IMPLICIT_CONSTRUCTORS(JSONFileValueDeserializer); | 102 DISALLOW_IMPLICIT_CONSTRUCTORS(JSONFileValueDeserializer); |
| 101 }; | 103 }; |
| 102 | 104 |
| 103 #endif // BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_ | 105 #endif // BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_ |
| 104 | 106 |
| OLD | NEW |