diff options
Diffstat (limited to 'src/privet/cloud_delegate.cc')
-rw-r--r-- | src/privet/cloud_delegate.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/privet/cloud_delegate.cc b/src/privet/cloud_delegate.cc index d7e9bef..f9d53c3 100644 --- a/src/privet/cloud_delegate.cc +++ b/src/privet/cloud_delegate.cc @@ -220,14 +220,12 @@ class CloudDelegateImpl : public CloudDelegate { base::ListValue list_value; for (const auto& it : command_owners_) { - if (CanAccessCommand(it.second, user_info, nullptr)) { - list_value.Append( - component_manager_->FindCommand(it.first)->ToJson().release()); - } + if (CanAccessCommand(it.second, user_info, nullptr)) + list_value.Append(component_manager_->FindCommand(it.first)->ToJson()); } base::DictionaryValue commands_json; - commands_json.Set("commands", list_value.DeepCopy()); + commands_json.Set("commands", list_value.CreateDeepCopy()); callback.Run(commands_json, nullptr); } |