Fix emulator build error
[platform/framework/web/chromium-efl.git] / dbus / test_service.h
index b77b665..ea8de9d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -6,9 +6,10 @@
 #define DBUS_TEST_SERVICE_H_
 
 #include "base/compiler_specific.h"
+#include "base/memory/raw_ptr.h"
 #include "base/memory/ref_counted.h"
-#include "base/threading/thread.h"
 #include "base/synchronization/waitable_event.h"
+#include "base/threading/thread.h"
 #include "dbus/bus.h"
 #include "dbus/exported_object.h"
 
@@ -74,11 +75,11 @@ class TestService : public base::Thread {
   // Request the ownership of a well-known name "TestService".
   // |callback| will be called with the result when an ownership request is
   // completed.
-  void RequestOwnership(base::Callback<void(bool)> callback);
+  void RequestOwnership(base::OnceCallback<void(bool)> callback);
 
   // Release the ownership of the well-known name "TestService".
   // |callback| will be called when the ownership has been released.
-  void ReleaseOwnership(base::Closure callback);
+  void ReleaseOwnership(base::OnceClosure callback);
 
   // Returns the name of this service.
   const std::string& service_name() const { return service_name_; }
@@ -101,7 +102,7 @@ class TestService : public base::Thread {
   // the requested well-known bus name. |callback| and |service_name| are bound
   // when the service requests the ownership. |success| is the result of the
   // completed request, and is propagated to |callback|.
-  void OnOwnership(base::Callback<void(bool)> callback,
+  void OnOwnership(base::OnceCallback<void(bool)> callback,
                    const std::string& service_name,
                    bool success);
 
@@ -179,10 +180,10 @@ class TestService : public base::Thread {
   void SendPropertyInvalidatedSignalInternal();
 
   // Helper function for RequestOwnership().
-  void RequestOwnershipInternal(base::Callback<void(bool)> callback);
+  void RequestOwnershipInternal(base::OnceCallback<void(bool)> callback);
 
   // Helper function for ReleaseOwnership().
-  void ReleaseOwnershipInternal(base::Closure callback);
+  void ReleaseOwnershipInternal(base::OnceClosure callback);
 
   // Configures the test service to send a PropertiesChanged signal for the
   // "Name" property immediately after a call to GetManagedObjects.
@@ -223,8 +224,9 @@ class TestService : public base::Thread {
   bool has_ownership_;
 
   scoped_refptr<Bus> bus_;
-  ExportedObject* exported_object_;
-  ExportedObject* exported_object_manager_;
+  raw_ptr<ExportedObject, AcrossTasksDanglingUntriaged> exported_object_;
+  raw_ptr<ExportedObject, AcrossTasksDanglingUntriaged>
+      exported_object_manager_;
 };
 
 }  // namespace dbus