diff options
author | olli.raula <olli.raula@intel.com> | 2015-10-15 23:16:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-16 06:17:31 +0000 |
commit | ba04525cccccae530aa899882227d81b037eebff (patch) | |
tree | 311a935c17622cd982a5ee637005c3836c2ae84a /remoting | |
parent | 1737f9e86e74990aad0e9693ebf247c8ffbb86f9 (diff) | |
download | chromium_src-ba04525cccccae530aa899882227d81b037eebff.zip chromium_src-ba04525cccccae530aa899882227d81b037eebff.tar.gz chromium_src-ba04525cccccae530aa899882227d81b037eebff.tar.bz2 |
Make ValueDeserializer::Deserialize return scoped_ptr
Make ValueDeserializer::Deserialize return scoped_ptr
as almost all consumers already use scoped_ptr and it
is also better way to do it.
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/1394993004
Cr-Commit-Position: refs/heads/master@{#354458}
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/pairing_registry_delegate_linux.cc | 8 | ||||
-rw-r--r-- | remoting/host/pairing_registry_delegate_win.cc | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/remoting/host/pairing_registry_delegate_linux.cc b/remoting/host/pairing_registry_delegate_linux.cc index 7b22721..cf51255 100644 --- a/remoting/host/pairing_registry_delegate_linux.cc +++ b/remoting/host/pairing_registry_delegate_linux.cc @@ -49,8 +49,8 @@ scoped_ptr<base::ListValue> PairingRegistryDelegateLinux::LoadAll() { JSONFileValueDeserializer deserializer(pairing_file); int error_code; std::string error_message; - scoped_ptr<base::Value> pairing_json( - deserializer.Deserialize(&error_code, &error_message)); + scoped_ptr<base::Value> pairing_json = + deserializer.Deserialize(&error_code, &error_message); if (!pairing_json) { LOG(WARNING) << "Failed to load '" << pairing_file.value() << "' (" << error_code << ")."; @@ -88,8 +88,8 @@ PairingRegistry::Pairing PairingRegistryDelegateLinux::Load( JSONFileValueDeserializer deserializer(pairing_file); int error_code; std::string error_message; - scoped_ptr<base::Value> pairing( - deserializer.Deserialize(&error_code, &error_message)); + scoped_ptr<base::Value> pairing = + deserializer.Deserialize(&error_code, &error_message); if (!pairing) { LOG(WARNING) << "Failed to load pairing information: " << error_message << " (" << error_code << ")."; diff --git a/remoting/host/pairing_registry_delegate_win.cc b/remoting/host/pairing_registry_delegate_win.cc index a714e31..90b04ba 100644 --- a/remoting/host/pairing_registry_delegate_win.cc +++ b/remoting/host/pairing_registry_delegate_win.cc @@ -52,8 +52,8 @@ scoped_ptr<base::DictionaryValue> ReadValue(const base::win::RegKey& key, JSONStringValueDeserializer deserializer(value_json_utf8); int error_code; std::string error_message; - scoped_ptr<base::Value> value(deserializer.Deserialize(&error_code, - &error_message)); + scoped_ptr<base::Value> value = + deserializer.Deserialize(&error_code, &error_message); if (!value) { LOG(ERROR) << "Failed to parse '" << value_name << "': " << error_message << " (" << error_code << ")."; |