libchromeos: Replace scoped_ptr with std::unique_ptr in D-Bus method handlers
Changed callbacks to use std::unique_ptr in D-Bus method handlers instead of
scoped_ptr, now that we can do this with base::Callback.
This eliminates the need to mix scoped_ptr and std::unique_ptr in the same
translation unit.
Sweep the code in the rest of platform2 that used libchromeos's D-Bus framework.
BUG=None
TEST=`FEATURES=test emerge-link libchromeos apmanager attestation buffet chromeos-dbus-bindings`
Change-Id: I50289198ef9ab183d5bc7d0c8cc7a8f53085e5a4
Reviewed-on: https://chromium-review.googlesource.com/267337
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/manager.cc b/buffet/manager.cc
index 33b1763..7b710f1 100644
--- a/buffet/manager.cc
+++ b/buffet/manager.cc
@@ -210,7 +210,7 @@
}
void Manager::SetCommandVisibility(
- scoped_ptr<chromeos::dbus_utils::DBusMethodResponse<>> response,
+ std::unique_ptr<chromeos::dbus_utils::DBusMethodResponse<>> response,
const std::vector<std::string>& in_names,
const std::string& in_visibility) {
CommandDefinition::Visibility visibility;
diff --git a/buffet/manager.h b/buffet/manager.h
index 3cf7021..cc3a114 100644
--- a/buffet/manager.h
+++ b/buffet/manager.h
@@ -37,7 +37,7 @@
template<typename... Types>
using DBusMethodResponse =
- scoped_ptr<chromeos::dbus_utils::DBusMethodResponse<Types...>>;
+ std::unique_ptr<chromeos::dbus_utils::DBusMethodResponse<Types...>>;
// The Manager is responsible for global state of Buffet. It exposes
// interfaces which affect the entire device such as device registration and
@@ -74,7 +74,7 @@
void GetCommand(DBusMethodResponse<std::string> response,
const std::string& id) override;
void SetCommandVisibility(
- scoped_ptr<chromeos::dbus_utils::DBusMethodResponse<>> response,
+ std::unique_ptr<chromeos::dbus_utils::DBusMethodResponse<>> response,
const std::vector<std::string>& in_names,
const std::string& in_visibility) override;
std::string TestMethod(const std::string& message) override;