Fix for Geolocation webTCT failures
[platform/framework/web/chromium-efl.git] / dbus / property.h
index 9a32184..d9b28cb 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.
 
@@ -12,9 +12,9 @@
 #include <utility>
 #include <vector>
 
-#include "base/bind.h"
-#include "base/callback.h"
-#include "base/macros.h"
+#include "base/functional/bind.h"
+#include "base/functional/callback.h"
+#include "base/memory/raw_ptr.h"
 #include "dbus/dbus_export.h"
 #include "dbus/message.h"
 #include "dbus/object_proxy.h"
@@ -97,7 +97,7 @@
 //
 // This now allows code using the client implementation to access properties
 // in a type-safe manner, and assuming the PropertyChanged callback is
-// propogated up to observers, be notified of changes. A typical access of
+// propagated up to observers, be notified of changes. A typical access of
 // the current value of the name property would be:
 //
 //   ExampleClient::Properties* p = example_client->GetProperties(object_path);
@@ -137,6 +137,10 @@ class PropertySet;
 class CHROME_DBUS_EXPORT PropertyBase {
  public:
   PropertyBase();
+
+  PropertyBase(const PropertyBase&) = delete;
+  PropertyBase& operator=(const PropertyBase&) = delete;
+
   virtual ~PropertyBase();
 
   // Initializes the |property_set| and property |name| so that method
@@ -188,14 +192,12 @@ class CHROME_DBUS_EXPORT PropertyBase {
  private:
   // Pointer to the PropertySet instance that this instance is a member of,
   // no ownership is taken and |property_set_| must outlive this class.
-  PropertySet* property_set_;
+  raw_ptr<PropertySet> property_set_;
 
   bool is_valid_;
 
   // Name of the property.
   std::string name_;
-
-  DISALLOW_COPY_AND_ASSIGN(PropertyBase);
 };
 
 // PropertySet groups a collection of properties for a remote object
@@ -225,6 +227,9 @@ class CHROME_DBUS_EXPORT PropertySet {
   PropertySet(ObjectProxy* object_proxy, const std::string& interface,
               const PropertyChangedCallback& property_changed_callback);
 
+  PropertySet(const PropertySet&) = delete;
+  PropertySet& operator=(const PropertySet&) = delete;
+
   // Destructor; we don't hold on to any references or memory that needs
   // explicit clean-up, but clang thinks we might.
   virtual ~PropertySet();
@@ -328,7 +333,7 @@ class CHROME_DBUS_EXPORT PropertySet {
 
   // Pointer to object proxy for making method calls, no ownership is taken
   // so this must outlive this class.
-  ObjectProxy* object_proxy_;
+  raw_ptr<ObjectProxy, AcrossTasksDanglingUntriaged> object_proxy_;
 
   // Interface of property, e.g. "org.chromium.ExampleService", this is
   // distinct from the interface of the method call itself which is the
@@ -348,8 +353,6 @@ class CHROME_DBUS_EXPORT PropertySet {
   // Weak pointer factory as D-Bus callbacks may last longer than these
   // objects.
   base::WeakPtrFactory<PropertySet> weak_ptr_factory_{this};
-
-  DISALLOW_COPY_AND_ASSIGN(PropertySet);
 };
 
 // Property template, this defines the type-specific and type-safe methods