Remove Device::AddCommandRemovedCallback BUG:24267885 Change-Id: I5a5f34a9d04d72a4d89be3f5ed67124fed367068 Reviewed-on: https://weave-review.googlesource.com/1248 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/libweave/include/weave/device.h b/libweave/include/weave/device.h index c81dd04..ec8d4f5 100644 --- a/libweave/include/weave/device.h +++ b/libweave/include/weave/device.h
@@ -45,15 +45,12 @@ virtual void AddSettingsChangedCallback( const SettingsChangedCallback& callback) = 0; - // Callback type for AddCommandAddedCallback and AddCommandRemovedCallback. + // Callback type for AddCommandAddedCallback. using CommandCallback = base::Callback<void(Command*)>; // Adds notification callback for a new command being added to the queue. virtual void AddCommandAddedCallback(const CommandCallback& callback) = 0; - // Adds notification callback for a command being removed from the queue. - virtual void AddCommandRemovedCallback(const CommandCallback& callback) = 0; - // Adds a new command to the command queue. virtual bool AddCommand(const base::DictionaryValue& command, std::string* id,
diff --git a/libweave/include/weave/test/mock_device.h b/libweave/include/weave/test/mock_device.h index 480208e..c289ca7 100644 --- a/libweave/include/weave/test/mock_device.h +++ b/libweave/include/weave/test/mock_device.h
@@ -22,7 +22,6 @@ MOCK_METHOD1(AddSettingsChangedCallback, void(const SettingsChangedCallback& callback)); MOCK_METHOD1(AddCommandAddedCallback, void(const CommandCallback&)); - MOCK_METHOD1(AddCommandRemovedCallback, void(const CommandCallback&)); MOCK_METHOD3(AddCommand, bool(const base::DictionaryValue&, std::string*, ErrorPtr*)); MOCK_METHOD1(FindCommand, Command*(const std::string&));
diff --git a/libweave/src/device_manager.cc b/libweave/src/device_manager.cc index aedd425..e1d1e49 100644 --- a/libweave/src/device_manager.cc +++ b/libweave/src/device_manager.cc
@@ -111,10 +111,6 @@ return command_manager_->AddCommandAddedCallback(callback); } -void DeviceManager::AddCommandRemovedCallback(const CommandCallback& callback) { - return command_manager_->AddCommandRemovedCallback(callback); -} - bool DeviceManager::SetStateProperties( const base::DictionaryValue& property_set, ErrorPtr* error) {
diff --git a/libweave/src/device_manager.h b/libweave/src/device_manager.h index d28d0b0..a72d800 100644 --- a/libweave/src/device_manager.h +++ b/libweave/src/device_manager.h
@@ -42,7 +42,6 @@ ErrorPtr* error) override; Command* FindCommand(const std::string& id) override; void AddCommandAddedCallback(const CommandCallback& callback) override; - void AddCommandRemovedCallback(const CommandCallback& callback) override; void AddStateChangedCallback(const base::Closure& callback) override; bool SetStateProperties(const base::DictionaryValue& property_set, ErrorPtr* error) override;