Chromium Code Reviews

Unified Diff: base/values.h

Issue 16270: Change the signature of JSONReader::Read() and related methods to be more (Closed)
Patch Set: fixens Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: base/values.h
diff --git a/base/values.h b/base/values.h
index 2f28f11eaf8d63cd2a6ae606860ce99ab0296f3b..ebd2117cb8163d54ab6e4f930870258cc4f2fcd2 100644
--- a/base/values.h
+++ b/base/values.h
@@ -358,13 +358,10 @@ class ValueSerializer {
virtual bool Serialize(const Value& root) = 0;
// This method deserializes the subclass-specific format into a Value object.
- // The method should return true if and only if the root parameter is set
- // to a complete Value representation of the serialized form. If the
- // return value is true, the caller takes ownership of the objects pointed
- // to by root. If the return value is false, root should be unchanged and if
- // error_message is non-null, it should be filled with a message describing
- // the error.
- virtual bool Deserialize(Value** root, std::string* error_message) = 0;
+ // If the return value is non-NULL, the caller takes ownership of returned
+ // Value. If the return value is NULL, and if error_message is non-NULL,
+ // error_message should be filled with a message describing the error.
+ virtual Value* Deserialize(std::string* error_message) = 0;
};
#endif // BASE_VALUES_H_

Powered by Google App Engine