diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-05 18:37:51 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-05 18:37:51 +0000 |
commit | b930d13574dc5dd5a7f6a2ea706f58d9f00959cc (patch) | |
tree | 670156bb42dfcf3876182d07bb60e88418e73f08 /chrome/common | |
parent | 3f09649ae0477cf182033a8d3d507716372c31ad (diff) | |
download | chromium_src-b930d13574dc5dd5a7f6a2ea706f58d9f00959cc.zip chromium_src-b930d13574dc5dd5a7f6a2ea706f58d9f00959cc.tar.gz chromium_src-b930d13574dc5dd5a7f6a2ea706f58d9f00959cc.tar.bz2 |
Update some comments/nits following r7486.
Review URL: http://codereview.chromium.org/17047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7547 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/json_value_serializer.cc | 4 | ||||
-rw-r--r-- | chrome/common/json_value_serializer.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/chrome/common/json_value_serializer.cc b/chrome/common/json_value_serializer.cc index 54afe7a..367b346 100644 --- a/chrome/common/json_value_serializer.cc +++ b/chrome/common/json_value_serializer.cc @@ -23,7 +23,7 @@ bool JSONStringValueSerializer::Serialize(const Value& root) { Value* JSONStringValueSerializer::Deserialize(std::string* error_message) { if (!json_string_) - return false; + return NULL; return JSONReader::ReadAndReturnError(*json_string_, allow_trailing_comma_, error_message); @@ -51,7 +51,7 @@ bool JSONFileValueSerializer::Serialize(const Value& root) { Value* JSONFileValueSerializer::Deserialize(std::string* error_message) { std::string json_string; if (!file_util::ReadFileToString(json_file_path_, &json_string)) { - return false; + return NULL; } JSONStringValueSerializer serializer(json_string); return serializer.Deserialize(error_message); diff --git a/chrome/common/json_value_serializer.h b/chrome/common/json_value_serializer.h index 7a51528..71038fe 100644 --- a/chrome/common/json_value_serializer.h +++ b/chrome/common/json_value_serializer.h @@ -39,7 +39,7 @@ class JSONStringValueSerializer : public ValueSerializer { // Attempt to deserialize the data structure encoded in the string passed // in to the constructor into a structure of Value objects. If the return - // value is NULL and |error_message| is non-null, |error-message| will contain + // value is NULL and |error_message| is non-null, |error_message| will contain // a string describing the error. Value* Deserialize(std::string* error_message); @@ -84,7 +84,8 @@ class JSONFileValueSerializer : public ValueSerializer { // Attempt to deserialize the data structure encoded in the file passed // in to the constructor into a structure of Value objects. If the return // value is NULL, and if |error_message| is non-null, |error_message| will - // contain a string describing the error. + // contain a string describing the error. The caller takes ownership of the + // returned value. Value* Deserialize(std::string* error_message); private: |