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/server/dbus_service.cc b/server/dbus_service.cc
index 7e70731..9f0141c 100644
--- a/server/dbus_service.cc
+++ b/server/dbus_service.cc
@@ -36,7 +36,7 @@
}
void DBusService::HandleCreateGoogleAttestedKey(
- scoped_ptr<DBusMethodResponse<const CreateGoogleAttestedKeyReply&>>
+ std::unique_ptr<DBusMethodResponse<const CreateGoogleAttestedKeyReply&>>
response,
const CreateGoogleAttestedKeyRequest& request) {
VLOG(1) << __func__;
diff --git a/server/dbus_service.h b/server/dbus_service.h
index e880c16..70e5c61 100644
--- a/server/dbus_service.h
+++ b/server/dbus_service.h
@@ -5,7 +5,8 @@
#ifndef ATTESTATION_SERVER_DBUS_SERVICE_H_
#define ATTESTATION_SERVER_DBUS_SERVICE_H_
-#include <base/memory/scoped_ptr.h>
+#include <memory>
+
#include <chromeos/dbus/dbus_method_response.h>
#include <chromeos/dbus/dbus_object.h>
#include <dbus/bus.h>
@@ -39,7 +40,7 @@
// Handles a CreateGoogleAttestedKey D-Bus call.
void HandleCreateGoogleAttestedKey(
- scoped_ptr<chromeos::dbus_utils::DBusMethodResponse<
+ std::unique_ptr<chromeos::dbus_utils::DBusMethodResponse<
const CreateGoogleAttestedKeyReply&>> response,
const CreateGoogleAttestedKeyRequest& request);