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..aa84677163de404e1396c3e359e5f93507d447bb 100644 |
--- a/base/json/json_value_serializer.h |
+++ b/base/json/json_value_serializer.h |
@@ -36,10 +36,16 @@ class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer { |
virtual ~JSONStringValueSerializer(); |
+ // Equivalent to calling Serialize(root, false). |
willchan no longer on Chromium
2011/11/10 23:46:29
Comments are off.
Eric Dingle
2011/11/14 19:03:56
Done.
|
+ virtual bool Serialize(const Value& root) OVERRIDE; |
+ |
// 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. |omit_binary_values| is |
+ // used to indicate how the serializer should behave when encountering a |
+ // binary value. |
+ bool SerializeWithOptionalBinaryValues(const Value& root, |
willchan no longer on Chromium
2011/11/10 23:46:29
There's no reason to use this except when we want
Eric Dingle
2011/11/14 19:03:56
Done.
|
+ bool omit_binary_values); |
// Attempt to deserialize the data structure encoded in the string passed |
// in to the constructor into a structure of Value objects. If the return |
@@ -48,7 +54,8 @@ class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer { |
// If |error_message| is non-null, it will be filled in with a formatted |
// error message including the location of the error if appropriate. |
// The caller takes ownership of the returned value. |
- virtual Value* Deserialize(int* error_code, std::string* error_message); |
+ virtual Value* Deserialize(int* error_code, std::string* error_message) |
+ OVERRIDE; |
void set_pretty_print(bool new_value) { pretty_print_ = new_value; } |
bool pretty_print() { return pretty_print_; } |
@@ -78,6 +85,9 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { |
virtual ~JSONFileValueSerializer() {} |
+ // Equivalent to calling Serialize(root, false). |
willchan no longer on Chromium
2011/11/10 23:46:29
Comments are off.
Eric Dingle
2011/11/14 19:03:56
Done.
|
+ virtual bool Serialize(const Value& root) 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 |
// thread. Instead, serialize to a string and write to the file you want on |
@@ -86,7 +96,8 @@ 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); |
+ bool SerializeWithOptionalBinaryValues(const Value& root, |
+ bool omit_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 |
@@ -95,7 +106,8 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { |
// If |error_message| is non-null, it will be filled in with a formatted |
// error message including the location of the error if appropriate. |
// The caller takes ownership of the returned value. |
- virtual Value* Deserialize(int* error_code, std::string* error_message); |
+ virtual Value* Deserialize(int* error_code, std::string* error_message) |
+ OVERRIDE; |
// This enum is designed to safely overlap with JSONReader::JsonParseError. |
enum JsonFileError { |