Chromium Code Reviews| Index: base/json/json_value_serializer.h |
| diff --git a/base/json/json_value_serializer.h b/base/json/json_value_serializer.h |
| index 650008ec235aab6d356098b7c8c5bde0c1f7b224..cbac9fd83016b063dabd3674541be0b65b6532da 100644 |
| --- a/base/json/json_value_serializer.h |
| +++ b/base/json/json_value_serializer.h |
| @@ -36,10 +36,15 @@ class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer { |
| virtual ~JSONStringValueSerializer(); |
| + // Equivalent to calling Serialize(root, false). |
| + virtual bool Serialize(const Value& root); |
| + |
| // Attempt to serialize the data structure represented by Value into |
| // JSON. If the return value is true, the result will have been written |
| - // into the string passed into the constructor. |
| - virtual bool Serialize(const Value& root); |
| + // into the string passed into the constructor. |ignore_binary_values| is |
| + // used to indicate how the serializer should behave when encountering a |
| + // binary value. |
| + virtual bool Serialize(const Value& root, bool ignore_binary_values); |
|
willchan no longer on Chromium
2011/11/10 18:33:07
No overloading, and why is this virtual, it's not
Eric Dingle
2011/11/10 23:19:57
Done.
|
| // Attempt to deserialize the data structure encoded in the string passed |
| // in to the constructor into a structure of Value objects. If the return |
| @@ -78,6 +83,9 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { |
| virtual ~JSONFileValueSerializer() {} |
| + // Equivalent to calling Serialize(root, false). |
| + virtual bool Serialize(const Value& root); |
| + |
| // 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 |
| // thread. Instead, serialize to a string and write to the file you want on |
| @@ -86,7 +94,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { |
| // Attempt to serialize the data structure represented by Value into |
| // JSON. If the return value is true, the result will have been written |
| // into the file whose name was passed into the constructor. |
| - virtual bool Serialize(const Value& root); |
| + virtual bool Serialize(const Value& root, bool ignore_binary_values); |
| // Attempt to deserialize the data structure encoded in the file passed |
| // in to the constructor into a structure of Value objects. If the return |