diff options
author | prashhir <prashhir@cisco.com> | 2015-03-05 01:30:57 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-05 09:31:42 +0000 |
commit | 54a99450c633d64842217b10fa6841b2a3e7eb77 (patch) | |
tree | 743fdd828070286b7fb0223d140e4ded87954b13 /components/update_client | |
parent | 60cab6b4116a9c297795d6e32dc30c28f67a959e (diff) | |
download | chromium_src-54a99450c633d64842217b10fa6841b2a3e7eb77.zip chromium_src-54a99450c633d64842217b10fa6841b2a3e7eb77.tar.gz chromium_src-54a99450c633d64842217b10fa6841b2a3e7eb77.tar.bz2 |
Split ValueSerializer into separate Serializer and Deserializer classes.
This CL removes the Deserializer functionality from ValueSerializer,
and puts into separate class ValueDeserializer, so that class responsibility
is maintained.
BUG=455453
TBR=brettw@chromium.org
Review URL: https://codereview.chromium.org/925783002
Cr-Commit-Position: refs/heads/master@{#319239}
Diffstat (limited to 'components/update_client')
-rw-r--r-- | components/update_client/component_patcher.cc | 4 | ||||
-rw-r--r-- | components/update_client/component_unpacker.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/components/update_client/component_patcher.cc b/components/update_client/component_patcher.cc index 3077bc4..29ce774 100644 --- a/components/update_client/component_patcher.cc +++ b/components/update_client/component_patcher.cc @@ -30,8 +30,8 @@ base::ListValue* ReadCommands(const base::FilePath& unpack_path) { if (!base::PathExists(commands)) return NULL; - JSONFileValueSerializer serializer(commands); - scoped_ptr<base::Value> root(serializer.Deserialize(NULL, NULL)); + JSONFileValueDeserializer deserializer(commands); + scoped_ptr<base::Value> root(deserializer.Deserialize(NULL, NULL)); return (root.get() && root->IsType(base::Value::TYPE_LIST)) ? static_cast<base::ListValue*>(root.release()) diff --git a/components/update_client/component_unpacker.cc b/components/update_client/component_unpacker.cc index eb1b2d8..efde910 100644 --- a/components/update_client/component_unpacker.cc +++ b/components/update_client/component_unpacker.cc @@ -125,9 +125,9 @@ scoped_ptr<base::DictionaryValue> ReadManifest( unpack_path.Append(FILE_PATH_LITERAL("manifest.json")); if (!base::PathExists(manifest)) return scoped_ptr<base::DictionaryValue>(); - JSONFileValueSerializer serializer(manifest); + JSONFileValueDeserializer deserializer(manifest); std::string error; - scoped_ptr<base::Value> root(serializer.Deserialize(NULL, &error)); + scoped_ptr<base::Value> root(deserializer.Deserialize(NULL, &error)); if (!root.get()) return scoped_ptr<base::DictionaryValue>(); if (!root->IsType(base::Value::TYPE_DICTIONARY)) |