huddly-updater: remove base/macros.h
Replace the deprecated DISALLOW_* macros by delete ctor since they will
be removed from base/macros.h from libchrome r938828.
Remove unused includes of base/macros.h since the file will be renamed
from libchrome r941411.
BUG=b:198993705
TEST=FEATURES=test emerge-endeavour huddly-updater
Change-Id: Ib5d128c0d25474105e27ab4d92796417b0f9008e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/huddly-updater/+/3411702
Tested-by: Grace Cham <hscham@chromium.org>
Tested-by: Kyle Williams <kdgwill@chromium.org>
Reviewed-by: Torleiv Sundre <torleiv@huddly.corp-partner.google.com>
Reviewed-by: Kyle Williams <kdgwill@chromium.org>
Commit-Queue: Grace Cham <hscham@chromium.org>
diff --git a/src/common/messagepack/messagepack.h b/src/common/messagepack/messagepack.h
index 0fed7e1..64beba6 100644
--- a/src/common/messagepack/messagepack.h
+++ b/src/common/messagepack/messagepack.h
@@ -6,7 +6,6 @@
#include <msgpack.h>
-#include <base/macros.h>
#include <memory>
#include <string>
#include <vector>
@@ -205,6 +204,10 @@
bool GetRoot(T* out) const {
return GetRootObject().Get<T>(out);
}
+
+ Unpacker(const Unpacker&) = delete;
+ Unpacker& operator=(const Unpacker&) = delete;
+
~Unpacker();
private:
@@ -212,8 +215,6 @@
msgpack_unpacked unpacked_;
std::vector<uint8_t> packed_;
-
- DISALLOW_COPY_AND_ASSIGN(Unpacker);
};
} // namespace messagepack
diff --git a/src/huddly_go/manifest.h b/src/huddly_go/manifest.h
index 9ec24d9..2d7a192 100644
--- a/src/huddly_go/manifest.h
+++ b/src/huddly_go/manifest.h
@@ -6,7 +6,6 @@
#define SRC_MANIFEST_H_
#include <base/files/file_path.h>
-#include <base/macros.h>
#include <base/values.h>
#include <string>
@@ -16,6 +15,9 @@
public:
explicit Manifest(const base::FilePath& path) : path_(path) {}
Manifest() = default;
+ Manifest(const Manifest&) = delete;
+ Manifest& operator=(const Manifest&) = delete;
+
~Manifest() = default;
bool ParseFile();
@@ -44,8 +46,6 @@
std::string app_ver_;
std::string boot_ver_;
std::string hw_rev_;
-
- DISALLOW_COPY_AND_ASSIGN(Manifest);
};
} // namespace huddly
diff --git a/src/huddly_go/manifest_unittest.cc b/src/huddly_go/manifest_unittest.cc
index 0e27df8..7a9adfa 100644
--- a/src/huddly_go/manifest_unittest.cc
+++ b/src/huddly_go/manifest_unittest.cc
@@ -8,7 +8,6 @@
#include <base/files/file_util.h>
#include <base/json/json_reader.h>
-#include <base/macros.h>
#include <base/values.h>
#include <gtest/gtest.h>
diff --git a/src/huddly_hpk/hlink_vsc.h b/src/huddly_hpk/hlink_vsc.h
index 5543ea5..be23884 100644
--- a/src/huddly_hpk/hlink_vsc.h
+++ b/src/huddly_hpk/hlink_vsc.h
@@ -4,7 +4,6 @@
#ifndef SRC_HUDDLY_HPK_HLINK_VSC_H_
#define SRC_HUDDLY_HPK_HLINK_VSC_H_
-#include <base/macros.h>
#include <cstdint>
#include <memory>
#include <string>
@@ -19,6 +18,10 @@
public:
static std::unique_ptr<HLinkVsc> Create(
std::unique_ptr<UsbDevice> usb_device);
+
+ HLinkVsc(const HLinkVsc&) = delete;
+ HLinkVsc& operator=(const HLinkVsc&) = delete;
+
~HLinkVsc();
UsbDevice* GetUsbDevice();
bool Connect();
@@ -43,8 +46,6 @@
bool interface_claimed_ = false;
UsbEndpoint endpoint_in_;
UsbEndpoint endpoint_out_;
-
- DISALLOW_COPY_AND_ASSIGN(HLinkVsc);
};
} // namespace huddly
diff --git a/src/huddly_hpk/message_bus.h b/src/huddly_hpk/message_bus.h
index 74d6c51..a9702e7 100644
--- a/src/huddly_hpk/message_bus.h
+++ b/src/huddly_hpk/message_bus.h
@@ -4,7 +4,6 @@
#ifndef SRC_HUDDLY_HPK_MESSAGE_BUS_H_
#define SRC_HUDDLY_HPK_MESSAGE_BUS_H_
-#include <base/macros.h>
#include <memory>
#include <string>
#include "hlink_vsc.h"
@@ -22,14 +21,16 @@
public:
static std::unique_ptr<ScopedSubscribe> Create(
HLinkVsc* hlink, const std::string& subscription);
+
+ ScopedSubscribe(const ScopedSubscribe&) = delete;
+ ScopedSubscribe& operator=(const ScopedSubscribe&) = delete;
+
~ScopedSubscribe();
private:
ScopedSubscribe(HLinkVsc* hlink, const std::string& subscription);
HLinkVsc* hlink_ = nullptr;
std::string subscription_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedSubscribe);
};
} // namespace message_bus
diff --git a/src/huddly_hpk/usb.h b/src/huddly_hpk/usb.h
index 243298c..50a0793 100644
--- a/src/huddly_hpk/usb.h
+++ b/src/huddly_hpk/usb.h
@@ -4,7 +4,6 @@
#ifndef SRC_HUDDLY_HPK_USB_H_
#define SRC_HUDDLY_HPK_USB_H_
-#include <base/macros.h>
#include <libusb.h>
#include <cstdint>
@@ -32,6 +31,9 @@
class UsbDevice {
public:
explicit UsbDevice(const Usb* usb, libusb_device* dev);
+ UsbDevice(const UsbDevice&) = delete;
+ UsbDevice& operator=(const UsbDevice&) = delete;
+
~UsbDevice();
bool Open();
@@ -61,13 +63,15 @@
libusb_device* dev_ = nullptr;
libusb_device_descriptor device_descriptor_ = {};
libusb_device_handle* devh_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(UsbDevice);
};
class UsbDeviceList {
public:
static std::unique_ptr<UsbDeviceList> Create(libusb_context* ctx);
+
+ UsbDeviceList(const UsbDeviceList&) = delete;
+ UsbDeviceList& operator=(const UsbDeviceList&) = delete;
+
~UsbDeviceList();
bool Valid() const;
@@ -79,13 +83,15 @@
ssize_t count_;
libusb_device** devices_;
-
- DISALLOW_COPY_AND_ASSIGN(UsbDeviceList);
};
class Usb {
public:
static std::unique_ptr<Usb> Create();
+
+ Usb(const Usb&) = delete;
+ Usb& operator=(const Usb&) = delete;
+
~Usb();
std::unique_ptr<UsbDevice> FindDevice(uint16_t vid,
@@ -101,8 +107,6 @@
private:
Usb() {}
libusb_context* ctx_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(Usb);
};
} // namespace huddly