Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4901)

Unified Diff: chrome/common/json_value_serializer.cc

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. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/json_value_serializer.h ('k') | chrome/common/json_value_serializer_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/json_value_serializer.cc
diff --git a/chrome/common/json_value_serializer.cc b/chrome/common/json_value_serializer.cc
index 82938ecfd0fecbfcdd636230e78df8aadd43d8b2..54afe7a94a22f75c7220e6b8f7e8c18078fec4cd 100644
--- a/chrome/common/json_value_serializer.cc
+++ b/chrome/common/json_value_serializer.cc
@@ -21,13 +21,11 @@ bool JSONStringValueSerializer::Serialize(const Value& root) {
return true;
}
-bool JSONStringValueSerializer::Deserialize(Value** root,
- std::string* error_message) {
+Value* JSONStringValueSerializer::Deserialize(std::string* error_message) {
if (!json_string_)
return false;
eroman 2009/01/03 04:39:05 return NULL
- return JSONReader::ReadAndReturnError(*json_string_, root,
- allow_trailing_comma_,
+ return JSONReader::ReadAndReturnError(*json_string_, allow_trailing_comma_,
error_message);
}
@@ -50,13 +48,12 @@ bool JSONFileValueSerializer::Serialize(const Value& root) {
return true;
}
-bool JSONFileValueSerializer::Deserialize(Value** root,
- std::string* error_message) {
+Value* JSONFileValueSerializer::Deserialize(std::string* error_message) {
std::string json_string;
if (!file_util::ReadFileToString(json_file_path_, &json_string)) {
return false;
eroman 2009/01/03 04:39:05 return NULL
}
JSONStringValueSerializer serializer(json_string);
- return serializer.Deserialize(root, error_message);
+ return serializer.Deserialize(error_message);
}
« no previous file with comments | « chrome/common/json_value_serializer.h ('k') | chrome/common/json_value_serializer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698