summaryrefslogtreecommitdiffstats
path: root/chrome/common/json_value_serializer.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-29 19:59:08 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-29 19:59:08 +0000
commitb4cebf87816cde49f6d4991ffa254e5ead97703b (patch)
treefb12e4b464a43af846f30bbd0dbe9484150373b0 /chrome/common/json_value_serializer.h
parent45ce59f19161b517c04a4e3bcd0890b938382b06 (diff)
downloadchromium_src-b4cebf87816cde49f6d4991ffa254e5ead97703b.zip
chromium_src-b4cebf87816cde49f6d4991ffa254e5ead97703b.tar.gz
chromium_src-b4cebf87816cde49f6d4991ffa254e5ead97703b.tar.bz2
Change the signature of JSONReader::Read() and related
methods to be more friendly to use with scoped_ptr. Change all the callsites. Review URL: http://codereview.chromium.org/16270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/json_value_serializer.h')
-rw-r--r--chrome/common/json_value_serializer.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/chrome/common/json_value_serializer.h b/chrome/common/json_value_serializer.h
index 2e581ee..7a51528 100644
--- a/chrome/common/json_value_serializer.h
+++ b/chrome/common/json_value_serializer.h
@@ -39,12 +39,9 @@ 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 true, the |root| parameter will be set to point to a new Value
- // object that corresponds to the values represented in the string. The
- // caller takes ownership of the returned Value objects. Otherwise, the root
- // value will be changed and if |error_message| is non-null, it will contain
+ // value is NULL and |error_message| is non-null, |error-message| will contain
// a string describing the error.
- bool Deserialize(Value** root, std::string* error_message);
+ Value* Deserialize(std::string* error_message);
void set_pretty_print(bool new_value) { pretty_print_ = new_value; }
bool pretty_print() { return pretty_print_; }
@@ -86,12 +83,9 @@ 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 true, the |root| parameter will be set to point to a new Value
- // object that corresponds to the values represented in the file. The
- // caller takes ownership of the returned Value objects. Otherwise, the root
- // value will be changed and if |error_message| is non-null, it will contain
- // a string describing the error.
- bool Deserialize(Value** root, std::string* error_message);
+ // value is NULL, and if |error_message| is non-null, |error_message| will
+ // contain a string describing the error.
+ Value* Deserialize(std::string* error_message);
private:
std::wstring json_file_path_;