Replace DISALLOW_COPY_AND_ASSIGN in device/
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).
This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.
IWYU cleanup is left as a separate pass that is easier when these macros
go away.
Bug: 1010217
Change-Id: Ib14cf64933b803e03cdf7dceabe1f31065918c35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3176851
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#924474}
diff --git a/device/base/device_info_query_win.h b/device/base/device_info_query_win.h
index 02baf03..d0a0fd6 100644
--- a/device/base/device_info_query_win.h
+++ b/device/base/device_info_query_win.h
@@ -21,6 +21,10 @@
class DEVICE_BASE_EXPORT DeviceInfoQueryWin {
public:
DeviceInfoQueryWin();
+
+ DeviceInfoQueryWin(const DeviceInfoQueryWin&) = delete;
+ DeviceInfoQueryWin& operator=(const DeviceInfoQueryWin&) = delete;
+
~DeviceInfoQueryWin();
// Add a device to |device_info_list_| using its |device_path| so that
@@ -41,8 +45,6 @@
HDEVINFO device_info_list_ = INVALID_HANDLE_VALUE;
// When device_info_data_.cbSize != 0, |device_info_data_| is valid.
SP_DEVINFO_DATA device_info_data_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceInfoQueryWin);
};
} // namespace device
diff --git a/device/bluetooth/adapter.h b/device/bluetooth/adapter.h
index e6618ef..ab5fdd7 100644
--- a/device/bluetooth/adapter.h
+++ b/device/bluetooth/adapter.h
@@ -31,6 +31,10 @@
public device::BluetoothAdapter::Observer {
public:
explicit Adapter(scoped_refptr<device::BluetoothAdapter> adapter);
+
+ Adapter(const Adapter&) = delete;
+ Adapter& operator=(const Adapter&) = delete;
+
~Adapter() override;
// mojom::Adapter overrides:
@@ -164,8 +168,6 @@
int next_request_id_ = 0;
base::WeakPtrFactory<Adapter> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(Adapter);
};
} // namespace bluetooth
diff --git a/device/bluetooth/bluetooth_adapter_factory.h b/device/bluetooth/bluetooth_adapter_factory.h
index 11f51ab..df071fae 100644
--- a/device/bluetooth/bluetooth_adapter_factory.h
+++ b/device/bluetooth/bluetooth_adapter_factory.h
@@ -99,6 +99,10 @@
class DEVICE_BLUETOOTH_EXPORT GlobalValuesForTesting {
public:
GlobalValuesForTesting();
+
+ GlobalValuesForTesting(const GlobalValuesForTesting&) = delete;
+ GlobalValuesForTesting& operator=(const GlobalValuesForTesting&) = delete;
+
~GlobalValuesForTesting();
void SetLESupported(bool supported) { le_supported_ = supported; }
@@ -111,7 +115,6 @@
bool le_supported_ = false;
base::WeakPtrFactory<GlobalValuesForTesting> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(GlobalValuesForTesting);
};
// Returns an object that clients can use to control the return values
diff --git a/device/bluetooth/bluetooth_advertisement.h b/device/bluetooth/bluetooth_advertisement.h
index a11e82bd..4ed3e87 100644
--- a/device/bluetooth/bluetooth_advertisement.h
+++ b/device/bluetooth/bluetooth_advertisement.h
@@ -68,6 +68,10 @@
class DEVICE_BLUETOOTH_EXPORT Data {
public:
explicit Data(AdvertisementType type);
+
+ Data(const Data&) = delete;
+ Data& operator=(const Data&) = delete;
+
~Data();
AdvertisementType type() { return type_; }
@@ -119,8 +123,6 @@
std::unique_ptr<ServiceData> service_data_;
std::unique_ptr<ScanResponseData> scan_response_data_;
bool include_tx_power_;
-
- DISALLOW_COPY_AND_ASSIGN(Data);
};
// Interface for observing changes to this advertisement.
diff --git a/device/bluetooth/bluetooth_channel_mac.h b/device/bluetooth/bluetooth_channel_mac.h
index b1ecee1..12331a3 100644
--- a/device/bluetooth/bluetooth_channel_mac.h
+++ b/device/bluetooth/bluetooth_channel_mac.h
@@ -22,6 +22,10 @@
class BluetoothChannelMac {
public:
BluetoothChannelMac();
+
+ BluetoothChannelMac(const BluetoothChannelMac&) = delete;
+ BluetoothChannelMac& operator=(const BluetoothChannelMac&) = delete;
+
virtual ~BluetoothChannelMac();
// Sets the channel's owning socket to |socket|. Should only be called if the
@@ -56,8 +60,6 @@
private:
// The socket that owns |this|.
BluetoothSocketMac* socket_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothChannelMac);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_classic_device_mac.h b/device/bluetooth/bluetooth_classic_device_mac.h
index 05208ee..d95122e 100644
--- a/device/bluetooth/bluetooth_classic_device_mac.h
+++ b/device/bluetooth/bluetooth_classic_device_mac.h
@@ -27,6 +27,11 @@
public:
explicit BluetoothClassicDeviceMac(BluetoothAdapterMac* adapter,
IOBluetoothDevice* device);
+
+ BluetoothClassicDeviceMac(const BluetoothClassicDeviceMac&) = delete;
+ BluetoothClassicDeviceMac& operator=(const BluetoothClassicDeviceMac&) =
+ delete;
+
~BluetoothClassicDeviceMac() override;
// BluetoothDevice override
@@ -94,8 +99,6 @@
BluetoothHCITransmitPowerLevelType power_level_type) const;
base::scoped_nsobject<IOBluetoothDevice> device_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothClassicDeviceMac);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index 417f595f..1a65264 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -203,6 +203,9 @@
virtual void AuthorizePairing(BluetoothDevice* device) = 0;
};
+ BluetoothDevice(const BluetoothDevice&) = delete;
+ BluetoothDevice& operator=(const BluetoothDevice&) = delete;
+
virtual ~BluetoothDevice();
// Clamps numbers less than -128 to -128 and numbers greater than 127 to 127.
@@ -783,8 +786,6 @@
// Mojo service, this field will be moved to BluetoothDeviceInfo.
absl::optional<uint8_t> battery_percentage_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDevice);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_device_android.h b/device/bluetooth/bluetooth_device_android.h
index de413a6..def7c5e 100644
--- a/device/bluetooth/bluetooth_device_android.h
+++ b/device/bluetooth/bluetooth_device_android.h
@@ -37,6 +37,9 @@
const base::android::JavaRef<jobject>&
bluetooth_device_wrapper); // Java Type: bluetoothDeviceWrapper
+ BluetoothDeviceAndroid(const BluetoothDeviceAndroid&) = delete;
+ BluetoothDeviceAndroid& operator=(const BluetoothDeviceAndroid&) = delete;
+
~BluetoothDeviceAndroid() override;
// Returns the associated ChromeBluetoothDevice Java object.
@@ -123,8 +126,6 @@
base::android::ScopedJavaGlobalRef<jobject> j_device_;
bool gatt_connected_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_device_mac.h b/device/bluetooth/bluetooth_device_mac.h
index 31873d6..0f16a02 100644
--- a/device/bluetooth/bluetooth_device_mac.h
+++ b/device/bluetooth/bluetooth_device_mac.h
@@ -17,6 +17,9 @@
class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceMac : public BluetoothDevice {
public:
+ BluetoothDeviceMac(const BluetoothDeviceMac&) = delete;
+ BluetoothDeviceMac& operator=(const BluetoothDeviceMac&) = delete;
+
~BluetoothDeviceMac() override;
// Converts between ConnectErrorCode and NSError.
@@ -31,8 +34,6 @@
protected:
BluetoothDeviceMac(BluetoothAdapterMac* adapter);
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_device_win.h b/device/bluetooth/bluetooth_device_win.h
index 0df3dcf..007da9d 100644
--- a/device/bluetooth/bluetooth_device_win.h
+++ b/device/bluetooth/bluetooth_device_win.h
@@ -36,6 +36,10 @@
const BluetoothTaskManagerWin::DeviceState& device_state,
scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
scoped_refptr<BluetoothSocketThread> socket_thread);
+
+ BluetoothDeviceWin(const BluetoothDeviceWin&) = delete;
+ BluetoothDeviceWin& operator=(const BluetoothDeviceWin&) = delete;
+
~BluetoothDeviceWin() override;
// BluetoothDevice override
@@ -166,8 +170,6 @@
// BluetoothRemoteGattServiceWin instance.
std::set<std::pair<BluetoothUUID, uint16_t>>
discovery_completed_included_services_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_device_winrt.h b/device/bluetooth/bluetooth_device_winrt.h
index daa33c24..cc29e221 100644
--- a/device/bluetooth/bluetooth_device_winrt.h
+++ b/device/bluetooth/bluetooth_device_winrt.h
@@ -43,6 +43,10 @@
static constexpr uint8_t k128BitServiceDataSection = 0x21;
BluetoothDeviceWinrt(BluetoothAdapterWinrt* adapter, uint64_t raw_address);
+
+ BluetoothDeviceWinrt(const BluetoothDeviceWinrt&) = delete;
+ BluetoothDeviceWinrt& operator=(const BluetoothDeviceWinrt&) = delete;
+
~BluetoothDeviceWinrt() override;
// BluetoothDevice:
@@ -192,8 +196,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothDeviceWinrt> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWinrt);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_discovery_filter.h b/device/bluetooth/bluetooth_discovery_filter.h
index 20e58be..e274bf8 100644
--- a/device/bluetooth/bluetooth_discovery_filter.h
+++ b/device/bluetooth/bluetooth_discovery_filter.h
@@ -51,6 +51,10 @@
public:
BluetoothDiscoveryFilter();
BluetoothDiscoveryFilter(BluetoothTransport transport);
+
+ BluetoothDiscoveryFilter(const BluetoothDiscoveryFilter&) = delete;
+ BluetoothDiscoveryFilter& operator=(const BluetoothDiscoveryFilter&) = delete;
+
~BluetoothDiscoveryFilter();
struct DEVICE_BLUETOOTH_EXPORT DeviceInfoFilter {
@@ -106,8 +110,6 @@
absl::optional<uint16_t> pathloss_;
BluetoothTransport transport_;
base::flat_set<DeviceInfoFilter> device_filters_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoveryFilter);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_discovery_manager_mac.mm b/device/bluetooth/bluetooth_discovery_manager_mac.mm
index d05ff3c..c7849bc 100644
--- a/device/bluetooth/bluetooth_discovery_manager_mac.mm
+++ b/device/bluetooth/bluetooth_discovery_manager_mac.mm
@@ -46,6 +46,11 @@
inquiry_([[IOBluetoothDeviceInquiry alloc]
initWithDelegate:inquiry_delegate_]) {}
+ BluetoothDiscoveryManagerMacClassic(
+ const BluetoothDiscoveryManagerMacClassic&) = delete;
+ BluetoothDiscoveryManagerMacClassic& operator=(
+ const BluetoothDiscoveryManagerMacClassic&) = delete;
+
~BluetoothDiscoveryManagerMacClassic() override {}
// BluetoothDiscoveryManagerMac override.
@@ -180,8 +185,6 @@
// Objective-C objects for running and tracking device inquiry.
base::scoped_nsobject<BluetoothDeviceInquiryDelegate> inquiry_delegate_;
base::scoped_nsobject<IOBluetoothDeviceInquiry> inquiry_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoveryManagerMacClassic);
};
BluetoothDiscoveryManagerMac::BluetoothDiscoveryManagerMac(
diff --git a/device/bluetooth/bluetooth_discovery_session.h b/device/bluetooth/bluetooth_discovery_session.h
index 62aa3cbb..bb2eb746 100644
--- a/device/bluetooth/bluetooth_discovery_session.h
+++ b/device/bluetooth/bluetooth_discovery_session.h
@@ -47,6 +47,10 @@
INACTIVE
};
+ BluetoothDiscoverySession(const BluetoothDiscoverySession&) = delete;
+ BluetoothDiscoverySession& operator=(const BluetoothDiscoverySession&) =
+ delete;
+
// Terminates the discovery session. If this is the last active discovery
// session, a call to the underlying system to stop device discovery is made.
// Users may call BluetoothDiscoverySession::Stop() if they need to observe
@@ -127,8 +131,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothDiscoverySession> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoverySession);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_gatt_connection.h b/device/bluetooth/bluetooth_gatt_connection.h
index e616a11..6b4c708 100644
--- a/device/bluetooth/bluetooth_gatt_connection.h
+++ b/device/bluetooth/bluetooth_gatt_connection.h
@@ -27,6 +27,9 @@
BluetoothGattConnection(scoped_refptr<device::BluetoothAdapter> adapter,
const std::string& device_address);
+ BluetoothGattConnection(const BluetoothGattConnection&) = delete;
+ BluetoothGattConnection& operator=(const BluetoothGattConnection&) = delete;
+
// Destructor automatically closes this GATT connection. If this is the last
// remaining GATT connection and this results in a call to the OS, that call
// may not always succeed. Users can make an explicit call to
@@ -65,8 +68,6 @@
private:
bool owns_reference_for_connection_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattConnection);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_gatt_discoverer_winrt.h b/device/bluetooth/bluetooth_gatt_discoverer_winrt.h
index ec66a50..7412a5dd 100644
--- a/device/bluetooth/bluetooth_gatt_discoverer_winrt.h
+++ b/device/bluetooth/bluetooth_gatt_discoverer_winrt.h
@@ -48,6 +48,11 @@
Microsoft::WRL::ComPtr<
ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice> ble_device,
absl::optional<BluetoothUUID> service_uuid);
+
+ BluetoothGattDiscovererWinrt(const BluetoothGattDiscovererWinrt&) = delete;
+ BluetoothGattDiscovererWinrt& operator=(const BluetoothGattDiscovererWinrt&) =
+ delete;
+
~BluetoothGattDiscovererWinrt();
// Note: In order to avoid running |callback| multiple times on errors,
@@ -106,8 +111,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothGattDiscovererWinrt> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattDiscovererWinrt);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_gatt_notify_session.h b/device/bluetooth/bluetooth_gatt_notify_session.h
index 45119f9..2724af85 100644
--- a/device/bluetooth/bluetooth_gatt_notify_session.h
+++ b/device/bluetooth/bluetooth_gatt_notify_session.h
@@ -25,6 +25,10 @@
explicit BluetoothGattNotifySession(
base::WeakPtr<BluetoothRemoteGattCharacteristic> characteristic);
+ BluetoothGattNotifySession(const BluetoothGattNotifySession&) = delete;
+ BluetoothGattNotifySession& operator=(const BluetoothGattNotifySession&) =
+ delete;
+
// Destructor automatically stops this session.
virtual ~BluetoothGattNotifySession();
@@ -51,8 +55,6 @@
base::WeakPtr<BluetoothRemoteGattCharacteristic> characteristic_;
std::string characteristic_id_;
bool active_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattNotifySession);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_gatt_service.h b/device/bluetooth/bluetooth_gatt_service.h
index 7e3586f..3db9f06 100644
--- a/device/bluetooth/bluetooth_gatt_service.h
+++ b/device/bluetooth/bluetooth_gatt_service.h
@@ -53,13 +53,13 @@
// services.
virtual bool IsPrimary() const = 0;
+ BluetoothGattService(const BluetoothGattService&) = delete;
+ BluetoothGattService& operator=(const BluetoothGattService&) = delete;
+
virtual ~BluetoothGattService();
protected:
BluetoothGattService();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattService);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_l2cap_channel_mac.h b/device/bluetooth/bluetooth_l2cap_channel_mac.h
index 5fe6194..f8e6fbaa 100644
--- a/device/bluetooth/bluetooth_l2cap_channel_mac.h
+++ b/device/bluetooth/bluetooth_l2cap_channel_mac.h
@@ -27,6 +27,10 @@
// NOTE: The |channel| is expected to already be retained.
BluetoothL2capChannelMac(BluetoothSocketMac* socket,
IOBluetoothL2CAPChannel* channel);
+
+ BluetoothL2capChannelMac(const BluetoothL2capChannelMac&) = delete;
+ BluetoothL2capChannelMac& operator=(const BluetoothL2capChannelMac&) = delete;
+
~BluetoothL2capChannelMac() override;
// Opens a new L2CAP channel with Channel ID |channel_id| to the target
@@ -61,8 +65,6 @@
// The delegate for the native channel.
base::scoped_nsobject<BluetoothL2capChannelDelegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothL2capChannelMac);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_low_energy_advertisement_manager_mac.h b/device/bluetooth/bluetooth_low_energy_advertisement_manager_mac.h
index 408c0344..f2d937e 100644
--- a/device/bluetooth/bluetooth_low_energy_advertisement_manager_mac.h
+++ b/device/bluetooth/bluetooth_low_energy_advertisement_manager_mac.h
@@ -18,6 +18,12 @@
class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyAdvertisementManagerMac {
public:
BluetoothLowEnergyAdvertisementManagerMac();
+
+ BluetoothLowEnergyAdvertisementManagerMac(
+ const BluetoothLowEnergyAdvertisementManagerMac&) = delete;
+ BluetoothLowEnergyAdvertisementManagerMac& operator=(
+ const BluetoothLowEnergyAdvertisementManagerMac&) = delete;
+
~BluetoothLowEnergyAdvertisementManagerMac();
// Initializes the advertisement manager.
@@ -52,8 +58,6 @@
CBPeripheralManager* peripheral_manager_;
scoped_refptr<BluetoothAdvertisementMac> active_advertisement_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyAdvertisementManagerMac);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.h b/device/bluetooth/bluetooth_low_energy_device_mac.h
index 54116b3..f6234d5 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.h
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.h
@@ -36,6 +36,11 @@
public:
BluetoothLowEnergyDeviceMac(BluetoothAdapterMac* adapter,
CBPeripheral* peripheral);
+
+ BluetoothLowEnergyDeviceMac(const BluetoothLowEnergyDeviceMac&) = delete;
+ BluetoothLowEnergyDeviceMac& operator=(const BluetoothLowEnergyDeviceMac&) =
+ delete;
+
~BluetoothLowEnergyDeviceMac() override;
// BluetoothDevice overrides.
@@ -168,8 +173,6 @@
// decreases each time DidDiscoverPrimaryServices() is called. Once the
// value is set to 0, characteristics and properties are discovered.
int discovery_pending_count_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac);
};
// Stream operator for logging.
diff --git a/device/bluetooth/bluetooth_low_energy_win.h b/device/bluetooth/bluetooth_low_energy_win.h
index 0749f9d..1df3e4d5 100644
--- a/device/bluetooth/bluetooth_low_energy_win.h
+++ b/device/bluetooth/bluetooth_low_energy_win.h
@@ -47,6 +47,11 @@
DWORD property_type,
std::unique_ptr<uint8_t[]> value,
size_t value_size);
+
+ DeviceRegistryPropertyValue(const DeviceRegistryPropertyValue&) = delete;
+ DeviceRegistryPropertyValue& operator=(const DeviceRegistryPropertyValue&) =
+ delete;
+
~DeviceRegistryPropertyValue();
// Returns the vaue type a REG_xxx value (e.g. REG_SZ, REG_DWORD, ...)
@@ -61,8 +66,6 @@
DWORD property_type_;
std::unique_ptr<uint8_t[]> value_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceRegistryPropertyValue);
};
// Represents the value associated to a DEVPROPKEY.
@@ -75,6 +78,10 @@
DevicePropertyValue(DEVPROPTYPE property_type,
std::unique_ptr<uint8_t[]> value,
size_t value_size);
+
+ DevicePropertyValue(const DevicePropertyValue&) = delete;
+ DevicePropertyValue& operator=(const DevicePropertyValue&) = delete;
+
~DevicePropertyValue();
DEVPROPTYPE property_type() const { return property_type_; }
@@ -85,8 +92,6 @@
DEVPROPTYPE property_type_;
std::unique_ptr<uint8_t[]> value_;
size_t value_size_;
-
- DISALLOW_COPY_AND_ASSIGN(DevicePropertyValue);
};
struct DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyServiceInfo {
diff --git a/device/bluetooth/bluetooth_pairing_winrt.h b/device/bluetooth/bluetooth_pairing_winrt.h
index 2108ebf..bba68cf 100644
--- a/device/bluetooth/bluetooth_pairing_winrt.h
+++ b/device/bluetooth/bluetooth_pairing_winrt.h
@@ -36,6 +36,9 @@
custom_pairing,
ConnectCallback callback);
+ BluetoothPairingWinrt(const BluetoothPairingWinrt&) = delete;
+ BluetoothPairingWinrt& operator=(const BluetoothPairingWinrt&) = delete;
+
~BluetoothPairingWinrt();
// Initiates the pairing procedure.
@@ -92,8 +95,6 @@
SEQUENCE_CHECKER(sequence_checker_);
base::WeakPtrFactory<BluetoothPairingWinrt> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothPairingWinrt);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic.h b/device/bluetooth/bluetooth_remote_gatt_characteristic.h
index a0055929..5700e68 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic.h
@@ -63,6 +63,11 @@
using NotifySessionCallback =
base::OnceCallback<void(std::unique_ptr<BluetoothGattNotifySession>)>;
+ BluetoothRemoteGattCharacteristic(const BluetoothRemoteGattCharacteristic&) =
+ delete;
+ BluetoothRemoteGattCharacteristic& operator=(
+ const BluetoothRemoteGattCharacteristic&) = delete;
+
~BluetoothRemoteGattCharacteristic() override;
// Returns the value of the characteristic. For remote characteristics, this
@@ -315,8 +320,6 @@
base::WeakPtrFactory<BluetoothRemoteGattCharacteristic> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristic);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
index 89f5514f..b37ee7d 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
@@ -46,6 +46,11 @@
const base::android::JavaRef<
jobject>& /* ChromeBluetoothDevice */ chrome_bluetooth_device);
+ BluetoothRemoteGattCharacteristicAndroid(
+ const BluetoothRemoteGattCharacteristicAndroid&) = delete;
+ BluetoothRemoteGattCharacteristicAndroid& operator=(
+ const BluetoothRemoteGattCharacteristicAndroid&) = delete;
+
~BluetoothRemoteGattCharacteristicAndroid() override;
// Returns the associated ChromeBluetoothRemoteGattCharacteristic Java object.
@@ -151,8 +156,6 @@
ErrorCallback write_error_callback_;
std::vector<uint8_t> value_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicAndroid);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
index 60164dd..f8428be 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
@@ -29,6 +29,12 @@
BluetoothRemoteGattCharacteristicMac(
BluetoothRemoteGattServiceMac* gatt_service,
CBCharacteristic* cb_characteristic);
+
+ BluetoothRemoteGattCharacteristicMac(
+ const BluetoothRemoteGattCharacteristicMac&) = delete;
+ BluetoothRemoteGattCharacteristicMac& operator=(
+ const BluetoothRemoteGattCharacteristicMac&) = delete;
+
~BluetoothRemoteGattCharacteristicMac() override;
// Override BluetoothGattCharacteristic methods.
@@ -139,8 +145,6 @@
PendingNotifyCallbacks unsubscribe_from_notification_callbacks_;
base::WeakPtrFactory<BluetoothRemoteGattCharacteristicMac> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicMac);
};
// Stream operator for logging.
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h
index 027b82bd..affe153 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h
@@ -32,6 +32,12 @@
BluetoothRemoteGattServiceWin* parent_service,
BTH_LE_GATT_CHARACTERISTIC* characteristic_info,
scoped_refptr<base::SequencedTaskRunner> ui_task_runner);
+
+ BluetoothRemoteGattCharacteristicWin(
+ const BluetoothRemoteGattCharacteristicWin&) = delete;
+ BluetoothRemoteGattCharacteristicWin& operator=(
+ const BluetoothRemoteGattCharacteristicWin&) = delete;
+
~BluetoothRemoteGattCharacteristicWin() override;
// Override BluetoothRemoteGattCharacteristic interfaces.
@@ -130,7 +136,6 @@
base::WeakPtrFactory<BluetoothRemoteGattCharacteristicWin> weak_ptr_factory_{
this};
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicWin);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_winrt.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_winrt.h
index d700c61..522bd0b5 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_winrt.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_winrt.h
@@ -34,6 +34,12 @@
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::
GenericAttributeProfile::IGattCharacteristic>
characteristic);
+
+ BluetoothRemoteGattCharacteristicWinrt(
+ const BluetoothRemoteGattCharacteristicWinrt&) = delete;
+ BluetoothRemoteGattCharacteristicWinrt& operator=(
+ const BluetoothRemoteGattCharacteristicWinrt&) = delete;
+
~BluetoothRemoteGattCharacteristicWinrt() override;
// BluetoothGattCharacteristic:
@@ -145,8 +151,6 @@
base::WeakPtrFactory<BluetoothRemoteGattCharacteristicWinrt>
weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicWinrt);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor.h b/device/bluetooth/bluetooth_remote_gatt_descriptor.h
index 7925e3a..84857cd 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor.h
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor.h
@@ -30,6 +30,10 @@
class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattDescriptor
: public virtual BluetoothGattDescriptor {
public:
+ BluetoothRemoteGattDescriptor(const BluetoothRemoteGattDescriptor&) = delete;
+ BluetoothRemoteGattDescriptor& operator=(
+ const BluetoothRemoteGattDescriptor&) = delete;
+
~BluetoothRemoteGattDescriptor() override;
// The ValueCallback is used to return the value of a remote characteristic
@@ -67,9 +71,6 @@
protected:
BluetoothRemoteGattDescriptor();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptor);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_android.h b/device/bluetooth/bluetooth_remote_gatt_descriptor_android.h
index de7d019..98ae041d 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_android.h
@@ -35,6 +35,11 @@
const base::android::JavaRef<
jobject>& /* chromeBluetoothDevice */ chrome_bluetooth_device);
+ BluetoothRemoteGattDescriptorAndroid(
+ const BluetoothRemoteGattDescriptorAndroid&) = delete;
+ BluetoothRemoteGattDescriptorAndroid& operator=(
+ const BluetoothRemoteGattDescriptorAndroid&) = delete;
+
~BluetoothRemoteGattDescriptorAndroid() override;
// Returns the associated ChromeBluetoothRemoteGattDescriptor Java object.
@@ -83,8 +88,6 @@
ErrorCallback write_error_callback_;
std::vector<uint8_t> value_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorAndroid);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_win.h b/device/bluetooth/bluetooth_remote_gatt_descriptor_win.h
index f99cde3..579afbd 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_win.h
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_win.h
@@ -29,6 +29,12 @@
BluetoothRemoteGattCharacteristicWin* parent_characteristic,
BTH_LE_GATT_DESCRIPTOR* descriptor_info,
scoped_refptr<base::SequencedTaskRunner>& ui_task_runner);
+
+ BluetoothRemoteGattDescriptorWin(const BluetoothRemoteGattDescriptorWin&) =
+ delete;
+ BluetoothRemoteGattDescriptorWin& operator=(
+ const BluetoothRemoteGattDescriptorWin&) = delete;
+
~BluetoothRemoteGattDescriptorWin() override;
// Override BluetoothRemoteGattDescriptor interfaces.
@@ -62,7 +68,6 @@
base::WeakPtrFactory<BluetoothRemoteGattDescriptorWin> weak_ptr_factory_{
this};
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorWin);
};
} // namespace device.
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_winrt.h b/device/bluetooth/bluetooth_remote_gatt_descriptor_winrt.h
index 049171ea..ea810265 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_winrt.h
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_winrt.h
@@ -32,6 +32,12 @@
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::
GenericAttributeProfile::IGattDescriptor>
descriptor);
+
+ BluetoothRemoteGattDescriptorWinrt(
+ const BluetoothRemoteGattDescriptorWinrt&) = delete;
+ BluetoothRemoteGattDescriptorWinrt& operator=(
+ const BluetoothRemoteGattDescriptorWinrt&) = delete;
+
~BluetoothRemoteGattDescriptorWinrt() override;
// BluetoothGattDescriptor:
@@ -90,8 +96,6 @@
base::WeakPtrFactory<BluetoothRemoteGattDescriptorWinrt> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorWinrt);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_service.h b/device/bluetooth/bluetooth_remote_gatt_service.h
index 97c00b1..e32a6a5 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service.h
+++ b/device/bluetooth/bluetooth_remote_gatt_service.h
@@ -34,6 +34,10 @@
class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattService
: public virtual BluetoothGattService {
public:
+ BluetoothRemoteGattService(const BluetoothRemoteGattService&) = delete;
+ BluetoothRemoteGattService& operator=(const BluetoothRemoteGattService&) =
+ delete;
+
~BluetoothRemoteGattService() override;
// Returns the BluetoothDevice that this GATT service was received from, which
@@ -79,8 +83,6 @@
private:
// Is true if all the characteristics have been discovered.
bool discovery_complete_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattService);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_android.h b/device/bluetooth/bluetooth_remote_gatt_service_android.h
index cf731ba..9a9d839 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_service_android.h
@@ -42,6 +42,11 @@
const base::android::JavaRef<jobject>&
chrome_bluetooth_device); // ChromeBluetoothDevice
+ BluetoothRemoteGattServiceAndroid(const BluetoothRemoteGattServiceAndroid&) =
+ delete;
+ BluetoothRemoteGattServiceAndroid& operator=(
+ const BluetoothRemoteGattServiceAndroid&) = delete;
+
~BluetoothRemoteGattServiceAndroid() override;
// Returns the associated ChromeBluetoothRemoteGattService Java object.
@@ -106,8 +111,6 @@
// Adapter unique instance ID.
std::string instance_id_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceAndroid);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_mac.h b/device/bluetooth/bluetooth_remote_gatt_service_mac.h
index 20bfd73..17d1af6 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_mac.h
+++ b/device/bluetooth/bluetooth_remote_gatt_service_mac.h
@@ -33,6 +33,11 @@
BluetoothLowEnergyDeviceMac* bluetooth_device_mac,
CBService* service,
bool is_primary);
+
+ BluetoothRemoteGattServiceMac(const BluetoothRemoteGattServiceMac&) = delete;
+ BluetoothRemoteGattServiceMac& operator=(
+ const BluetoothRemoteGattServiceMac&) = delete;
+
~BluetoothRemoteGattServiceMac() override;
// BluetoothRemoteGattService override.
@@ -84,8 +89,6 @@
// Increased each time DiscoverCharacteristics() is called. And decreased when
// DidDiscoverCharacteristics() is called.
int discovery_pending_count_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceMac);
};
// Stream operator for logging.
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_win.h b/device/bluetooth/bluetooth_remote_gatt_service_win.h
index 34bf2e3..fb341cb 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_win.h
+++ b/device/bluetooth/bluetooth_remote_gatt_service_win.h
@@ -36,6 +36,11 @@
bool is_primary,
BluetoothRemoteGattServiceWin* parent_service,
scoped_refptr<base::SequencedTaskRunner> ui_task_runner);
+
+ BluetoothRemoteGattServiceWin(const BluetoothRemoteGattServiceWin&) = delete;
+ BluetoothRemoteGattServiceWin& operator=(
+ const BluetoothRemoteGattServiceWin&) = delete;
+
~BluetoothRemoteGattServiceWin() override;
// Override BluetoothRemoteGattService interfaces.
@@ -110,7 +115,6 @@
int discovery_pending_count_ = 0;
base::WeakPtrFactory<BluetoothRemoteGattServiceWin> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceWin);
};
} // namespace device.
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_winrt.h b/device/bluetooth/bluetooth_remote_gatt_service_winrt.h
index 7585293..7d06abd 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_winrt.h
+++ b/device/bluetooth/bluetooth_remote_gatt_service_winrt.h
@@ -34,6 +34,12 @@
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::
GenericAttributeProfile::IGattDeviceService>
gatt_service);
+
+ BluetoothRemoteGattServiceWinrt(const BluetoothRemoteGattServiceWinrt&) =
+ delete;
+ BluetoothRemoteGattServiceWinrt& operator=(
+ const BluetoothRemoteGattServiceWinrt&) = delete;
+
~BluetoothRemoteGattServiceWinrt() override;
// BluetoothRemoteGattService:
@@ -134,8 +140,6 @@
BluetoothUUID uuid_;
uint16_t attribute_handle_;
std::string identifier_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceWinrt);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_rfcomm_channel_mac.h b/device/bluetooth/bluetooth_rfcomm_channel_mac.h
index dee90386..35451c7b 100644
--- a/device/bluetooth/bluetooth_rfcomm_channel_mac.h
+++ b/device/bluetooth/bluetooth_rfcomm_channel_mac.h
@@ -27,6 +27,11 @@
// NOTE: The |channel| is expected to already be retained.
BluetoothRfcommChannelMac(BluetoothSocketMac* socket,
IOBluetoothRFCOMMChannel* channel);
+
+ BluetoothRfcommChannelMac(const BluetoothRfcommChannelMac&) = delete;
+ BluetoothRfcommChannelMac& operator=(const BluetoothRfcommChannelMac&) =
+ delete;
+
~BluetoothRfcommChannelMac() override;
// Opens a new RFCOMM channel with Channel ID |channel_id| to the target
@@ -61,8 +66,6 @@
// The delegate for the native channel.
base::scoped_nsobject<BluetoothRfcommChannelDelegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRfcommChannelMac);
};
} // namespace device
diff --git a/device/bluetooth/bluetooth_task_manager_win.h b/device/bluetooth/bluetooth_task_manager_win.h
index 259ba8d..328b49d 100644
--- a/device/bluetooth/bluetooth_task_manager_win.h
+++ b/device/bluetooth/bluetooth_task_manager_win.h
@@ -55,6 +55,10 @@
struct DEVICE_BLUETOOTH_EXPORT ServiceRecordState {
ServiceRecordState();
+
+ ServiceRecordState(const ServiceRecordState&) = delete;
+ ServiceRecordState& operator=(const ServiceRecordState&) = delete;
+
~ServiceRecordState();
// Properties common to Bluetooth Classic and LE devices.
std::string name;
@@ -68,13 +72,14 @@
// service must use service device path instead of resident device device
// path.
base::FilePath path;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ServiceRecordState);
};
struct DEVICE_BLUETOOTH_EXPORT DeviceState {
DeviceState();
+
+ DeviceState(const DeviceState&) = delete;
+ DeviceState& operator=(const DeviceState&) = delete;
+
~DeviceState();
bool is_bluetooth_classic() const { return path.empty(); }
@@ -90,9 +95,6 @@
uint32_t bluetooth_class;
// Properties specific to Bluetooth LE devices.
base::FilePath path;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeviceState);
};
class DEVICE_BLUETOOTH_EXPORT Observer {
diff --git a/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h b/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h
index 583ed4b..8b8804f5 100644
--- a/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h
@@ -48,6 +48,10 @@
ProfileRegisteredCallback success_callback,
bluez::BluetoothProfileManagerClient::ErrorCallback error_callback);
+ BluetoothAdapterProfileBlueZ(const BluetoothAdapterProfileBlueZ&) = delete;
+ BluetoothAdapterProfileBlueZ& operator=(const BluetoothAdapterProfileBlueZ&) =
+ delete;
+
~BluetoothAdapterProfileBlueZ() override;
// The object path of the profile.
@@ -106,8 +110,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothAdapterProfileBlueZ> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterProfileBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
index 6a9486d..76330b3 100644
--- a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
@@ -149,6 +149,10 @@
class FakeBleScanParserImpl : public data_decoder::mojom::BleScanParser {
public:
FakeBleScanParserImpl() = default;
+
+ FakeBleScanParserImpl(const FakeBleScanParserImpl&) = delete;
+ FakeBleScanParserImpl& operator=(const FakeBleScanParserImpl&) = delete;
+
~FakeBleScanParserImpl() override = default;
// mojom::BleScanParser:
@@ -156,8 +160,6 @@
ParseCallback callback) override {
std::move(callback).Run(nullptr);
}
-
- DISALLOW_COPY_AND_ASSIGN(FakeBleScanParserImpl);
};
#endif
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.h b/device/bluetooth/bluez/bluetooth_device_bluez.h
index 48c54cb..048951f 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.h
@@ -50,6 +50,9 @@
using GetServiceRecordsErrorCallback =
base::OnceCallback<void(BluetoothServiceRecordBlueZ::ErrorCode)>;
+ BluetoothDeviceBlueZ(const BluetoothDeviceBlueZ&) = delete;
+ BluetoothDeviceBlueZ& operator=(const BluetoothDeviceBlueZ&) = delete;
+
~BluetoothDeviceBlueZ() override;
// BluetoothDevice override
@@ -309,8 +312,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothDeviceBlueZ> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/bluez/bluetooth_gatt_connection_bluez.h b/device/bluetooth/bluez/bluetooth_gatt_connection_bluez.h
index 91504b2..1a7a4c0f 100644
--- a/device/bluetooth/bluez/bluetooth_gatt_connection_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_gatt_connection_bluez.h
@@ -32,6 +32,11 @@
scoped_refptr<device::BluetoothAdapter> adapter,
const std::string& device_address,
const dbus::ObjectPath& object_path);
+
+ BluetoothGattConnectionBlueZ(const BluetoothGattConnectionBlueZ&) = delete;
+ BluetoothGattConnectionBlueZ& operator=(const BluetoothGattConnectionBlueZ&) =
+ delete;
+
~BluetoothGattConnectionBlueZ() override;
// BluetoothGattConnection overrides.
@@ -50,8 +55,6 @@
// D-Bus object path of the underlying device. This is used to filter observer
// events.
dbus::ObjectPath object_path_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattConnectionBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h
index 5bf6c40..ed0fe069 100644
--- a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h
@@ -32,6 +32,12 @@
Properties properties,
Permissions permissions,
BluetoothLocalGattServiceBlueZ* service);
+
+ BluetoothLocalGattCharacteristicBlueZ(
+ const BluetoothLocalGattCharacteristicBlueZ&) = delete;
+ BluetoothLocalGattCharacteristicBlueZ& operator=(
+ const BluetoothLocalGattCharacteristicBlueZ&) = delete;
+
~BluetoothLocalGattCharacteristicBlueZ() override;
// device::BluetoothGattCharacteristic overrides:
@@ -76,8 +82,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothLocalGattCharacteristicBlueZ> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattCharacteristicBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
index 261ae25..7283da4 100644
--- a/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
@@ -27,6 +27,12 @@
const device::BluetoothUUID& uuid,
device::BluetoothGattCharacteristic::Permissions permissions,
BluetoothLocalGattCharacteristicBlueZ* characteristic);
+
+ BluetoothLocalGattDescriptorBlueZ(const BluetoothLocalGattDescriptorBlueZ&) =
+ delete;
+ BluetoothLocalGattDescriptorBlueZ& operator=(
+ const BluetoothLocalGattDescriptorBlueZ&) = delete;
+
~BluetoothLocalGattDescriptorBlueZ() override;
// device::BluetoothLocalGattDescriptor overrides.
@@ -52,8 +58,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothLocalGattDescriptorBlueZ> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattDescriptorBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h b/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h
index 7c30ba45..2fde43f5 100644
--- a/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h
@@ -33,6 +33,11 @@
bool is_primary,
device::BluetoothLocalGattService::Delegate* delegate);
+ BluetoothLocalGattServiceBlueZ(const BluetoothLocalGattServiceBlueZ&) =
+ delete;
+ BluetoothLocalGattServiceBlueZ& operator=(
+ const BluetoothLocalGattServiceBlueZ&) = delete;
+
~BluetoothLocalGattServiceBlueZ() override;
// device::BluetoothGattService overrides.
@@ -89,8 +94,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothLocalGattServiceBlueZ> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattServiceBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/bluez/bluetooth_pairing_bluez.h b/device/bluetooth/bluez/bluetooth_pairing_bluez.h
index 8b1d988f..8cfbd676 100644
--- a/device/bluetooth/bluez/bluetooth_pairing_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_pairing_bluez.h
@@ -24,6 +24,10 @@
BluetoothPairingBlueZ(
BluetoothDeviceBlueZ* device,
device::BluetoothDevice::PairingDelegate* pairing_delegate);
+
+ BluetoothPairingBlueZ(const BluetoothPairingBlueZ&) = delete;
+ BluetoothPairingBlueZ& operator=(const BluetoothPairingBlueZ&) = delete;
+
~BluetoothPairingBlueZ();
// Indicates whether the device is currently pairing and expecting a
@@ -142,8 +146,6 @@
passkey_callback_;
bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback
confirmation_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothPairingBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
index 7fc989f..c7ff670 100644
--- a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
@@ -45,6 +45,11 @@
public BluetoothGattDescriptorClient::Observer,
public device::BluetoothRemoteGattCharacteristic {
public:
+ BluetoothRemoteGattCharacteristicBlueZ(
+ const BluetoothRemoteGattCharacteristicBlueZ&) = delete;
+ BluetoothRemoteGattCharacteristicBlueZ& operator=(
+ const BluetoothRemoteGattCharacteristicBlueZ&) = delete;
+
// device::BluetoothGattCharacteristic overrides.
~BluetoothRemoteGattCharacteristicBlueZ() override;
device::BluetoothUUID GetUUID() const override;
@@ -146,8 +151,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothRemoteGattCharacteristicBlueZ>
weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h b/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h
index 743c008..027af754 100644
--- a/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h
@@ -28,6 +28,11 @@
: public BluetoothGattDescriptorBlueZ,
public device::BluetoothRemoteGattDescriptor {
public:
+ BluetoothRemoteGattDescriptorBlueZ(
+ const BluetoothRemoteGattDescriptorBlueZ&) = delete;
+ BluetoothRemoteGattDescriptorBlueZ& operator=(
+ const BluetoothRemoteGattDescriptorBlueZ&) = delete;
+
// device::BluetoothRemoteGattDescriptor overrides.
~BluetoothRemoteGattDescriptorBlueZ() override;
device::BluetoothUUID GetUUID() const override;
@@ -66,8 +71,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothRemoteGattDescriptorBlueZ> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h b/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h
index 3d288d8..c8c77f10 100644
--- a/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h
@@ -41,6 +41,11 @@
public BluetoothGattCharacteristicClient::Observer,
public device::BluetoothRemoteGattService {
public:
+ BluetoothRemoteGattServiceBlueZ(const BluetoothRemoteGattServiceBlueZ&) =
+ delete;
+ BluetoothRemoteGattServiceBlueZ& operator=(
+ const BluetoothRemoteGattServiceBlueZ&) = delete;
+
~BluetoothRemoteGattServiceBlueZ() override;
// device::BluetoothRemoteGattService overrides.
@@ -99,8 +104,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothRemoteGattServiceBlueZ> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceBlueZ);
};
} // namespace bluez
diff --git a/device/bluetooth/cast/bluetooth_adapter_cast_unittest.cc b/device/bluetooth/cast/bluetooth_adapter_cast_unittest.cc
index 03e4360..f1b61eef 100644
--- a/device/bluetooth/cast/bluetooth_adapter_cast_unittest.cc
+++ b/device/bluetooth/cast/bluetooth_adapter_cast_unittest.cc
@@ -15,14 +15,16 @@
class BluetoothAdapterCastTest : public testing::Test {
public:
BluetoothAdapterCastTest() = default;
+
+ BluetoothAdapterCastTest(const BluetoothAdapterCastTest&) = delete;
+ BluetoothAdapterCastTest& operator=(const BluetoothAdapterCastTest&) = delete;
+
~BluetoothAdapterCastTest() override {
BluetoothAdapterCast::ResetFactoryForTest();
}
private:
base::test::TaskEnvironment task_environment_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterCastTest);
};
TEST_F(BluetoothAdapterCastTest, TestSetFactory) {
diff --git a/device/bluetooth/cast/bluetooth_device_cast.h b/device/bluetooth/cast/bluetooth_device_cast.h
index 73cdee7..76a1d0b 100644
--- a/device/bluetooth/cast/bluetooth_device_cast.h
+++ b/device/bluetooth/cast/bluetooth_device_cast.h
@@ -33,6 +33,10 @@
BluetoothDeviceCast(
BluetoothAdapter* adapter,
scoped_refptr<chromecast::bluetooth::RemoteDevice> device);
+
+ BluetoothDeviceCast(const BluetoothDeviceCast&) = delete;
+ BluetoothDeviceCast& operator=(const BluetoothDeviceCast&) = delete;
+
~BluetoothDeviceCast() override;
// BluetoothDevice implementation:
@@ -133,8 +137,6 @@
absl::optional<std::string> name_;
base::WeakPtrFactory<BluetoothDeviceCast> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceCast);
};
} // namespace device
diff --git a/device/bluetooth/cast/bluetooth_remote_gatt_characteristic_cast.h b/device/bluetooth/cast/bluetooth_remote_gatt_characteristic_cast.h
index dd297da..e65eaa41 100644
--- a/device/bluetooth/cast/bluetooth_remote_gatt_characteristic_cast.h
+++ b/device/bluetooth/cast/bluetooth_remote_gatt_characteristic_cast.h
@@ -34,6 +34,12 @@
BluetoothRemoteGattServiceCast* service,
scoped_refptr<chromecast::bluetooth::RemoteCharacteristic>
characteristic);
+
+ BluetoothRemoteGattCharacteristicCast(
+ const BluetoothRemoteGattCharacteristicCast&) = delete;
+ BluetoothRemoteGattCharacteristicCast& operator=(
+ const BluetoothRemoteGattCharacteristicCast&) = delete;
+
~BluetoothRemoteGattCharacteristicCast() override;
// BluetoothGattCharacteristic implementation:
@@ -94,8 +100,6 @@
std::vector<uint8_t> value_;
base::WeakPtrFactory<BluetoothRemoteGattCharacteristicCast> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicCast);
};
} // namespace device
diff --git a/device/bluetooth/cast/bluetooth_remote_gatt_descriptor_cast.h b/device/bluetooth/cast/bluetooth_remote_gatt_descriptor_cast.h
index f799cb0..8b2d37f 100644
--- a/device/bluetooth/cast/bluetooth_remote_gatt_descriptor_cast.h
+++ b/device/bluetooth/cast/bluetooth_remote_gatt_descriptor_cast.h
@@ -30,6 +30,12 @@
BluetoothRemoteGattDescriptorCast(
BluetoothRemoteGattCharacteristicCast* characteristic,
scoped_refptr<chromecast::bluetooth::RemoteDescriptor> remote_descriptor);
+
+ BluetoothRemoteGattDescriptorCast(const BluetoothRemoteGattDescriptorCast&) =
+ delete;
+ BluetoothRemoteGattDescriptorCast& operator=(
+ const BluetoothRemoteGattDescriptorCast&) = delete;
+
~BluetoothRemoteGattDescriptorCast() override;
// BluetoothGattDescriptor implementation:
@@ -69,7 +75,6 @@
std::vector<uint8_t> value_;
base::WeakPtrFactory<BluetoothRemoteGattDescriptorCast> weak_factory_;
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorCast);
};
} // namespace device
diff --git a/device/bluetooth/cast/bluetooth_remote_gatt_service_cast.h b/device/bluetooth/cast/bluetooth_remote_gatt_service_cast.h
index 8280cac..0741aeee 100644
--- a/device/bluetooth/cast/bluetooth_remote_gatt_service_cast.h
+++ b/device/bluetooth/cast/bluetooth_remote_gatt_service_cast.h
@@ -29,6 +29,12 @@
BluetoothRemoteGattServiceCast(
BluetoothDeviceCast* device,
scoped_refptr<chromecast::bluetooth::RemoteService> remote_service);
+
+ BluetoothRemoteGattServiceCast(const BluetoothRemoteGattServiceCast&) =
+ delete;
+ BluetoothRemoteGattServiceCast& operator=(
+ const BluetoothRemoteGattServiceCast&) = delete;
+
~BluetoothRemoteGattServiceCast() override;
// BluetoothGattService implementation:
@@ -43,8 +49,6 @@
private:
BluetoothDeviceCast* const device_;
scoped_refptr<chromecast::bluetooth::RemoteService> remote_service_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceCast);
};
} // namespace device
diff --git a/device/bluetooth/dbus/bluetooth_adapter_client.cc b/device/bluetooth/dbus/bluetooth_adapter_client.cc
index 16e1ea6d..ae31740 100644
--- a/device/bluetooth/dbus/bluetooth_adapter_client.cc
+++ b/device/bluetooth/dbus/bluetooth_adapter_client.cc
@@ -196,6 +196,10 @@
public:
BluetoothAdapterClientImpl() = default;
+ BluetoothAdapterClientImpl(const BluetoothAdapterClientImpl&) = delete;
+ BluetoothAdapterClientImpl& operator=(const BluetoothAdapterClientImpl&) =
+ delete;
+
~BluetoothAdapterClientImpl() override {
// There is an instance of this client that is created but not initialized
// on Linux. See 'Alternate D-Bus Client' note in bluez_dbus_manager.h.
@@ -607,8 +611,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothAdapterClientImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClientImpl);
};
BluetoothAdapterClient::BluetoothAdapterClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_adapter_client.h b/device/bluetooth/dbus/bluetooth_adapter_client.h
index 9046680..ce2f55ae 100644
--- a/device/bluetooth/dbus/bluetooth_adapter_client.h
+++ b/device/bluetooth/dbus/bluetooth_adapter_client.h
@@ -39,6 +39,10 @@
// method.
struct DiscoveryFilter {
DiscoveryFilter();
+
+ DiscoveryFilter(const DiscoveryFilter&) = delete;
+ DiscoveryFilter& operator=(const DiscoveryFilter&) = delete;
+
~DiscoveryFilter();
// Copy content of |filter| into this filter
@@ -48,9 +52,6 @@
std::unique_ptr<int16_t> rssi;
std::unique_ptr<uint16_t> pathloss;
std::unique_ptr<std::string> transport;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DiscoveryFilter);
};
// Represent an error sent through DBus.
@@ -136,6 +137,9 @@
const std::string& property_name) {}
};
+ BluetoothAdapterClient(const BluetoothAdapterClient&) = delete;
+ BluetoothAdapterClient& operator=(const BluetoothAdapterClient&) = delete;
+
~BluetoothAdapterClient() override;
// Adds and removes observers for events on all local bluetooth
@@ -238,9 +242,6 @@
protected:
BluetoothAdapterClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_agent_manager_client.cc b/device/bluetooth/dbus/bluetooth_agent_manager_client.cc
index b760e86..37458e8 100644
--- a/device/bluetooth/dbus/bluetooth_agent_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_agent_manager_client.cc
@@ -26,6 +26,11 @@
public:
BluetoothAgentManagerClientImpl() {}
+ BluetoothAgentManagerClientImpl(const BluetoothAgentManagerClientImpl&) =
+ delete;
+ BluetoothAgentManagerClientImpl& operator=(
+ const BluetoothAgentManagerClientImpl&) = delete;
+
~BluetoothAgentManagerClientImpl() override = default;
// BluetoothAgentManagerClient override.
@@ -180,8 +185,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothAgentManagerClientImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothAgentManagerClientImpl);
};
BluetoothAgentManagerClient::BluetoothAgentManagerClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_agent_manager_client.h b/device/bluetooth/dbus/bluetooth_agent_manager_client.h
index 3684c24..02ca5a17 100644
--- a/device/bluetooth/dbus/bluetooth_agent_manager_client.h
+++ b/device/bluetooth/dbus/bluetooth_agent_manager_client.h
@@ -36,6 +36,10 @@
virtual void AgentManagerRemoved(const dbus::ObjectPath& object_path) {}
};
+ BluetoothAgentManagerClient(const BluetoothAgentManagerClient&) = delete;
+ BluetoothAgentManagerClient& operator=(const BluetoothAgentManagerClient&) =
+ delete;
+
~BluetoothAgentManagerClient() override;
// Adds and removes observers for events on agent manager.
@@ -79,9 +83,6 @@
protected:
BluetoothAgentManagerClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothAgentManagerClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_agent_service_provider.cc b/device/bluetooth/dbus/bluetooth_agent_service_provider.cc
index 2ab3ba62..51e90b3 100644
--- a/device/bluetooth/dbus/bluetooth_agent_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_agent_service_provider.cc
@@ -109,6 +109,11 @@
weak_ptr_factory_.GetWeakPtr()));
}
+ BluetoothAgentServiceProviderImpl(const BluetoothAgentServiceProviderImpl&) =
+ delete;
+ BluetoothAgentServiceProviderImpl& operator=(
+ const BluetoothAgentServiceProviderImpl&) = delete;
+
~BluetoothAgentServiceProviderImpl() override {
DVLOG(1) << "Cleaning up Bluetooth Agent: " << object_path_.value();
@@ -441,8 +446,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothAgentServiceProviderImpl> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothAgentServiceProviderImpl);
};
BluetoothAgentServiceProvider::BluetoothAgentServiceProvider() = default;
diff --git a/device/bluetooth/dbus/bluetooth_agent_service_provider.h b/device/bluetooth/dbus/bluetooth_agent_service_provider.h
index 5238b14..707eac8b 100644
--- a/device/bluetooth/dbus/bluetooth_agent_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_agent_service_provider.h
@@ -157,6 +157,10 @@
virtual void Cancel() = 0;
};
+ BluetoothAgentServiceProvider(const BluetoothAgentServiceProvider&) = delete;
+ BluetoothAgentServiceProvider& operator=(
+ const BluetoothAgentServiceProvider&) = delete;
+
virtual ~BluetoothAgentServiceProvider();
// Creates the instance where |bus| is the D-Bus bus connection to export
@@ -170,9 +174,6 @@
protected:
BluetoothAgentServiceProvider();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothAgentServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_battery_client.cc b/device/bluetooth/dbus/bluetooth_battery_client.cc
index a84868c..e120af2 100644
--- a/device/bluetooth/dbus/bluetooth_battery_client.cc
+++ b/device/bluetooth/dbus/bluetooth_battery_client.cc
@@ -33,6 +33,10 @@
public:
BluetoothBatteryClientImpl() = default;
+ BluetoothBatteryClientImpl(const BluetoothBatteryClientImpl&) = delete;
+ BluetoothBatteryClientImpl& operator=(const BluetoothBatteryClientImpl&) =
+ delete;
+
~BluetoothBatteryClientImpl() override {
// There is an instance of this client that is created but not initialized
// on Linux. See 'Alternate D-Bus Client' note in bluez_dbus_manager.h.
@@ -118,8 +122,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothBatteryClientImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothBatteryClientImpl);
};
BluetoothBatteryClient::BluetoothBatteryClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_battery_client.h b/device/bluetooth/dbus/bluetooth_battery_client.h
index 472ceac8..e9bb795 100644
--- a/device/bluetooth/dbus/bluetooth_battery_client.h
+++ b/device/bluetooth/dbus/bluetooth_battery_client.h
@@ -53,6 +53,9 @@
const std::string& property_name) {}
};
+ BluetoothBatteryClient(const BluetoothBatteryClient&) = delete;
+ BluetoothBatteryClient& operator=(const BluetoothBatteryClient&) = delete;
+
~BluetoothBatteryClient() override;
// Adds and removes observers for events on all remote bluetooth
@@ -70,9 +73,6 @@
protected:
BluetoothBatteryClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothBatteryClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_dbus_client_bundle.h b/device/bluetooth/dbus/bluetooth_dbus_client_bundle.h
index cab86dd..440f8b3 100644
--- a/device/bluetooth/dbus/bluetooth_dbus_client_bundle.h
+++ b/device/bluetooth/dbus/bluetooth_dbus_client_bundle.h
@@ -34,6 +34,11 @@
class DEVICE_BLUETOOTH_EXPORT BluetoothDBusClientBundle {
public:
explicit BluetoothDBusClientBundle(bool use_fakes);
+
+ BluetoothDBusClientBundle(const BluetoothDBusClientBundle&) = delete;
+ BluetoothDBusClientBundle& operator=(const BluetoothDBusClientBundle&) =
+ delete;
+
~BluetoothDBusClientBundle();
// Returns true if |client| is stubbed.
@@ -133,8 +138,6 @@
// See "Alternate D-Bus Client" note in bluez_dbus_manager.h.
std::unique_ptr<BluetoothAdapterClient> alternate_bluetooth_adapter_client_;
std::unique_ptr<BluetoothDeviceClient> alternate_bluetooth_device_client_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDBusClientBundle);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_debug_manager_client.cc b/device/bluetooth/dbus/bluetooth_debug_manager_client.cc
index f879615..337b36c 100644
--- a/device/bluetooth/dbus/bluetooth_debug_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_debug_manager_client.cc
@@ -36,6 +36,11 @@
public:
BluetoothDebugManagerClientImpl() = default;
+ BluetoothDebugManagerClientImpl(const BluetoothDebugManagerClientImpl&) =
+ delete;
+ BluetoothDebugManagerClientImpl& operator=(
+ const BluetoothDebugManagerClientImpl&) = delete;
+
~BluetoothDebugManagerClientImpl() override = default;
// BluetoothDebugManagerClient override.
@@ -122,8 +127,6 @@
dbus::ObjectManager* object_manager_;
base::WeakPtrFactory<BluetoothDebugManagerClientImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDebugManagerClientImpl);
};
BluetoothDebugManagerClient::BluetoothDebugManagerClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_debug_manager_client.h b/device/bluetooth/dbus/bluetooth_debug_manager_client.h
index c830287..3b6b46ed 100644
--- a/device/bluetooth/dbus/bluetooth_debug_manager_client.h
+++ b/device/bluetooth/dbus/bluetooth_debug_manager_client.h
@@ -21,6 +21,10 @@
class DEVICE_BLUETOOTH_EXPORT BluetoothDebugManagerClient
: public BluezDBusClient {
public:
+ BluetoothDebugManagerClient(const BluetoothDebugManagerClient&) = delete;
+ BluetoothDebugManagerClient& operator=(const BluetoothDebugManagerClient&) =
+ delete;
+
~BluetoothDebugManagerClient() override;
// The ErrorCallback is used by debug manager methods to indicate failure.
@@ -47,9 +51,6 @@
protected:
BluetoothDebugManagerClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothDebugManagerClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_device_client.cc b/device/bluetooth/dbus/bluetooth_device_client.cc
index c7d6980..d8251e6 100644
--- a/device/bluetooth/dbus/bluetooth_device_client.cc
+++ b/device/bluetooth/dbus/bluetooth_device_client.cc
@@ -225,6 +225,10 @@
public:
BluetoothDeviceClientImpl() : object_manager_(nullptr) {}
+ BluetoothDeviceClientImpl(const BluetoothDeviceClientImpl&) = delete;
+ BluetoothDeviceClientImpl& operator=(const BluetoothDeviceClientImpl&) =
+ delete;
+
~BluetoothDeviceClientImpl() override {
// There is an instance of this client that is created but not initialized
// on Linux. See 'Alternate D-Bus Client' note in bluez_dbus_manager.h.
@@ -746,8 +750,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothDeviceClientImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceClientImpl);
};
BluetoothDeviceClient::BluetoothDeviceClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_device_client.h b/device/bluetooth/dbus/bluetooth_device_client.h
index a7a28e6..17ac8415 100644
--- a/device/bluetooth/dbus/bluetooth_device_client.h
+++ b/device/bluetooth/dbus/bluetooth_device_client.h
@@ -176,6 +176,9 @@
const std::string& property_name) {}
};
+ BluetoothDeviceClient(const BluetoothDeviceClient&) = delete;
+ BluetoothDeviceClient& operator=(const BluetoothDeviceClient&) = delete;
+
~BluetoothDeviceClient() override;
// Adds and removes observers for events on all remote bluetooth
@@ -296,9 +299,6 @@
protected:
BluetoothDeviceClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h
index adfff73..d25fee3 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h
@@ -26,6 +26,11 @@
// hierarchies.
class DEVICE_BLUETOOTH_EXPORT BluetoothGattApplicationServiceProvider {
public:
+ BluetoothGattApplicationServiceProvider(
+ const BluetoothGattApplicationServiceProvider&) = delete;
+ BluetoothGattApplicationServiceProvider& operator=(
+ const BluetoothGattApplicationServiceProvider&) = delete;
+
virtual ~BluetoothGattApplicationServiceProvider();
// Creates individual service providers for all the attributes managed by the
@@ -63,9 +68,6 @@
// List of GATT Descriptor service providers managed by this object manager.
std::vector<std::unique_ptr<BluetoothGattDescriptorServiceProvider>>
descriptor_providers_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattApplicationServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.h b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.h
index 701dd22..63d398c94 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.h
@@ -39,6 +39,12 @@
const dbus::ObjectPath& object_path,
const std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>&
services);
+
+ BluetoothGattApplicationServiceProviderImpl(
+ const BluetoothGattApplicationServiceProviderImpl&) = delete;
+ BluetoothGattApplicationServiceProviderImpl& operator=(
+ const BluetoothGattApplicationServiceProviderImpl&) = delete;
+
~BluetoothGattApplicationServiceProviderImpl() override;
private:
@@ -98,8 +104,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothGattApplicationServiceProviderImpl>
weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattApplicationServiceProviderImpl);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_attribute_value_delegate.h b/device/bluetooth/dbus/bluetooth_gatt_attribute_value_delegate.h
index 13c0efc7e..14f3cb1 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_attribute_value_delegate.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_attribute_value_delegate.h
@@ -30,6 +30,12 @@
public:
explicit BluetoothGattAttributeValueDelegate(
BluetoothLocalGattServiceBlueZ* service);
+
+ BluetoothGattAttributeValueDelegate(
+ const BluetoothGattAttributeValueDelegate&) = delete;
+ BluetoothGattAttributeValueDelegate& operator=(
+ const BluetoothGattAttributeValueDelegate&) = delete;
+
virtual ~BluetoothGattAttributeValueDelegate();
// This method will be called when a remote device requests to read the
@@ -93,8 +99,6 @@
private:
const BluetoothLocalGattServiceBlueZ* service_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattAttributeValueDelegate);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
index 23e2521..c9b5adf 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
@@ -50,6 +50,11 @@
public:
BluetoothGattCharacteristicClientImpl() : object_manager_(nullptr) {}
+ BluetoothGattCharacteristicClientImpl(
+ const BluetoothGattCharacteristicClientImpl&) = delete;
+ BluetoothGattCharacteristicClientImpl& operator=(
+ const BluetoothGattCharacteristicClientImpl&) = delete;
+
~BluetoothGattCharacteristicClientImpl() override {
object_manager_->UnregisterInterface(
bluetooth_gatt_characteristic::kBluetoothGattCharacteristicInterface);
@@ -343,8 +348,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothGattCharacteristicClientImpl> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicClientImpl);
};
BluetoothGattCharacteristicClient::BluetoothGattCharacteristicClient() =
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h
index cbebcdc..24ffaf0 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h
@@ -85,6 +85,11 @@
absl::optional<device::BluetoothGattService::GattErrorCode> error_code,
const std::vector<uint8_t>& value)>;
+ BluetoothGattCharacteristicClient(const BluetoothGattCharacteristicClient&) =
+ delete;
+ BluetoothGattCharacteristicClient& operator=(
+ const BluetoothGattCharacteristicClient&) = delete;
+
~BluetoothGattCharacteristicClient() override;
// Adds and removes observers for events on all remote GATT characteristics.
@@ -156,9 +161,6 @@
protected:
BluetoothGattCharacteristicClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h
index 041467e..139afca 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h
@@ -34,6 +34,11 @@
// "Value" property.
class DEVICE_BLUETOOTH_EXPORT BluetoothGattCharacteristicServiceProvider {
public:
+ BluetoothGattCharacteristicServiceProvider(
+ const BluetoothGattCharacteristicServiceProvider&) = delete;
+ BluetoothGattCharacteristicServiceProvider& operator=(
+ const BluetoothGattCharacteristicServiceProvider&) = delete;
+
virtual ~BluetoothGattCharacteristicServiceProvider();
// Send a PropertyChanged signal to notify the Bluetooth daemon that the value
@@ -71,9 +76,6 @@
protected:
BluetoothGattCharacteristicServiceProvider();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.h b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.h
index 7bd8b416..a0a7bd62 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.h
@@ -38,6 +38,11 @@
const std::vector<std::string>& flags,
const dbus::ObjectPath& service_path);
+ BluetoothGattCharacteristicServiceProviderImpl(
+ const BluetoothGattCharacteristicServiceProviderImpl&) = delete;
+ BluetoothGattCharacteristicServiceProviderImpl& operator=(
+ const BluetoothGattCharacteristicServiceProviderImpl&) = delete;
+
~BluetoothGattCharacteristicServiceProviderImpl() override;
// BluetoothGattCharacteristicServiceProvider override.
@@ -163,8 +168,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothGattCharacteristicServiceProviderImpl>
weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicServiceProviderImpl);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
index 1ced400c..f09b74c 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
@@ -53,6 +53,11 @@
public:
BluetoothGattDescriptorClientImpl() : object_manager_(nullptr) {}
+ BluetoothGattDescriptorClientImpl(const BluetoothGattDescriptorClientImpl&) =
+ delete;
+ BluetoothGattDescriptorClientImpl& operator=(
+ const BluetoothGattDescriptorClientImpl&) = delete;
+
~BluetoothGattDescriptorClientImpl() override {
object_manager_->UnregisterInterface(
bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface);
@@ -252,8 +257,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothGattDescriptorClientImpl> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorClientImpl);
};
BluetoothGattDescriptorClient::BluetoothGattDescriptorClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h
index 45c94b1..ca7b7e4c 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h
@@ -74,6 +74,10 @@
absl::optional<device::BluetoothGattService::GattErrorCode> error_code,
const std::vector<uint8_t>& value)>;
+ BluetoothGattDescriptorClient(const BluetoothGattDescriptorClient&) = delete;
+ BluetoothGattDescriptorClient& operator=(
+ const BluetoothGattDescriptorClient&) = delete;
+
~BluetoothGattDescriptorClient() override;
// Adds and removes observers for events on all remote GATT descriptors. Check
@@ -113,9 +117,6 @@
protected:
BluetoothGattDescriptorClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h
index 98bc7f1c..12f42d9 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h
@@ -34,6 +34,11 @@
// "Value" property.
class DEVICE_BLUETOOTH_EXPORT BluetoothGattDescriptorServiceProvider {
public:
+ BluetoothGattDescriptorServiceProvider(
+ const BluetoothGattDescriptorServiceProvider&) = delete;
+ BluetoothGattDescriptorServiceProvider& operator=(
+ const BluetoothGattDescriptorServiceProvider&) = delete;
+
virtual ~BluetoothGattDescriptorServiceProvider();
// Send a PropertyChanged signal to notify the Bluetooth daemon that the value
@@ -70,9 +75,6 @@
protected:
BluetoothGattDescriptorServiceProvider();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.h b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.h
index eb449d3..f1d0caed 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.h
@@ -34,6 +34,12 @@
const std::string& uuid,
const std::vector<std::string>& flags,
const dbus::ObjectPath& characteristic_path);
+
+ BluetoothGattDescriptorServiceProviderImpl(
+ const BluetoothGattDescriptorServiceProviderImpl&) = delete;
+ BluetoothGattDescriptorServiceProviderImpl& operator=(
+ const BluetoothGattDescriptorServiceProviderImpl&) = delete;
+
~BluetoothGattDescriptorServiceProviderImpl() override;
// BluetoothGattDescriptorServiceProvider override.
@@ -131,8 +137,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothGattDescriptorServiceProviderImpl>
weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorServiceProviderImpl);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc b/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc
index 02fc937..9b4531c4 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc
@@ -33,6 +33,11 @@
public:
BluetoothGattManagerClientImpl() : object_manager_(nullptr) {}
+ BluetoothGattManagerClientImpl(const BluetoothGattManagerClientImpl&) =
+ delete;
+ BluetoothGattManagerClientImpl& operator=(
+ const BluetoothGattManagerClientImpl&) = delete;
+
~BluetoothGattManagerClientImpl() override = default;
// BluetoothGattManagerClient override.
@@ -153,8 +158,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothGattManagerClientImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattManagerClientImpl);
};
BluetoothGattManagerClient::BluetoothGattManagerClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_gatt_manager_client.h b/device/bluetooth/dbus/bluetooth_gatt_manager_client.h
index 102ac6a..c54bfd8 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_manager_client.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_manager_client.h
@@ -26,6 +26,10 @@
// later as we know more about how this will be used.
};
+ BluetoothGattManagerClient(const BluetoothGattManagerClient&) = delete;
+ BluetoothGattManagerClient& operator=(const BluetoothGattManagerClient&) =
+ delete;
+
~BluetoothGattManagerClient() override;
// The ErrorCallback is used by GATT manager methods to indicate failure. It
@@ -69,9 +73,6 @@
protected:
BluetoothGattManagerClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattManagerClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_client.cc b/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
index 2ea601b..af1de99 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
@@ -34,6 +34,11 @@
public:
BluetoothGattServiceClientImpl() : object_manager_(nullptr) {}
+ BluetoothGattServiceClientImpl(const BluetoothGattServiceClientImpl&) =
+ delete;
+ BluetoothGattServiceClientImpl& operator=(
+ const BluetoothGattServiceClientImpl&) = delete;
+
~BluetoothGattServiceClientImpl() override {
object_manager_->UnregisterInterface(
bluetooth_gatt_service::kBluetoothGattServiceInterface);
@@ -127,8 +132,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothGattServiceClientImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceClientImpl);
};
BluetoothGattServiceClient::BluetoothGattServiceClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_client.h b/device/bluetooth/dbus/bluetooth_gatt_service_client.h
index f0dd162..6f9d3e0 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_service_client.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_service_client.h
@@ -61,6 +61,10 @@
const std::string& property_name) {}
};
+ BluetoothGattServiceClient(const BluetoothGattServiceClient&) = delete;
+ BluetoothGattServiceClient& operator=(const BluetoothGattServiceClient&) =
+ delete;
+
~BluetoothGattServiceClient() override;
// Adds and removes observers for events on all remote GATT services. Check
@@ -81,9 +85,6 @@
protected:
BluetoothGattServiceClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h
index cc112c8..203999c0 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h
@@ -28,6 +28,11 @@
// providers before registering a GATT service with the Bluetooth daemon.
class DEVICE_BLUETOOTH_EXPORT BluetoothGattServiceServiceProvider {
public:
+ BluetoothGattServiceServiceProvider(
+ const BluetoothGattServiceServiceProvider&) = delete;
+ BluetoothGattServiceServiceProvider& operator=(
+ const BluetoothGattServiceServiceProvider&) = delete;
+
virtual ~BluetoothGattServiceServiceProvider();
// Writes an array of the service's properties into the provided writer.
@@ -50,9 +55,6 @@
protected:
BluetoothGattServiceServiceProvider();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h
index eb68394..e9be0fc 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h
@@ -33,6 +33,11 @@
bool is_primary,
const std::vector<dbus::ObjectPath>& includes);
+ BluetoothGattServiceServiceProviderImpl(
+ const BluetoothGattServiceServiceProviderImpl&) = delete;
+ BluetoothGattServiceServiceProviderImpl& operator=(
+ const BluetoothGattServiceServiceProviderImpl&) = delete;
+
~BluetoothGattServiceServiceProviderImpl() override;
private:
@@ -93,8 +98,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothGattServiceServiceProviderImpl>
weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceServiceProviderImpl);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_input_client.cc b/device/bluetooth/dbus/bluetooth_input_client.cc
index af417df6..428e35e 100644
--- a/device/bluetooth/dbus/bluetooth_input_client.cc
+++ b/device/bluetooth/dbus/bluetooth_input_client.cc
@@ -34,6 +34,9 @@
public:
BluetoothInputClientImpl() : object_manager_(nullptr) {}
+ BluetoothInputClientImpl(const BluetoothInputClientImpl&) = delete;
+ BluetoothInputClientImpl& operator=(const BluetoothInputClientImpl&) = delete;
+
~BluetoothInputClientImpl() override {
object_manager_->UnregisterInterface(
bluetooth_input::kBluetoothInputInterface);
@@ -115,8 +118,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothInputClientImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothInputClientImpl);
};
BluetoothInputClient::BluetoothInputClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_input_client.h b/device/bluetooth/dbus/bluetooth_input_client.h
index 91ca166..eac5c10 100644
--- a/device/bluetooth/dbus/bluetooth_input_client.h
+++ b/device/bluetooth/dbus/bluetooth_input_client.h
@@ -54,6 +54,9 @@
const std::string& property_name) {}
};
+ BluetoothInputClient(const BluetoothInputClient&) = delete;
+ BluetoothInputClient& operator=(const BluetoothInputClient&) = delete;
+
~BluetoothInputClient() override;
// Adds and removes observers for events on all remote bluetooth input
@@ -71,9 +74,6 @@
protected:
BluetoothInputClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothInputClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc
index 0123cce3..0aa4eea 100644
--- a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc
@@ -81,6 +81,11 @@
weak_ptr_factory_.GetWeakPtr()));
}
+ BluetoothAdvertisementServiceProviderImpl(
+ const BluetoothAdvertisementServiceProviderImpl&) = delete;
+ BluetoothAdvertisementServiceProviderImpl& operator=(
+ const BluetoothAdvertisementServiceProviderImpl&) = delete;
+
~BluetoothAdvertisementServiceProviderImpl() override {
DVLOG(1) << "Cleaning up Bluetooth Advertisement: " << object_path_.value();
@@ -443,8 +448,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothAdvertisementServiceProviderImpl>
weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementServiceProviderImpl);
};
BluetoothLEAdvertisementServiceProvider::
diff --git a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h
index 5c32339..4798d2f 100644
--- a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h
@@ -48,6 +48,11 @@
virtual void Released() = 0;
};
+ BluetoothLEAdvertisementServiceProvider(
+ const BluetoothLEAdvertisementServiceProvider&) = delete;
+ BluetoothLEAdvertisementServiceProvider& operator=(
+ const BluetoothLEAdvertisementServiceProvider&) = delete;
+
virtual ~BluetoothLEAdvertisementServiceProvider();
const dbus::ObjectPath& object_path() { return object_path_; }
@@ -73,9 +78,6 @@
// D-Bus object path of object we are exporting, kept so we can unregister
// again in our destructor.
dbus::ObjectPath object_path_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothLEAdvertisementServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
index 13eebd21..d917268 100644
--- a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
@@ -26,6 +26,11 @@
public:
BluetoothAdvertisementManagerClientImpl() : object_manager_(nullptr) {}
+ BluetoothAdvertisementManagerClientImpl(
+ const BluetoothAdvertisementManagerClientImpl&) = delete;
+ BluetoothAdvertisementManagerClientImpl& operator=(
+ const BluetoothAdvertisementManagerClientImpl&) = delete;
+
~BluetoothAdvertisementManagerClientImpl() override {
if (object_manager_) {
object_manager_->UnregisterInterface(
@@ -211,8 +216,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothAdvertisementManagerClientImpl>
weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementManagerClientImpl);
};
BluetoothLEAdvertisingManagerClient::BluetoothLEAdvertisingManagerClient() =
diff --git a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.h b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.h
index e9cad0b..3302817 100644
--- a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.h
+++ b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.h
@@ -38,6 +38,11 @@
const dbus::ObjectPath& object_path) {}
};
+ BluetoothLEAdvertisingManagerClient(
+ const BluetoothLEAdvertisingManagerClient&) = delete;
+ BluetoothLEAdvertisingManagerClient& operator=(
+ const BluetoothLEAdvertisingManagerClient&) = delete;
+
~BluetoothLEAdvertisingManagerClient() override;
// Adds and removes observers for events which change the advertising
@@ -89,9 +94,6 @@
protected:
BluetoothLEAdvertisingManagerClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothLEAdvertisingManagerClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_profile_manager_client.cc b/device/bluetooth/dbus/bluetooth_profile_manager_client.cc
index 5944ce8..0045e8b 100644
--- a/device/bluetooth/dbus/bluetooth_profile_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_profile_manager_client.cc
@@ -28,6 +28,11 @@
public:
BluetoothProfileManagerClientImpl() {}
+ BluetoothProfileManagerClientImpl(const BluetoothProfileManagerClientImpl&) =
+ delete;
+ BluetoothProfileManagerClientImpl& operator=(
+ const BluetoothProfileManagerClientImpl&) = delete;
+
~BluetoothProfileManagerClientImpl() override = default;
// BluetoothProfileManagerClient override.
@@ -251,8 +256,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothProfileManagerClientImpl> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothProfileManagerClientImpl);
};
BluetoothProfileManagerClient::BluetoothProfileManagerClient() = default;
diff --git a/device/bluetooth/dbus/bluetooth_profile_manager_client.h b/device/bluetooth/dbus/bluetooth_profile_manager_client.h
index 79e3101..5f47863a 100644
--- a/device/bluetooth/dbus/bluetooth_profile_manager_client.h
+++ b/device/bluetooth/dbus/bluetooth_profile_manager_client.h
@@ -68,6 +68,10 @@
std::unique_ptr<uint16_t> features;
};
+ BluetoothProfileManagerClient(const BluetoothProfileManagerClient&) = delete;
+ BluetoothProfileManagerClient& operator=(
+ const BluetoothProfileManagerClient&) = delete;
+
~BluetoothProfileManagerClient() override;
// The ErrorCallback is used by adapter methods to indicate failure.
@@ -101,9 +105,6 @@
protected:
BluetoothProfileManagerClient();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothProfileManagerClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluetooth_profile_service_provider.cc b/device/bluetooth/dbus/bluetooth_profile_service_provider.cc
index 2a0a460..54eee603 100644
--- a/device/bluetooth/dbus/bluetooth_profile_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_profile_service_provider.cc
@@ -69,6 +69,11 @@
weak_ptr_factory_.GetWeakPtr()));
}
+ BluetoothProfileServiceProviderImpl(
+ const BluetoothProfileServiceProviderImpl&) = delete;
+ BluetoothProfileServiceProviderImpl& operator=(
+ const BluetoothProfileServiceProviderImpl&) = delete;
+
~BluetoothProfileServiceProviderImpl() override {
DVLOG(1) << "Cleaning up Bluetooth Profile: " << object_path_.value();
@@ -235,8 +240,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothProfileServiceProviderImpl> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothProfileServiceProviderImpl);
};
BluetoothProfileServiceProvider::BluetoothProfileServiceProvider() = default;
diff --git a/device/bluetooth/dbus/bluetooth_profile_service_provider.h b/device/bluetooth/dbus/bluetooth_profile_service_provider.h
index c5417f06..dfa23a1 100644
--- a/device/bluetooth/dbus/bluetooth_profile_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_profile_service_provider.h
@@ -91,6 +91,11 @@
virtual void Cancel() = 0;
};
+ BluetoothProfileServiceProvider(const BluetoothProfileServiceProvider&) =
+ delete;
+ BluetoothProfileServiceProvider& operator=(
+ const BluetoothProfileServiceProvider&) = delete;
+
virtual ~BluetoothProfileServiceProvider();
// Creates the instance where |bus| is the D-Bus bus connection to export
@@ -104,9 +109,6 @@
protected:
BluetoothProfileServiceProvider();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothProfileServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/bluez_dbus_manager.h b/device/bluetooth/dbus/bluez_dbus_manager.h
index c38d004..9608ab3 100644
--- a/device/bluetooth/dbus/bluez_dbus_manager.h
+++ b/device/bluetooth/dbus/bluez_dbus_manager.h
@@ -186,6 +186,9 @@
class DEVICE_BLUETOOTH_EXPORT BluezDBusManagerSetter {
public:
+ BluezDBusManagerSetter(const BluezDBusManagerSetter&) = delete;
+ BluezDBusManagerSetter& operator=(const BluezDBusManagerSetter&) = delete;
+
~BluezDBusManagerSetter();
void SetBluetoothAdapterClient(
@@ -227,8 +230,6 @@
friend class BluezDBusManager;
BluezDBusManagerSetter();
-
- DISALLOW_COPY_AND_ASSIGN(BluezDBusManagerSetter);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_application_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_gatt_application_service_provider.h
index b42b2fe..f5f6572 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_application_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_application_service_provider.h
@@ -31,6 +31,12 @@
const dbus::ObjectPath& object_path,
const std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>&
services);
+
+ FakeBluetoothGattApplicationServiceProvider(
+ const FakeBluetoothGattApplicationServiceProvider&) = delete;
+ FakeBluetoothGattApplicationServiceProvider& operator=(
+ const FakeBluetoothGattApplicationServiceProvider&) = delete;
+
~FakeBluetoothGattApplicationServiceProvider() override;
const dbus::ObjectPath& object_path() const { return object_path_; }
@@ -38,8 +44,6 @@
private:
// D-Bus object path of the fake GATT service.
dbus::ObjectPath object_path_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattApplicationServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h
index 7d20bed..255a072 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h
@@ -43,6 +43,12 @@
};
FakeBluetoothGattCharacteristicClient();
+
+ FakeBluetoothGattCharacteristicClient(
+ const FakeBluetoothGattCharacteristicClient&) = delete;
+ FakeBluetoothGattCharacteristicClient& operator=(
+ const FakeBluetoothGattCharacteristicClient&) = delete;
+
~FakeBluetoothGattCharacteristicClient() override;
// DBusClient override.
@@ -205,8 +211,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<FakeBluetoothGattCharacteristicClient> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
index 27ec2e3..5ccc7f1 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
@@ -31,6 +31,12 @@
const std::string& uuid,
const std::vector<std::string>& flags,
const dbus::ObjectPath& service_path);
+
+ FakeBluetoothGattCharacteristicServiceProvider(
+ const FakeBluetoothGattCharacteristicServiceProvider&) = delete;
+ FakeBluetoothGattCharacteristicServiceProvider& operator=(
+ const FakeBluetoothGattCharacteristicServiceProvider&) = delete;
+
~FakeBluetoothGattCharacteristicServiceProvider() override;
// BluetoothGattCharacteristicServiceProvider override.
@@ -82,8 +88,6 @@
// The delegate that method calls are passed on to.
std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
index ef30c5ec..fb8edbc 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
@@ -39,6 +39,12 @@
};
FakeBluetoothGattDescriptorClient();
+
+ FakeBluetoothGattDescriptorClient(const FakeBluetoothGattDescriptorClient&) =
+ delete;
+ FakeBluetoothGattDescriptorClient& operator=(
+ const FakeBluetoothGattDescriptorClient&) = delete;
+
~FakeBluetoothGattDescriptorClient() override;
// DBusClient override.
@@ -99,8 +105,6 @@
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<FakeBluetoothGattDescriptorClient> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattDescriptorClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
index a1aa918..aaf4f6d 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
@@ -31,6 +31,12 @@
const std::string& uuid,
const std::vector<std::string>& flags,
const dbus::ObjectPath& characteristic_path);
+
+ FakeBluetoothGattDescriptorServiceProvider(
+ const FakeBluetoothGattDescriptorServiceProvider&) = delete;
+ FakeBluetoothGattDescriptorServiceProvider& operator=(
+ const FakeBluetoothGattDescriptorServiceProvider&) = delete;
+
~FakeBluetoothGattDescriptorServiceProvider() override;
// BluetoothGattDescriptorServiceProvider override.
@@ -69,8 +75,6 @@
// The delegate that method calls are passed on to.
std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattDescriptorServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_manager_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_manager_client.h
index 7431a0f..d60fcfc00 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_manager_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_manager_client.h
@@ -34,6 +34,12 @@
: public BluetoothGattManagerClient {
public:
FakeBluetoothGattManagerClient();
+
+ FakeBluetoothGattManagerClient(const FakeBluetoothGattManagerClient&) =
+ delete;
+ FakeBluetoothGattManagerClient& operator=(
+ const FakeBluetoothGattManagerClient&) = delete;
+
~FakeBluetoothGattManagerClient() override;
// DBusClient override.
@@ -123,8 +129,6 @@
ServiceMap service_map_;
CharacteristicMap characteristic_map_;
DescriptorMap descriptor_map_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattManagerClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h
index cb5f2be6..a0aa535 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h
@@ -38,6 +38,12 @@
};
FakeBluetoothGattServiceClient();
+
+ FakeBluetoothGattServiceClient(const FakeBluetoothGattServiceClient&) =
+ delete;
+ FakeBluetoothGattServiceClient& operator=(
+ const FakeBluetoothGattServiceClient&) = delete;
+
~FakeBluetoothGattServiceClient() override;
// DBusClient override.
@@ -121,8 +127,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<FakeBluetoothGattServiceClient> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_service_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_gatt_service_service_provider.h
index 7337a946..bfa85bc4 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_service_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_service_service_provider.h
@@ -25,6 +25,12 @@
const dbus::ObjectPath& object_path,
const std::string& uuid,
const std::vector<dbus::ObjectPath>& includes);
+
+ FakeBluetoothGattServiceServiceProvider(
+ const FakeBluetoothGattServiceServiceProvider&) = delete;
+ FakeBluetoothGattServiceServiceProvider& operator=(
+ const FakeBluetoothGattServiceServiceProvider&) = delete;
+
~FakeBluetoothGattServiceServiceProvider() override;
const dbus::ObjectPath& object_path() const override;
@@ -39,8 +45,6 @@
// List of included GATT services.
std::vector<dbus::ObjectPath> includes_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_input_client.h b/device/bluetooth/dbus/fake_bluetooth_input_client.h
index b4bf3db..cb9a1dd8 100644
--- a/device/bluetooth/dbus/fake_bluetooth_input_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_input_client.h
@@ -36,6 +36,10 @@
};
FakeBluetoothInputClient();
+
+ FakeBluetoothInputClient(const FakeBluetoothInputClient&) = delete;
+ FakeBluetoothInputClient& operator=(const FakeBluetoothInputClient&) = delete;
+
~FakeBluetoothInputClient() override;
// BluetoothInputClient overrides
@@ -58,8 +62,6 @@
// List of observers interested in event notifications from us.
base::ObserverList<Observer>::Unchecked observers_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothInputClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_le_advertisement_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_le_advertisement_service_provider.h
index 59c819e..0aae329 100644
--- a/device/bluetooth/dbus/fake_bluetooth_le_advertisement_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_le_advertisement_service_provider.h
@@ -23,6 +23,12 @@
FakeBluetoothLEAdvertisementServiceProvider(
const dbus::ObjectPath& object_path,
Delegate* delegate);
+
+ FakeBluetoothLEAdvertisementServiceProvider(
+ const FakeBluetoothLEAdvertisementServiceProvider&) = delete;
+ FakeBluetoothLEAdvertisementServiceProvider& operator=(
+ const FakeBluetoothLEAdvertisementServiceProvider&) = delete;
+
~FakeBluetoothLEAdvertisementServiceProvider() override;
// Each of these calls the equivalent
@@ -39,8 +45,6 @@
// passed to generate the reply. |delegate_| is generally the object that
// owns this one, and must outlive it.
Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h b/device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h
index 633b87c..a22529b 100644
--- a/device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h
@@ -28,6 +28,12 @@
: public BluetoothLEAdvertisingManagerClient {
public:
FakeBluetoothLEAdvertisingManagerClient();
+
+ FakeBluetoothLEAdvertisingManagerClient(
+ const FakeBluetoothLEAdvertisingManagerClient&) = delete;
+ FakeBluetoothLEAdvertisingManagerClient& operator=(
+ const FakeBluetoothLEAdvertisingManagerClient&) = delete;
+
~FakeBluetoothLEAdvertisingManagerClient() override;
// DBusClient overrides:
@@ -80,8 +86,6 @@
// Holds currently registered advertisements.
std::vector<dbus::ObjectPath> currently_registered_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisingManagerClient);
};
} // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_profile_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_profile_service_provider.h
index 383c224..f40ddc6 100644
--- a/device/bluetooth/dbus/fake_bluetooth_profile_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_profile_service_provider.h
@@ -24,6 +24,12 @@
public:
FakeBluetoothProfileServiceProvider(const dbus::ObjectPath& object_path,
Delegate* delegate);
+
+ FakeBluetoothProfileServiceProvider(
+ const FakeBluetoothProfileServiceProvider&) = delete;
+ FakeBluetoothProfileServiceProvider& operator=(
+ const FakeBluetoothProfileServiceProvider&) = delete;
+
~FakeBluetoothProfileServiceProvider() override;
// Each of these calls the equivalent
@@ -50,8 +56,6 @@
// passed to generate the reply. |delegate_| is generally the object that
// owns this one, and must outlive it.
Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothProfileServiceProvider);
};
} // namespace bluez
diff --git a/device/bluetooth/device.h b/device/bluetooth/device.h
index d31bf00..6ebc0f9 100644
--- a/device/bluetooth/device.h
+++ b/device/bluetooth/device.h
@@ -32,6 +32,9 @@
// instance closes the binding which causes the instance to be deleted.
class Device : public mojom::Device, public device::BluetoothAdapter::Observer {
public:
+ Device(const Device&) = delete;
+ Device& operator=(const Device&) = delete;
+
~Device() override;
static void Create(
@@ -125,8 +128,6 @@
std::vector<base::OnceClosure> pending_services_requests_;
base::WeakPtrFactory<Device> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(Device);
};
} // namespace bluetooth
diff --git a/device/bluetooth/discovery_session.h b/device/bluetooth/discovery_session.h
index c30c0d51..7cf5f1c3 100644
--- a/device/bluetooth/discovery_session.h
+++ b/device/bluetooth/discovery_session.h
@@ -24,6 +24,10 @@
public:
explicit DiscoverySession(
std::unique_ptr<device::BluetoothDiscoverySession> session);
+
+ DiscoverySession(const DiscoverySession&) = delete;
+ DiscoverySession& operator=(const DiscoverySession&) = delete;
+
~DiscoverySession() override;
// mojom::DiscoverySession overrides:
@@ -35,8 +39,6 @@
std::unique_ptr<device::BluetoothDiscoverySession> discovery_session_;
base::WeakPtrFactory<DiscoverySession> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DiscoverySession);
};
} // namespace bluetooth
diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h
index c911a26..ef00671 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -70,6 +70,10 @@
struct LowEnergyDeviceData {
LowEnergyDeviceData();
LowEnergyDeviceData(LowEnergyDeviceData&& data);
+
+ LowEnergyDeviceData(const LowEnergyDeviceData&) = delete;
+ LowEnergyDeviceData& operator=(const LowEnergyDeviceData&) = delete;
+
~LowEnergyDeviceData();
absl::optional<std::string> name;
@@ -81,8 +85,6 @@
BluetoothDevice::ServiceDataMap service_data;
BluetoothDevice::ManufacturerDataMap manufacturer_data;
BluetoothTransport transport = BLUETOOTH_TRANSPORT_LE;
-
- DISALLOW_COPY_AND_ASSIGN(LowEnergyDeviceData);
};
static const char kTestAdapterName[];
diff --git a/device/bluetooth/test/bluetooth_test_cast.h b/device/bluetooth/test/bluetooth_test_cast.h
index e0b871ef..e17ff54 100644
--- a/device/bluetooth/test/bluetooth_test_cast.h
+++ b/device/bluetooth/test/bluetooth_test_cast.h
@@ -25,6 +25,10 @@
class BluetoothTestCast : public BluetoothTestBase {
public:
BluetoothTestCast();
+
+ BluetoothTestCast(const BluetoothTestCast&) = delete;
+ BluetoothTestCast& operator=(const BluetoothTestCast&) = delete;
+
~BluetoothTestCast() override;
// BluetoothTestBase overrides:
@@ -44,8 +48,6 @@
const std::unique_ptr<GattClientManager> gatt_client_manager_;
::chromecast::bluetooth::MockLeScanManager le_scan_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothTestCast);
};
// Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
diff --git a/device/bluetooth/test/bluetooth_test_win.h b/device/bluetooth/test/bluetooth_test_win.h
index 6b69788..c155876a 100644
--- a/device/bluetooth/test/bluetooth_test_win.h
+++ b/device/bluetooth/test/bluetooth_test_win.h
@@ -163,6 +163,10 @@
public ::testing::WithParamInterface<BluetoothTestWinrtParam> {
public:
BluetoothTestWinrt();
+
+ BluetoothTestWinrt(const BluetoothTestWinrt&) = delete;
+ BluetoothTestWinrt& operator=(const BluetoothTestWinrt&) = delete;
+
~BluetoothTestWinrt() override;
bool UsesNewBleImplementation() const;
@@ -263,8 +267,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
absl::optional<base::win::ScopedWinrtInitializer> scoped_winrt_initializer_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothTestWinrt);
};
using BluetoothTestWinrtOnly = BluetoothTestWinrt;
diff --git a/device/bluetooth/test/fake_bluetooth_adapter_winrt.h b/device/bluetooth/test/fake_bluetooth_adapter_winrt.h
index 8e290a4..fb3b02f 100644
--- a/device/bluetooth/test/fake_bluetooth_adapter_winrt.h
+++ b/device/bluetooth/test/fake_bluetooth_adapter_winrt.h
@@ -26,6 +26,11 @@
FakeBluetoothAdapterWinrt(
base::StringPiece address,
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Radios::IRadio> radio);
+
+ FakeBluetoothAdapterWinrt(const FakeBluetoothAdapterWinrt&) = delete;
+ FakeBluetoothAdapterWinrt& operator=(const FakeBluetoothAdapterWinrt&) =
+ delete;
+
~FakeBluetoothAdapterWinrt() override;
static uint64_t ToRawBluetoothAddress(base::StringPiece address);
@@ -47,8 +52,6 @@
private:
uint64_t raw_address_;
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Radios::IRadio> radio_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothAdapterWinrt);
};
class FakeBluetoothAdapterStaticsWinrt
@@ -60,6 +63,12 @@
explicit FakeBluetoothAdapterStaticsWinrt(
Microsoft::WRL::ComPtr<
ABI::Windows::Devices::Bluetooth::IBluetoothAdapter> default_adapter);
+
+ FakeBluetoothAdapterStaticsWinrt(const FakeBluetoothAdapterStaticsWinrt&) =
+ delete;
+ FakeBluetoothAdapterStaticsWinrt& operator=(
+ const FakeBluetoothAdapterStaticsWinrt&) = delete;
+
~FakeBluetoothAdapterStaticsWinrt() override;
// IBluetoothAdapterStatics:
@@ -77,8 +86,6 @@
private:
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::IBluetoothAdapter>
default_adapter_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothAdapterStaticsWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_bluetooth_le_advertisement_data_section_winrt.h b/device/bluetooth/test/fake_bluetooth_le_advertisement_data_section_winrt.h
index bc0f5da..bd20106 100644
--- a/device/bluetooth/test/fake_bluetooth_le_advertisement_data_section_winrt.h
+++ b/device/bluetooth/test/fake_bluetooth_le_advertisement_data_section_winrt.h
@@ -25,6 +25,12 @@
public:
explicit FakeBluetoothLEAdvertisementDataSectionWinrt(
std::vector<uint8_t> data);
+
+ FakeBluetoothLEAdvertisementDataSectionWinrt(
+ const FakeBluetoothLEAdvertisementDataSectionWinrt&) = delete;
+ FakeBluetoothLEAdvertisementDataSectionWinrt& operator=(
+ const FakeBluetoothLEAdvertisementDataSectionWinrt&) = delete;
+
~FakeBluetoothLEAdvertisementDataSectionWinrt() override;
// IBluetoothLEAdvertisementDataSection:
@@ -37,8 +43,6 @@
private:
std::vector<uint8_t> data_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementDataSectionWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_bluetooth_le_advertisement_publisher_winrt.h b/device/bluetooth/test/fake_bluetooth_le_advertisement_publisher_winrt.h
index 82acd52f..95c7f115 100644
--- a/device/bluetooth/test/fake_bluetooth_le_advertisement_publisher_winrt.h
+++ b/device/bluetooth/test/fake_bluetooth_le_advertisement_publisher_winrt.h
@@ -24,6 +24,12 @@
explicit FakeBluetoothLEAdvertisementPublisherWinrt(
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::Advertisement::
IBluetoothLEAdvertisement> advertisement);
+
+ FakeBluetoothLEAdvertisementPublisherWinrt(
+ const FakeBluetoothLEAdvertisementPublisherWinrt&) = delete;
+ FakeBluetoothLEAdvertisementPublisherWinrt& operator=(
+ const FakeBluetoothLEAdvertisementPublisherWinrt&) = delete;
+
~FakeBluetoothLEAdvertisementPublisherWinrt() override;
// IBluetoothLEAdvertisementPublisher:
@@ -65,8 +71,6 @@
ABI::Windows::Devices::Bluetooth::Advertisement::
BluetoothLEAdvertisementPublisherStatusChangedEventArgs*>>
handler_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementPublisherWinrt);
};
class FakeBluetoothLEAdvertisementPublisherFactoryWinrt
@@ -77,6 +81,12 @@
IBluetoothLEAdvertisementPublisherFactory> {
public:
FakeBluetoothLEAdvertisementPublisherFactoryWinrt();
+
+ FakeBluetoothLEAdvertisementPublisherFactoryWinrt(
+ const FakeBluetoothLEAdvertisementPublisherFactoryWinrt&) = delete;
+ FakeBluetoothLEAdvertisementPublisherFactoryWinrt& operator=(
+ const FakeBluetoothLEAdvertisementPublisherFactoryWinrt&) = delete;
+
~FakeBluetoothLEAdvertisementPublisherFactoryWinrt() override;
// IBluetoothLEAdvertisementPublisherFactory:
@@ -85,9 +95,6 @@
IBluetoothLEAdvertisement* advertisement,
ABI::Windows::Devices::Bluetooth::Advertisement::
IBluetoothLEAdvertisementPublisher** value) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementPublisherFactoryWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h b/device/bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h
index 91929a83..8e06c5a1 100644
--- a/device/bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h
+++ b/device/bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h
@@ -27,6 +27,12 @@
base::StringPiece address,
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::Advertisement::
IBluetoothLEAdvertisement> advertisement);
+
+ FakeBluetoothLEAdvertisementReceivedEventArgsWinrt(
+ const FakeBluetoothLEAdvertisementReceivedEventArgsWinrt&) = delete;
+ FakeBluetoothLEAdvertisementReceivedEventArgsWinrt& operator=(
+ const FakeBluetoothLEAdvertisementReceivedEventArgsWinrt&) = delete;
+
~FakeBluetoothLEAdvertisementReceivedEventArgsWinrt() override;
// IBluetoothLEAdvertisementReceivedEventArgs:
@@ -47,8 +53,6 @@
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::Advertisement::
IBluetoothLEAdvertisement>
advertisement_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementReceivedEventArgsWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_bluetooth_le_advertisement_watcher_winrt.h b/device/bluetooth/test/fake_bluetooth_le_advertisement_watcher_winrt.h
index d6f2107..dcc9d80 100644
--- a/device/bluetooth/test/fake_bluetooth_le_advertisement_watcher_winrt.h
+++ b/device/bluetooth/test/fake_bluetooth_le_advertisement_watcher_winrt.h
@@ -24,6 +24,12 @@
IBluetoothLEAdvertisementWatcher> {
public:
FakeBluetoothLEAdvertisementWatcherWinrt();
+
+ FakeBluetoothLEAdvertisementWatcherWinrt(
+ const FakeBluetoothLEAdvertisementWatcherWinrt&) = delete;
+ FakeBluetoothLEAdvertisementWatcherWinrt& operator=(
+ const FakeBluetoothLEAdvertisementWatcherWinrt&) = delete;
+
~FakeBluetoothLEAdvertisementWatcherWinrt() override;
// IBluetoothLEAdvertisementWatcher:
@@ -98,8 +104,6 @@
ABI::Windows::Devices::Bluetooth::Advertisement::
BluetoothLEAdvertisementWatcherStoppedEventArgs*>>
stopped_handler_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementWatcherWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_bluetooth_le_advertisement_winrt.h b/device/bluetooth/test/fake_bluetooth_le_advertisement_winrt.h
index d3da39e..7c439da 100644
--- a/device/bluetooth/test/fake_bluetooth_le_advertisement_winrt.h
+++ b/device/bluetooth/test/fake_bluetooth_le_advertisement_winrt.h
@@ -34,6 +34,12 @@
absl::optional<int8_t> tx_power,
BluetoothDevice::ServiceDataMap service_data,
BluetoothDevice::ManufacturerDataMap manufacturer_data);
+
+ FakeBluetoothLEAdvertisementWinrt(const FakeBluetoothLEAdvertisementWinrt&) =
+ delete;
+ FakeBluetoothLEAdvertisementWinrt& operator=(
+ const FakeBluetoothLEAdvertisementWinrt&) = delete;
+
~FakeBluetoothLEAdvertisementWinrt() override;
// IBluetoothLEAdvertisement:
@@ -73,8 +79,6 @@
absl::optional<int8_t> tx_power_;
BluetoothDevice::ServiceDataMap service_data_;
BluetoothDevice::ManufacturerDataMap manufacturer_data_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_bluetooth_le_device_winrt.h b/device/bluetooth/test/fake_bluetooth_le_device_winrt.h
index 8f74f09..bedd4be 100644
--- a/device/bluetooth/test/fake_bluetooth_le_device_winrt.h
+++ b/device/bluetooth/test/fake_bluetooth_le_device_winrt.h
@@ -36,6 +36,11 @@
ABI::Windows::Foundation::IClosable> {
public:
explicit FakeBluetoothLEDeviceWinrt(BluetoothTestWinrt* bluetooth_test_winrt);
+
+ FakeBluetoothLEDeviceWinrt(const FakeBluetoothLEDeviceWinrt&) = delete;
+ FakeBluetoothLEDeviceWinrt& operator=(const FakeBluetoothLEDeviceWinrt&) =
+ delete;
+
~FakeBluetoothLEDeviceWinrt() override;
// IBluetoothLEDevice:
@@ -184,8 +189,6 @@
ABI::Windows::Devices::Bluetooth::BluetoothLEDevice*,
IInspectable*>>
name_changed_handler_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEDeviceWinrt);
};
class FakeBluetoothLEDeviceStaticsWinrt
@@ -196,6 +199,12 @@
public:
explicit FakeBluetoothLEDeviceStaticsWinrt(
BluetoothTestWinrt* bluetooth_test_winrt);
+
+ FakeBluetoothLEDeviceStaticsWinrt(const FakeBluetoothLEDeviceStaticsWinrt&) =
+ delete;
+ FakeBluetoothLEDeviceStaticsWinrt& operator=(
+ const FakeBluetoothLEDeviceStaticsWinrt&) = delete;
+
~FakeBluetoothLEDeviceStaticsWinrt() override;
// IBluetoothLEDeviceStatics:
@@ -213,8 +222,6 @@
private:
BluetoothTestWinrt* bluetooth_test_winrt_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEDeviceStaticsWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_bluetooth_le_manufacturer_data_winrt.h b/device/bluetooth/test/fake_bluetooth_le_manufacturer_data_winrt.h
index 77238793..2e2f47f66 100644
--- a/device/bluetooth/test/fake_bluetooth_le_manufacturer_data_winrt.h
+++ b/device/bluetooth/test/fake_bluetooth_le_manufacturer_data_winrt.h
@@ -29,6 +29,12 @@
FakeBluetoothLEManufacturerData(
uint16_t company_id,
Microsoft::WRL::ComPtr<ABI::Windows::Storage::Streams::IBuffer> data);
+
+ FakeBluetoothLEManufacturerData(const FakeBluetoothLEManufacturerData&) =
+ delete;
+ FakeBluetoothLEManufacturerData& operator=(
+ const FakeBluetoothLEManufacturerData&) = delete;
+
~FakeBluetoothLEManufacturerData() override;
// IBluetoothLEManufacturerData:
@@ -42,8 +48,6 @@
private:
uint16_t company_id_;
Microsoft::WRL::ComPtr<ABI::Windows::Storage::Streams::IBuffer> data_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEManufacturerData);
};
class FakeBluetoothLEManufacturerDataFactory
@@ -54,6 +58,12 @@
IBluetoothLEManufacturerDataFactory> {
public:
FakeBluetoothLEManufacturerDataFactory();
+
+ FakeBluetoothLEManufacturerDataFactory(
+ const FakeBluetoothLEManufacturerDataFactory&) = delete;
+ FakeBluetoothLEManufacturerDataFactory& operator=(
+ const FakeBluetoothLEManufacturerDataFactory&) = delete;
+
~FakeBluetoothLEManufacturerDataFactory() override;
// IBluetoothLEManufacturerDataFactory:
@@ -61,9 +71,6 @@
ABI::Windows::Storage::Streams::IBuffer* data,
ABI::Windows::Devices::Bluetooth::Advertisement::
IBluetoothLEManufacturerData** value) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEManufacturerDataFactory);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_device_information_custom_pairing_winrt.h b/device/bluetooth/test/fake_device_information_custom_pairing_winrt.h
index 8a94d2f6..9b7602b 100644
--- a/device/bluetooth/test/fake_device_information_custom_pairing_winrt.h
+++ b/device/bluetooth/test/fake_device_information_custom_pairing_winrt.h
@@ -26,6 +26,12 @@
FakeDeviceInformationCustomPairingWinrt(
Microsoft::WRL::ComPtr<FakeDeviceInformationPairingWinrt> pairing,
std::string pin);
+
+ FakeDeviceInformationCustomPairingWinrt(
+ const FakeDeviceInformationCustomPairingWinrt&) = delete;
+ FakeDeviceInformationCustomPairingWinrt& operator=(
+ const FakeDeviceInformationCustomPairingWinrt&) = delete;
+
~FakeDeviceInformationCustomPairingWinrt() override;
// IDeviceInformationCustomPairing:
@@ -78,8 +84,6 @@
ABI::Windows::Devices::Enumeration::DeviceInformationCustomPairing*,
ABI::Windows::Devices::Enumeration::DevicePairingRequestedEventArgs*>>
pairing_requested_handler_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDeviceInformationCustomPairingWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_device_information_pairing_winrt.h b/device/bluetooth/test/fake_device_information_pairing_winrt.h
index 14a542d9..bdaa33f 100644
--- a/device/bluetooth/test/fake_device_information_pairing_winrt.h
+++ b/device/bluetooth/test/fake_device_information_pairing_winrt.h
@@ -24,6 +24,12 @@
public:
explicit FakeDeviceInformationPairingWinrt(bool is_paired);
explicit FakeDeviceInformationPairingWinrt(std::string pin);
+
+ FakeDeviceInformationPairingWinrt(const FakeDeviceInformationPairingWinrt&) =
+ delete;
+ FakeDeviceInformationPairingWinrt& operator=(
+ const FakeDeviceInformationPairingWinrt&) = delete;
+
~FakeDeviceInformationPairingWinrt() override;
// IDeviceInformationPairing:
@@ -67,8 +73,6 @@
Microsoft::WRL::ComPtr<
ABI::Windows::Devices::Enumeration::IDeviceInformationCustomPairing>
custom_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDeviceInformationPairingWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_device_information_winrt.h b/device/bluetooth/test/fake_device_information_winrt.h
index b6891fc..3776285 100644
--- a/device/bluetooth/test/fake_device_information_winrt.h
+++ b/device/bluetooth/test/fake_device_information_winrt.h
@@ -32,6 +32,11 @@
Microsoft::WRL::ComPtr<
ABI::Windows::Devices::Enumeration::IDeviceInformationPairing>
pairing);
+
+ FakeDeviceInformationWinrt(const FakeDeviceInformationWinrt&) = delete;
+ FakeDeviceInformationWinrt& operator=(const FakeDeviceInformationWinrt&) =
+ delete;
+
~FakeDeviceInformationWinrt() override;
// IDeviceInformation:
@@ -69,8 +74,6 @@
Microsoft::WRL::ComPtr<
ABI::Windows::Devices::Enumeration::IDeviceInformationPairing>
pairing_ = Microsoft::WRL::Make<FakeDeviceInformationPairingWinrt>(false);
-
- DISALLOW_COPY_AND_ASSIGN(FakeDeviceInformationWinrt);
};
class FakeDeviceInformationStaticsWinrt
@@ -83,6 +86,12 @@
Microsoft::WRL::ComPtr<
ABI::Windows::Devices::Enumeration::IDeviceInformation>
device_information);
+
+ FakeDeviceInformationStaticsWinrt(const FakeDeviceInformationStaticsWinrt&) =
+ delete;
+ FakeDeviceInformationStaticsWinrt& operator=(
+ const FakeDeviceInformationStaticsWinrt&) = delete;
+
~FakeDeviceInformationStaticsWinrt() override;
// IDeviceInformationStatics:
@@ -138,8 +147,6 @@
private:
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Enumeration::IDeviceInformation>
device_information_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDeviceInformationStaticsWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_device_pairing_requested_event_args_winrt.cc b/device/bluetooth/test/fake_device_pairing_requested_event_args_winrt.cc
index 854122f..89f0c24 100644
--- a/device/bluetooth/test/fake_device_pairing_requested_event_args_winrt.cc
+++ b/device/bluetooth/test/fake_device_pairing_requested_event_args_winrt.cc
@@ -30,6 +30,10 @@
explicit FakeDeferral(
ComPtr<FakeDevicePairingRequestedEventArgsWinrt> pairing_requested)
: pairing_requested_(std::move(pairing_requested)) {}
+
+ FakeDeferral(const FakeDeferral&) = delete;
+ FakeDeferral& operator=(const FakeDeferral&) = delete;
+
~FakeDeferral() override = default;
// IDeferral:
@@ -40,8 +44,6 @@
private:
ComPtr<FakeDevicePairingRequestedEventArgsWinrt> pairing_requested_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDeferral);
};
} // namespace
diff --git a/device/bluetooth/test/fake_device_pairing_requested_event_args_winrt.h b/device/bluetooth/test/fake_device_pairing_requested_event_args_winrt.h
index b2f8599..d8ab4f4 100644
--- a/device/bluetooth/test/fake_device_pairing_requested_event_args_winrt.h
+++ b/device/bluetooth/test/fake_device_pairing_requested_event_args_winrt.h
@@ -24,6 +24,12 @@
explicit FakeDevicePairingRequestedEventArgsWinrt(
Microsoft::WRL::ComPtr<FakeDeviceInformationCustomPairingWinrt>
custom_pairing);
+
+ FakeDevicePairingRequestedEventArgsWinrt(
+ const FakeDevicePairingRequestedEventArgsWinrt&) = delete;
+ FakeDevicePairingRequestedEventArgsWinrt& operator=(
+ const FakeDevicePairingRequestedEventArgsWinrt&) = delete;
+
~FakeDevicePairingRequestedEventArgsWinrt() override;
// IDevicePairingRequestedEventArgs:
@@ -42,8 +48,6 @@
private:
Microsoft::WRL::ComPtr<FakeDeviceInformationCustomPairingWinrt>
custom_pairing_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDevicePairingRequestedEventArgsWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_device_pairing_result_winrt.h b/device/bluetooth/test/fake_device_pairing_result_winrt.h
index 55a8400..7b66d7f1 100644
--- a/device/bluetooth/test/fake_device_pairing_result_winrt.h
+++ b/device/bluetooth/test/fake_device_pairing_result_winrt.h
@@ -20,6 +20,11 @@
public:
explicit FakeDevicePairingResultWinrt(
ABI::Windows::Devices::Enumeration::DevicePairingResultStatus status);
+
+ FakeDevicePairingResultWinrt(const FakeDevicePairingResultWinrt&) = delete;
+ FakeDevicePairingResultWinrt& operator=(const FakeDevicePairingResultWinrt&) =
+ delete;
+
~FakeDevicePairingResultWinrt() override;
// IDevicePairingResult:
@@ -32,8 +37,6 @@
private:
ABI::Windows::Devices::Enumeration::DevicePairingResultStatus status_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDevicePairingResultWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_device_watcher_winrt.h b/device/bluetooth/test/fake_device_watcher_winrt.h
index 5ecbd4f..65bcfbf4 100644
--- a/device/bluetooth/test/fake_device_watcher_winrt.h
+++ b/device/bluetooth/test/fake_device_watcher_winrt.h
@@ -21,6 +21,10 @@
ABI::Windows::Devices::Enumeration::IDeviceWatcher> {
public:
FakeDeviceWatcherWinrt();
+
+ FakeDeviceWatcherWinrt(const FakeDeviceWatcherWinrt&) = delete;
+ FakeDeviceWatcherWinrt& operator=(const FakeDeviceWatcherWinrt&) = delete;
+
~FakeDeviceWatcherWinrt() override;
// IDeviceWatcher:
@@ -82,8 +86,6 @@
ABI::Windows::Devices::Enumeration::DeviceWatcher*,
IInspectable*>>
enumerated_handler_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDeviceWatcherWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_gatt_characteristic_winrt.h b/device/bluetooth/test/fake_gatt_characteristic_winrt.h
index 2c08f74..f2d146f 100644
--- a/device/bluetooth/test/fake_gatt_characteristic_winrt.h
+++ b/device/bluetooth/test/fake_gatt_characteristic_winrt.h
@@ -38,6 +38,10 @@
base::StringPiece uuid,
uint16_t attribute_handle);
+ FakeGattCharacteristicWinrt(const FakeGattCharacteristicWinrt&) = delete;
+ FakeGattCharacteristicWinrt& operator=(const FakeGattCharacteristicWinrt&) =
+ delete;
+
~FakeGattCharacteristicWinrt() override;
// IGattCharacteristic:
@@ -192,8 +196,6 @@
std::vector<Microsoft::WRL::ComPtr<FakeGattDescriptorWinrt>>
fake_descriptors_;
uint16_t last_descriptor_attribute_handle_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeGattCharacteristicWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_gatt_characteristics_result_winrt.h b/device/bluetooth/test/fake_gatt_characteristics_result_winrt.h
index c645372c..5bb2e3f 100644
--- a/device/bluetooth/test/fake_gatt_characteristics_result_winrt.h
+++ b/device/bluetooth/test/fake_gatt_characteristics_result_winrt.h
@@ -32,6 +32,12 @@
explicit FakeGattCharacteristicsResultWinrt(
const std::vector<Microsoft::WRL::ComPtr<FakeGattCharacteristicWinrt>>&
fake_characteristics);
+
+ FakeGattCharacteristicsResultWinrt(
+ const FakeGattCharacteristicsResultWinrt&) = delete;
+ FakeGattCharacteristicsResultWinrt& operator=(
+ const FakeGattCharacteristicsResultWinrt&) = delete;
+
~FakeGattCharacteristicsResultWinrt() override;
// IGattCharacteristicsResult:
@@ -50,8 +56,6 @@
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::
GenericAttributeProfile::IGattCharacteristic>>
characteristics_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeGattCharacteristicsResultWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_gatt_descriptor_winrt.h b/device/bluetooth/test/fake_gatt_descriptor_winrt.h
index 6148a44..a4fa4b8 100644
--- a/device/bluetooth/test/fake_gatt_descriptor_winrt.h
+++ b/device/bluetooth/test/fake_gatt_descriptor_winrt.h
@@ -34,6 +34,10 @@
FakeGattDescriptorWinrt(BluetoothTestWinrt* bluetooth_test_winrt,
base::StringPiece uuid,
uint16_t attribute_handle);
+
+ FakeGattDescriptorWinrt(const FakeGattDescriptorWinrt&) = delete;
+ FakeGattDescriptorWinrt& operator=(const FakeGattDescriptorWinrt&) = delete;
+
~FakeGattDescriptorWinrt() override;
// IGattDescriptor:
@@ -88,8 +92,6 @@
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::
GenericAttributeProfile::IGattWriteResult>)>
write_value_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeGattDescriptorWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_gatt_descriptors_result_winrt.h b/device/bluetooth/test/fake_gatt_descriptors_result_winrt.h
index 8c50b7d..df8f45c 100644
--- a/device/bluetooth/test/fake_gatt_descriptors_result_winrt.h
+++ b/device/bluetooth/test/fake_gatt_descriptors_result_winrt.h
@@ -31,6 +31,12 @@
explicit FakeGattDescriptorsResultWinrt(
const std::vector<Microsoft::WRL::ComPtr<FakeGattDescriptorWinrt>>&
fake_descriptors);
+
+ FakeGattDescriptorsResultWinrt(const FakeGattDescriptorsResultWinrt&) =
+ delete;
+ FakeGattDescriptorsResultWinrt& operator=(
+ const FakeGattDescriptorsResultWinrt&) = delete;
+
~FakeGattDescriptorsResultWinrt() override;
// IGattDescriptorsResult:
@@ -49,8 +55,6 @@
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::
GenericAttributeProfile::IGattDescriptor>>
descriptors_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeGattDescriptorsResultWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_gatt_device_service_winrt.h b/device/bluetooth/test/fake_gatt_device_service_winrt.h
index d34ff29..ebb3d67 100644
--- a/device/bluetooth/test/fake_gatt_device_service_winrt.h
+++ b/device/bluetooth/test/fake_gatt_device_service_winrt.h
@@ -37,6 +37,11 @@
base::StringPiece uuid,
uint16_t attribute_handle,
bool allowed);
+
+ FakeGattDeviceServiceWinrt(const FakeGattDeviceServiceWinrt&) = delete;
+ FakeGattDeviceServiceWinrt& operator=(const FakeGattDeviceServiceWinrt&) =
+ delete;
+
~FakeGattDeviceServiceWinrt() override;
// IGattDeviceService:
@@ -128,8 +133,6 @@
std::vector<Microsoft::WRL::ComPtr<FakeGattCharacteristicWinrt>>
fake_characteristics_;
uint16_t characteristic_attribute_handle_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeGattDeviceServiceWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_gatt_device_services_result_winrt.h b/device/bluetooth/test/fake_gatt_device_services_result_winrt.h
index a12f6b6d..f499eff 100644
--- a/device/bluetooth/test/fake_gatt_device_services_result_winrt.h
+++ b/device/bluetooth/test/fake_gatt_device_services_result_winrt.h
@@ -35,6 +35,12 @@
explicit FakeGattDeviceServicesResultWinrt(
const std::vector<Microsoft::WRL::ComPtr<FakeGattDeviceServiceWinrt>>&
fake_services);
+
+ FakeGattDeviceServicesResultWinrt(const FakeGattDeviceServicesResultWinrt&) =
+ delete;
+ FakeGattDeviceServicesResultWinrt& operator=(
+ const FakeGattDeviceServicesResultWinrt&) = delete;
+
~FakeGattDeviceServicesResultWinrt() override;
// IGattDeviceServicesResult:
@@ -55,8 +61,6 @@
Microsoft::WRL::ComPtr<ABI::Windows::Devices::Bluetooth::
GenericAttributeProfile::IGattDeviceService>>
services_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeGattDeviceServicesResultWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_gatt_read_result_winrt.h b/device/bluetooth/test/fake_gatt_read_result_winrt.h
index ebe2651..2eae5e8 100644
--- a/device/bluetooth/test/fake_gatt_read_result_winrt.h
+++ b/device/bluetooth/test/fake_gatt_read_result_winrt.h
@@ -29,6 +29,10 @@
explicit FakeGattReadResultWinrt(
BluetoothGattService::GattErrorCode error_code);
explicit FakeGattReadResultWinrt(std::vector<uint8_t> data);
+
+ FakeGattReadResultWinrt(const FakeGattReadResultWinrt&) = delete;
+ FakeGattReadResultWinrt& operator=(const FakeGattReadResultWinrt&) = delete;
+
~FakeGattReadResultWinrt() override;
// IGattReadResult:
@@ -48,8 +52,6 @@
GenericAttributeProfile::GattCommunicationStatus_Success;
std::vector<uint8_t> data_;
uint8_t protocol_error_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(FakeGattReadResultWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_gatt_value_changed_event_args_winrt.h b/device/bluetooth/test/fake_gatt_value_changed_event_args_winrt.h
index b329133..70aac891 100644
--- a/device/bluetooth/test/fake_gatt_value_changed_event_args_winrt.h
+++ b/device/bluetooth/test/fake_gatt_value_changed_event_args_winrt.h
@@ -24,6 +24,12 @@
IGattValueChangedEventArgs> {
public:
explicit FakeGattValueChangedEventArgsWinrt(std::vector<uint8_t> value);
+
+ FakeGattValueChangedEventArgsWinrt(
+ const FakeGattValueChangedEventArgsWinrt&) = delete;
+ FakeGattValueChangedEventArgsWinrt& operator=(
+ const FakeGattValueChangedEventArgsWinrt&) = delete;
+
~FakeGattValueChangedEventArgsWinrt() override;
// IGattValueChangedEventArgs:
@@ -34,8 +40,6 @@
private:
std::vector<uint8_t> value_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeGattValueChangedEventArgsWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_gatt_write_result_winrt.h b/device/bluetooth/test/fake_gatt_write_result_winrt.h
index 13b5fac..42369d84 100644
--- a/device/bluetooth/test/fake_gatt_write_result_winrt.h
+++ b/device/bluetooth/test/fake_gatt_write_result_winrt.h
@@ -25,6 +25,10 @@
FakeGattWriteResultWinrt();
explicit FakeGattWriteResultWinrt(
BluetoothGattService::GattErrorCode error_code);
+
+ FakeGattWriteResultWinrt(const FakeGattWriteResultWinrt&) = delete;
+ FakeGattWriteResultWinrt& operator=(const FakeGattWriteResultWinrt&) = delete;
+
~FakeGattWriteResultWinrt() override;
// IGattWriteResult:
@@ -39,8 +43,6 @@
GattCommunicationStatus status_ = ABI::Windows::Devices::Bluetooth::
GenericAttributeProfile::GattCommunicationStatus_Success;
uint8_t protocol_error_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(FakeGattWriteResultWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_peripheral.h b/device/bluetooth/test/fake_peripheral.h
index e9b1ee0..c4c20080 100644
--- a/device/bluetooth/test/fake_peripheral.h
+++ b/device/bluetooth/test/fake_peripheral.h
@@ -28,6 +28,10 @@
class FakePeripheral : public device::BluetoothDevice {
public:
FakePeripheral(FakeCentral* fake_central, const std::string& address);
+
+ FakePeripheral(const FakePeripheral&) = delete;
+ FakePeripheral& operator=(const FakePeripheral&) = delete;
+
~FakePeripheral() override;
// Changes the name of the device.
@@ -165,8 +169,6 @@
// Mutable because IsGattServicesDiscoveryComplete needs to post a task but
// is const.
mutable base::WeakPtrFactory<FakePeripheral> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FakePeripheral);
};
} // namespace bluetooth
diff --git a/device/bluetooth/test/fake_radio_winrt.h b/device/bluetooth/test/fake_radio_winrt.h
index 8f80961..d6221ba 100644
--- a/device/bluetooth/test/fake_radio_winrt.h
+++ b/device/bluetooth/test/fake_radio_winrt.h
@@ -23,6 +23,10 @@
ABI::Windows::Devices::Radios::IRadio> {
public:
FakeRadioWinrt();
+
+ FakeRadioWinrt(const FakeRadioWinrt&) = delete;
+ FakeRadioWinrt& operator=(const FakeRadioWinrt&) = delete;
+
~FakeRadioWinrt() override;
// IRadio:
@@ -66,8 +70,6 @@
// TODO(https://crbug.com/878680): Implement SimulateAdapterPowerSuccess() and
// clean this up.
base::CancelableOnceClosure cancelable_closure_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeRadioWinrt);
};
class FakeRadioStaticsWinrt
@@ -77,6 +79,10 @@
ABI::Windows::Devices::Radios::IRadioStatics> {
public:
FakeRadioStaticsWinrt();
+
+ FakeRadioStaticsWinrt(const FakeRadioStaticsWinrt&) = delete;
+ FakeRadioStaticsWinrt& operator=(const FakeRadioStaticsWinrt&) = delete;
+
~FakeRadioStaticsWinrt() override;
void SimulateRequestAccessAsyncError(
@@ -100,8 +106,6 @@
private:
ABI::Windows::Devices::Radios::RadioAccessStatus access_status_ =
ABI::Windows::Devices::Radios::RadioAccessStatus_Allowed;
-
- DISALLOW_COPY_AND_ASSIGN(FakeRadioStaticsWinrt);
};
} // namespace device
diff --git a/device/bluetooth/test/fake_read_response.h b/device/bluetooth/test/fake_read_response.h
index 81c85ef..bab0f8fe 100644
--- a/device/bluetooth/test/fake_read_response.h
+++ b/device/bluetooth/test/fake_read_response.h
@@ -18,6 +18,10 @@
public:
FakeReadResponse(uint16_t gatt_code,
const absl::optional<std::vector<uint8_t>>& value);
+
+ FakeReadResponse(const FakeReadResponse&) = delete;
+ FakeReadResponse& operator=(const FakeReadResponse&) = delete;
+
~FakeReadResponse();
uint16_t gatt_code() { return gatt_code_; }
@@ -26,8 +30,6 @@
private:
uint16_t gatt_code_;
absl::optional<std::vector<uint8_t>> value_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeReadResponse);
};
} // namespace bluetooth
diff --git a/device/bluetooth/test/mock_bluetooth_adapter.h b/device/bluetooth/test/mock_bluetooth_adapter.h
index b6eacf4..939f79e2 100644
--- a/device/bluetooth/test/mock_bluetooth_adapter.h
+++ b/device/bluetooth/test/mock_bluetooth_adapter.h
@@ -30,6 +30,10 @@
class Observer : public BluetoothAdapter::Observer {
public:
Observer(scoped_refptr<BluetoothAdapter> adapter);
+
+ Observer(const Observer&) = delete;
+ Observer& operator=(const Observer&) = delete;
+
~Observer() override;
MOCK_METHOD2(AdapterPresentChanged, void(BluetoothAdapter*, bool));
@@ -45,8 +49,6 @@
private:
const scoped_refptr<BluetoothAdapter> adapter_;
-
- DISALLOW_COPY_AND_ASSIGN(Observer);
};
MockBluetoothAdapter();
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
index 3ea4055..dbe2bf35 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
+++ b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
@@ -34,6 +34,12 @@
const BluetoothUUID& uuid,
Properties properties,
Permissions permissions);
+
+ MockBluetoothGattCharacteristic(const MockBluetoothGattCharacteristic&) =
+ delete;
+ MockBluetoothGattCharacteristic& operator=(
+ const MockBluetoothGattCharacteristic&) = delete;
+
~MockBluetoothGattCharacteristic() override;
MOCK_CONST_METHOD0(GetIdentifier, std::string());
@@ -139,9 +145,6 @@
void(BluetoothRemoteGattDescriptor*,
base::OnceClosure&,
ErrorCallback&));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic);
};
} // namespace device
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_descriptor.h b/device/bluetooth/test/mock_bluetooth_gatt_descriptor.h
index 06af5cb..12a7fc0 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_descriptor.h
+++ b/device/bluetooth/test/mock_bluetooth_gatt_descriptor.h
@@ -28,6 +28,11 @@
const std::string& identifier,
const BluetoothUUID& uuid,
BluetoothRemoteGattCharacteristic::Permissions permissions);
+
+ MockBluetoothGattDescriptor(const MockBluetoothGattDescriptor&) = delete;
+ MockBluetoothGattDescriptor& operator=(const MockBluetoothGattDescriptor&) =
+ delete;
+
~MockBluetoothGattDescriptor() override;
MOCK_CONST_METHOD0(GetIdentifier, std::string());
@@ -49,9 +54,6 @@
void(const std::vector<uint8_t>&,
base::OnceClosure&,
ErrorCallback&));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattDescriptor);
};
} // namespace device
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h b/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
index 1139bd1..aaa5c668 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
+++ b/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
@@ -24,6 +24,12 @@
public:
explicit MockBluetoothGattNotifySession(
base::WeakPtr<BluetoothRemoteGattCharacteristic> characteristic);
+
+ MockBluetoothGattNotifySession(const MockBluetoothGattNotifySession&) =
+ delete;
+ MockBluetoothGattNotifySession& operator=(
+ const MockBluetoothGattNotifySession&) = delete;
+
~MockBluetoothGattNotifySession() override;
MOCK_METHOD0(IsActive, bool());
@@ -46,8 +52,6 @@
const std::vector<uint8_t>& value);
base::RepeatingTimer test_notifications_timer_;
-
- DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattNotifySession);
};
} // namespace device
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_service.h b/device/bluetooth/test/mock_bluetooth_gatt_service.h
index 60c2d96..8cb9d673 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_service.h
+++ b/device/bluetooth/test/mock_bluetooth_gatt_service.h
@@ -26,6 +26,10 @@
const std::string& identifier,
const BluetoothUUID& uuid,
bool is_primary);
+
+ MockBluetoothGattService(const MockBluetoothGattService&) = delete;
+ MockBluetoothGattService& operator=(const MockBluetoothGattService&) = delete;
+
~MockBluetoothGattService() override;
MOCK_CONST_METHOD0(GetIdentifier, std::string());
@@ -44,9 +48,6 @@
void AddMockCharacteristic(
std::unique_ptr<MockBluetoothGattCharacteristic> mock_characteristic);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattService);
};
} // namespace device
diff --git a/device/bluetooth/test/test_bluetooth_adapter_observer.h b/device/bluetooth/test/test_bluetooth_adapter_observer.h
index 46721f1..99d96c0 100644
--- a/device/bluetooth/test/test_bluetooth_adapter_observer.h
+++ b/device/bluetooth/test/test_bluetooth_adapter_observer.h
@@ -20,6 +20,11 @@
public:
explicit TestBluetoothAdapterObserver(
scoped_refptr<BluetoothAdapter> adapter);
+
+ TestBluetoothAdapterObserver(const TestBluetoothAdapterObserver&) = delete;
+ TestBluetoothAdapterObserver& operator=(const TestBluetoothAdapterObserver&) =
+ delete;
+
~TestBluetoothAdapterObserver() override;
// Reset counters and cached values.
@@ -287,8 +292,6 @@
std::string last_gatt_descriptor_id_;
BluetoothUUID last_gatt_descriptor_uuid_;
std::vector<uint8_t> last_changed_descriptor_value_;
-
- DISALLOW_COPY_AND_ASSIGN(TestBluetoothAdapterObserver);
};
} // namespace device
diff --git a/device/bluetooth/test/test_bluetooth_advertisement_observer.h b/device/bluetooth/test/test_bluetooth_advertisement_observer.h
index c123d2d..070cc5c 100644
--- a/device/bluetooth/test/test_bluetooth_advertisement_observer.h
+++ b/device/bluetooth/test/test_bluetooth_advertisement_observer.h
@@ -18,6 +18,12 @@
public:
explicit TestBluetoothAdvertisementObserver(
scoped_refptr<BluetoothAdvertisement> advertisement);
+
+ TestBluetoothAdvertisementObserver(
+ const TestBluetoothAdvertisementObserver&) = delete;
+ TestBluetoothAdvertisementObserver& operator=(
+ const TestBluetoothAdvertisementObserver&) = delete;
+
~TestBluetoothAdvertisementObserver() override;
// BluetoothAdvertisement::Observer:
@@ -30,8 +36,6 @@
bool released_ = false;
size_t released_count_ = 0;
scoped_refptr<BluetoothAdvertisement> advertisement_;
-
- DISALLOW_COPY_AND_ASSIGN(TestBluetoothAdvertisementObserver);
};
} // namespace device
diff --git a/device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.h b/device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.h
index 4be93a9c..6324721 100644
--- a/device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.h
+++ b/device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.h
@@ -20,6 +20,12 @@
: public BluetoothLocalGattService::Delegate {
public:
TestBluetoothLocalGattServiceDelegate();
+
+ TestBluetoothLocalGattServiceDelegate(
+ const TestBluetoothLocalGattServiceDelegate&) = delete;
+ TestBluetoothLocalGattServiceDelegate& operator=(
+ const TestBluetoothLocalGattServiceDelegate&) = delete;
+
virtual ~TestBluetoothLocalGattServiceDelegate();
// BluetoothLocalGattService::Delegate overrides:
@@ -89,8 +95,6 @@
BluetoothLocalGattDescriptor* expected_descriptor_;
std::map<std::string, bool> notifications_started_for_characteristic_;
-
- DISALLOW_COPY_AND_ASSIGN(TestBluetoothLocalGattServiceDelegate);
};
} // namespace device
diff --git a/device/fido/aoa/android_accessory_discovery.h b/device/fido/aoa/android_accessory_discovery.h
index cf22a43..5a795c4 100644
--- a/device/fido/aoa/android_accessory_discovery.h
+++ b/device/fido/aoa/android_accessory_discovery.h
@@ -55,6 +55,11 @@
// device.
AndroidAccessoryDiscovery(mojo::Remote<device::mojom::UsbDeviceManager>,
std::string request_description);
+
+ AndroidAccessoryDiscovery(const AndroidAccessoryDiscovery&) = delete;
+ AndroidAccessoryDiscovery& operator=(const AndroidAccessoryDiscovery&) =
+ delete;
+
~AndroidAccessoryDiscovery() override;
private:
@@ -109,8 +114,6 @@
mojo::AssociatedReceiver<device::mojom::UsbDeviceManagerClient> receiver_{
this};
base::WeakPtrFactory<AndroidAccessoryDiscovery> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(AndroidAccessoryDiscovery);
};
} // namespace device
diff --git a/device/fido/attestation_object.h b/device/fido/attestation_object.h
index 259b089..84e82d3 100644
--- a/device/fido/attestation_object.h
+++ b/device/fido/attestation_object.h
@@ -32,6 +32,10 @@
std::unique_ptr<AttestationStatement> statement);
AttestationObject(AttestationObject&& other);
AttestationObject& operator=(AttestationObject&& other);
+
+ AttestationObject(const AttestationObject&) = delete;
+ AttestationObject& operator=(const AttestationObject&) = delete;
+
~AttestationObject();
std::vector<uint8_t> GetCredentialId() const;
@@ -75,8 +79,6 @@
private:
AuthenticatorData authenticator_data_;
std::unique_ptr<AttestationStatement> attestation_statement_;
-
- DISALLOW_COPY_AND_ASSIGN(AttestationObject);
};
// Produces a WebAuthN style CBOR-encoded byte-array
diff --git a/device/fido/attestation_statement.h b/device/fido/attestation_statement.h
index c116bbad..ceb9f30 100644
--- a/device/fido/attestation_statement.h
+++ b/device/fido/attestation_statement.h
@@ -24,6 +24,9 @@
// https://www.w3.org/TR/2017/WD-webauthn-20170505/#cred-attestation.
class COMPONENT_EXPORT(DEVICE_FIDO) AttestationStatement {
public:
+ AttestationStatement(const AttestationStatement&) = delete;
+ AttestationStatement& operator=(const AttestationStatement&) = delete;
+
virtual ~AttestationStatement();
// The CBOR map data to be added to the attestation object, structured
@@ -52,9 +55,6 @@
protected:
explicit AttestationStatement(std::string format);
const std::string format_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AttestationStatement);
};
// NoneAttestationStatement represents a “none” attestation, which is used when
@@ -64,15 +64,16 @@
: public AttestationStatement {
public:
NoneAttestationStatement();
+
+ NoneAttestationStatement(const NoneAttestationStatement&) = delete;
+ NoneAttestationStatement& operator=(const NoneAttestationStatement&) = delete;
+
~NoneAttestationStatement() override;
cbor::Value AsCBOR() const override;
bool IsSelfAttestation() const override;
bool IsAttestationCertificateInappropriatelyIdentifying() const override;
absl::optional<base::span<const uint8_t>> GetLeafCertificate() const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NoneAttestationStatement);
};
COMPONENT_EXPORT(DEVICE_FIDO)
diff --git a/device/fido/attestation_statement_formats.h b/device/fido/attestation_statement_formats.h
index 3a80cd72..fa8c78c 100644
--- a/device/fido/attestation_statement_formats.h
+++ b/device/fido/attestation_statement_formats.h
@@ -27,6 +27,10 @@
FidoAttestationStatement(std::vector<uint8_t> signature,
std::vector<std::vector<uint8_t>> x509_certificates);
+
+ FidoAttestationStatement(const FidoAttestationStatement&) = delete;
+ FidoAttestationStatement& operator=(const FidoAttestationStatement&) = delete;
+
~FidoAttestationStatement() override;
cbor::Value AsCBOR() const override;
@@ -37,8 +41,6 @@
private:
const std::vector<uint8_t> signature_;
const std::vector<std::vector<uint8_t>> x509_certificates_;
-
- DISALLOW_COPY_AND_ASSIGN(FidoAttestationStatement);
};
// Implements the "packed" attestation statement format from
diff --git a/device/fido/attested_credential_data.h b/device/fido/attested_credential_data.h
index 6302880..c38ee13 100644
--- a/device/fido/attested_credential_data.h
+++ b/device/fido/attested_credential_data.h
@@ -42,6 +42,9 @@
std::vector<uint8_t> credential_id,
std::unique_ptr<PublicKey> public_key);
+ AttestedCredentialData(const AttestedCredentialData&) = delete;
+ AttestedCredentialData& operator=(const AttestedCredentialData&) = delete;
+
~AttestedCredentialData();
AttestedCredentialData& operator=(AttestedCredentialData&& other);
@@ -73,8 +76,6 @@
std::vector<uint8_t> credential_id_;
std::unique_ptr<PublicKey> public_key_;
-
- DISALLOW_COPY_AND_ASSIGN(AttestedCredentialData);
};
} // namespace device
diff --git a/device/fido/authenticator_data.h b/device/fido/authenticator_data.h
index e9d1891..44092850 100644
--- a/device/fido/authenticator_data.h
+++ b/device/fido/authenticator_data.h
@@ -57,6 +57,9 @@
AuthenticatorData(AuthenticatorData&& other);
AuthenticatorData& operator=(AuthenticatorData&& other);
+ AuthenticatorData(const AuthenticatorData&) = delete;
+ AuthenticatorData& operator=(const AuthenticatorData&) = delete;
+
~AuthenticatorData();
// Replaces device AAGUID in attested credential data section with zeros.
@@ -124,8 +127,6 @@
absl::optional<AttestedCredentialData> attested_data_;
// If |extensions_| has a value, then it will be a CBOR map.
absl::optional<cbor::Value> extensions_;
-
- DISALLOW_COPY_AND_ASSIGN(AuthenticatorData);
};
} // namespace device
diff --git a/device/fido/authenticator_get_info_response.h b/device/fido/authenticator_get_info_response.h
index 82d5761..36aa15d5 100644
--- a/device/fido/authenticator_get_info_response.h
+++ b/device/fido/authenticator_get_info_response.h
@@ -31,6 +31,11 @@
base::span<const uint8_t, kAaguidLength> aaguid);
AuthenticatorGetInfoResponse(AuthenticatorGetInfoResponse&& that);
AuthenticatorGetInfoResponse& operator=(AuthenticatorGetInfoResponse&& other);
+
+ AuthenticatorGetInfoResponse(const AuthenticatorGetInfoResponse&) = delete;
+ AuthenticatorGetInfoResponse& operator=(const AuthenticatorGetInfoResponse&) =
+ delete;
+
~AuthenticatorGetInfoResponse();
static std::vector<uint8_t> EncodeToCBOR(
@@ -60,9 +65,6 @@
absl::optional<uint32_t> max_cred_blob_length;
AuthenticatorSupportedOptions options;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AuthenticatorGetInfoResponse);
};
} // namespace device
diff --git a/device/fido/authenticator_make_credential_response.h b/device/fido/authenticator_make_credential_response.h
index d046cd7..e3e92be 100644
--- a/device/fido/authenticator_make_credential_response.h
+++ b/device/fido/authenticator_make_credential_response.h
@@ -39,6 +39,12 @@
AuthenticatorMakeCredentialResponse&& that);
AuthenticatorMakeCredentialResponse& operator=(
AuthenticatorMakeCredentialResponse&& other);
+
+ AuthenticatorMakeCredentialResponse(
+ const AuthenticatorMakeCredentialResponse&) = delete;
+ AuthenticatorMakeCredentialResponse& operator=(
+ const AuthenticatorMakeCredentialResponse&) = delete;
+
~AuthenticatorMakeCredentialResponse();
std::vector<uint8_t> GetCBOREncodedAttestationObject() const;
@@ -102,8 +108,6 @@
// returned if the credential is created with the largeBlobKey extension on a
// capable authenticator.
absl::optional<std::array<uint8_t, kLargeBlobKeyLength>> large_blob_key_;
-
- DISALLOW_COPY_AND_ASSIGN(AuthenticatorMakeCredentialResponse);
};
// Through cbor::Writer, produces a CTAP style CBOR-encoded byte array
diff --git a/device/fido/ble_adapter_manager.h b/device/fido/ble_adapter_manager.h
index a468b32..f4e247e 100644
--- a/device/fido/ble_adapter_manager.h
+++ b/device/fido/ble_adapter_manager.h
@@ -24,6 +24,10 @@
// a) Exposing API to trigger power Bluetooth adapter on/off.
// b) Notifying FidoRequestHandler when Bluetooth adapter power changes.
explicit BleAdapterManager(FidoRequestHandlerBase* request_handler);
+
+ BleAdapterManager(const BleAdapterManager&) = delete;
+ BleAdapterManager& operator=(const BleAdapterManager&) = delete;
+
~BleAdapterManager() override;
void SetAdapterPower(bool set_power_on);
@@ -41,8 +45,6 @@
bool adapter_powered_on_programmatically_ = false;
base::WeakPtrFactory<BleAdapterManager> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BleAdapterManager);
};
} // namespace device
diff --git a/device/fido/ble_adapter_manager_unittest.cc b/device/fido/ble_adapter_manager_unittest.cc
index c90bf48..5ae690d 100644
--- a/device/fido/ble_adapter_manager_unittest.cc
+++ b/device/fido/ble_adapter_manager_unittest.cc
@@ -36,6 +36,10 @@
class MockObserver : public FidoRequestHandlerBase::Observer {
public:
MockObserver() = default;
+
+ MockObserver(const MockObserver&) = delete;
+ MockObserver& operator=(const MockObserver&) = delete;
+
~MockObserver() override = default;
MOCK_METHOD1(OnTransportAvailabilityEnumerated,
@@ -57,9 +61,6 @@
MOCK_METHOD1(OnRetryUserVerification, void(int));
MOCK_METHOD0(OnInternalUserVerificationLocked, void());
MOCK_METHOD1(SetMightCreateResidentCredential, void(bool));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockObserver);
};
class FakeFidoRequestHandlerBase : public FidoRequestHandlerBase {
diff --git a/device/fido/cable/fido_ble_connection.h b/device/fido/cable/fido_ble_connection.h
index f1d7d6fd..f0f2f53c 100644
--- a/device/fido/cable/fido_ble_connection.h
+++ b/device/fido/cable/fido_ble_connection.h
@@ -57,6 +57,10 @@
std::string device_address,
BluetoothUUID service_uuid,
ReadCallback read_callback);
+
+ FidoBleConnection(const FidoBleConnection&) = delete;
+ FidoBleConnection& operator=(const FidoBleConnection&) = delete;
+
~FidoBleConnection() override;
const std::string& address() const { return address_; }
@@ -123,8 +127,6 @@
absl::optional<std::string> service_revision_bitfield_id_;
base::WeakPtrFactory<FidoBleConnection> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FidoBleConnection);
};
} // namespace device
diff --git a/device/fido/cable/fido_ble_frames.h b/device/fido/cable/fido_ble_frames.h
index a0ea3817..d3ba70d 100644
--- a/device/fido/cable/fido_ble_frames.h
+++ b/device/fido/cable/fido_ble_frames.h
@@ -168,6 +168,10 @@
public:
explicit FidoBleFrameAssembler(
const FidoBleFrameInitializationFragment& fragment);
+
+ FidoBleFrameAssembler(const FidoBleFrameAssembler&) = delete;
+ FidoBleFrameAssembler& operator=(const FidoBleFrameAssembler&) = delete;
+
~FidoBleFrameAssembler();
bool IsDone() const;
@@ -179,8 +183,6 @@
uint16_t data_length_ = 0;
uint8_t sequence_number_ = 0;
FidoBleFrame frame_;
-
- DISALLOW_COPY_AND_ASSIGN(FidoBleFrameAssembler);
};
} // namespace device
diff --git a/device/fido/cable/fido_ble_transaction.h b/device/fido/cable/fido_ble_transaction.h
index ae3eae6b..0fe9a976 100644
--- a/device/fido/cable/fido_ble_transaction.h
+++ b/device/fido/cable/fido_ble_transaction.h
@@ -29,6 +29,10 @@
FidoBleTransaction(FidoBleConnection* connection,
uint16_t control_point_length);
+
+ FidoBleTransaction(const FidoBleTransaction&) = delete;
+ FidoBleTransaction& operator=(const FidoBleTransaction&) = delete;
+
~FidoBleTransaction();
void WriteRequestFrame(FidoBleFrame request_frame, FrameCallback callback);
@@ -66,8 +70,6 @@
bool cancel_sent_ = false;
base::WeakPtrFactory<FidoBleTransaction> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FidoBleTransaction);
};
} // namespace device
diff --git a/device/fido/cable/fido_cable_device.h b/device/fido/cable/fido_cable_device.h
index 064548b..3964723 100644
--- a/device/fido/cable/fido_cable_device.h
+++ b/device/fido/cable/fido_cable_device.h
@@ -39,6 +39,10 @@
FidoCableDevice(BluetoothAdapter* adapter, std::string address);
// Constructor used for testing purposes.
FidoCableDevice(std::unique_ptr<FidoBleConnection> connection);
+
+ FidoCableDevice(const FidoCableDevice&) = delete;
+ FidoCableDevice& operator=(const FidoCableDevice&) = delete;
+
~FidoCableDevice() override;
// Returns FidoDevice::GetId() for a given FidoBleConnection address.
@@ -137,8 +141,6 @@
absl::optional<EncryptionData> encryption_data_;
base::WeakPtrFactory<FidoCableDevice> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FidoCableDevice);
};
} // namespace device
diff --git a/device/fido/cable/fido_cable_discovery.h b/device/fido/cable/fido_cable_discovery.h
index a73b2c6..3ca1c75 100644
--- a/device/fido/cable/fido_cable_discovery.h
+++ b/device/fido/cable/fido_cable_discovery.h
@@ -36,6 +36,10 @@
public FidoCableDevice::Observer {
public:
explicit FidoCableDiscovery(std::vector<CableDiscoveryData> discovery_data);
+
+ FidoCableDiscovery(const FidoCableDiscovery&) = delete;
+ FidoCableDiscovery& operator=(const FidoCableDiscovery&) = delete;
+
~FidoCableDiscovery() override;
// FidoDeviceDiscovery:
@@ -178,8 +182,6 @@
base::flat_set<CableV1DiscoveryEvent> recorded_events_;
base::WeakPtrFactory<FidoCableDiscovery> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FidoCableDiscovery);
};
} // namespace device
diff --git a/device/fido/cable/fido_cable_handshake_handler.h b/device/fido/cable/fido_cable_handshake_handler.h
index f1ce823..ed634b5 100644
--- a/device/fido/cable/fido_cable_handshake_handler.h
+++ b/device/fido/cable/fido_cable_handshake_handler.h
@@ -47,6 +47,11 @@
FidoCableV1HandshakeHandler(FidoCableDevice* device,
base::span<const uint8_t, 8> nonce,
base::span<const uint8_t, 32> session_pre_key);
+
+ FidoCableV1HandshakeHandler(const FidoCableV1HandshakeHandler&) = delete;
+ FidoCableV1HandshakeHandler& operator=(const FidoCableV1HandshakeHandler&) =
+ delete;
+
~FidoCableV1HandshakeHandler() override;
// FidoCableHandshakeHandler:
@@ -69,8 +74,6 @@
std::string handshake_key_;
base::WeakPtrFactory<FidoCableV1HandshakeHandler> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FidoCableV1HandshakeHandler);
};
} // namespace device
diff --git a/device/fido/cable/fido_tunnel_device.h b/device/fido/cable/fido_tunnel_device.h
index 0b46acc..a6ed23e 100644
--- a/device/fido/cable/fido_tunnel_device.h
+++ b/device/fido/cable/fido_tunnel_device.h
@@ -48,6 +48,9 @@
std::unique_ptr<Pairing> pairing,
base::OnceClosure pairing_is_invalid);
+ FidoTunnelDevice(const FidoTunnelDevice&) = delete;
+ FidoTunnelDevice& operator=(const FidoTunnelDevice&) = delete;
+
~FidoTunnelDevice() override;
// MatchAdvert is only valid for a pairing-initiated connection. It returns
@@ -164,8 +167,6 @@
DeviceCallback callback_;
SEQUENCE_CHECKER(sequence_checker_);
base::WeakPtrFactory<FidoTunnelDevice> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FidoTunnelDevice);
};
} // namespace cablev2
diff --git a/device/fido/cable/mock_fido_ble_connection.h b/device/fido/cable/mock_fido_ble_connection.h
index ae802c35..d108bff 100644
--- a/device/fido/cable/mock_fido_ble_connection.h
+++ b/device/fido/cable/mock_fido_ble_connection.h
@@ -20,6 +20,10 @@
class MockFidoBleConnection : public FidoBleConnection {
public:
MockFidoBleConnection(BluetoothAdapter* adapter, std::string device_address);
+
+ MockFidoBleConnection(const MockFidoBleConnection&) = delete;
+ MockFidoBleConnection& operator=(const MockFidoBleConnection&) = delete;
+
~MockFidoBleConnection() override;
// GMock cannot mock a method taking a move-only type.
@@ -36,9 +40,6 @@
WriteCallback cb) override;
ReadCallback& read_callback() { return read_callback_; }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockFidoBleConnection);
};
} // namespace device
diff --git a/device/fido/credential_management_handler.h b/device/fido/credential_management_handler.h
index c7e4dfd..31f54f0 100644
--- a/device/fido/credential_management_handler.h
+++ b/device/fido/credential_management_handler.h
@@ -62,6 +62,11 @@
ReadyCallback ready_callback,
GetPINCallback get_pin_callback,
FinishedCallback finished_callback);
+
+ CredentialManagementHandler(const CredentialManagementHandler&) = delete;
+ CredentialManagementHandler& operator=(const CredentialManagementHandler&) =
+ delete;
+
~CredentialManagementHandler() override;
// GetCredentials invokes a series of commands to fetch all credentials stored
@@ -137,8 +142,6 @@
FinishedCallback finished_callback_;
base::WeakPtrFactory<CredentialManagementHandler> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(CredentialManagementHandler);
};
} // namespace device
diff --git a/device/fido/ctap2_device_operation.h b/device/fido/ctap2_device_operation.h
index 779dc2f4..cbca1ad 100644
--- a/device/fido/ctap2_device_operation.h
+++ b/device/fido/ctap2_device_operation.h
@@ -71,6 +71,9 @@
device_response_parser_(std::move(device_response_parser)),
string_fixup_predicate_(string_fixup_predicate) {}
+ Ctap2DeviceOperation(const Ctap2DeviceOperation&) = delete;
+ Ctap2DeviceOperation& operator=(const Ctap2DeviceOperation&) = delete;
+
~Ctap2DeviceOperation() override = default;
void Start() override {
@@ -205,8 +208,6 @@
DeviceResponseParser device_response_parser_;
const CBORPathPredicate string_fixup_predicate_;
base::WeakPtrFactory<Ctap2DeviceOperation> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(Ctap2DeviceOperation);
};
} // namespace device
diff --git a/device/fido/device_operation.h b/device/fido/device_operation.h
index c42bec4..c9b31bd 100644
--- a/device/fido/device_operation.h
+++ b/device/fido/device_operation.h
@@ -48,6 +48,9 @@
request_(std::move(request)),
callback_(std::move(callback)) {}
+ DeviceOperation(const DeviceOperation&) = delete;
+ DeviceOperation& operator=(const DeviceOperation&) = delete;
+
~DeviceOperation() override = default;
protected:
@@ -71,8 +74,6 @@
FidoDevice* const device_ = nullptr;
Request request_;
DeviceResponseCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceOperation);
};
} // namespace device
diff --git a/device/fido/fake_fido_discovery.h b/device/fido/fake_fido_discovery.h
index ee5aa1f..236a56c 100644
--- a/device/fido/fake_fido_discovery.h
+++ b/device/fido/fake_fido_discovery.h
@@ -95,6 +95,10 @@
using StartMode = FakeFidoDiscovery::StartMode;
FakeFidoDiscoveryFactory();
+
+ FakeFidoDiscoveryFactory(const FakeFidoDiscoveryFactory&) = delete;
+ FakeFidoDiscoveryFactory& operator=(const FakeFidoDiscoveryFactory&) = delete;
+
~FakeFidoDiscoveryFactory() override;
// Constructs a fake discovery to be returned from the next call to
@@ -119,8 +123,6 @@
std::unique_ptr<FakeFidoDiscovery> next_nfc_discovery_;
std::unique_ptr<FakeFidoDiscovery> next_cable_discovery_;
std::unique_ptr<FakeFidoDiscovery> next_platform_discovery_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeFidoDiscoveryFactory);
};
} // namespace test
diff --git a/device/fido/fake_fido_discovery_unittest.cc b/device/fido/fake_fido_discovery_unittest.cc
index cc29172..dd5b20c 100644
--- a/device/fido/fake_fido_discovery_unittest.cc
+++ b/device/fido/fake_fido_discovery_unittest.cc
@@ -26,14 +26,15 @@
class FakeFidoDiscoveryTest : public ::testing::Test {
public:
FakeFidoDiscoveryTest() = default;
+
+ FakeFidoDiscoveryTest(const FakeFidoDiscoveryTest&) = delete;
+ FakeFidoDiscoveryTest& operator=(const FakeFidoDiscoveryTest&) = delete;
+
~FakeFidoDiscoveryTest() override = default;
protected:
FakeFidoDiscoveryFactory fake_fido_discovery_factory_;
base::test::TaskEnvironment task_environment_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FakeFidoDiscoveryTest);
};
using FakeFidoDiscoveryFactoryTest = FakeFidoDiscoveryTest;
diff --git a/device/fido/fido_authenticator.h b/device/fido/fido_authenticator.h
index 8f7fffb..0a45824 100644
--- a/device/fido/fido_authenticator.h
+++ b/device/fido/fido_authenticator.h
@@ -81,6 +81,10 @@
callback)>;
FidoAuthenticator() = default;
+
+ FidoAuthenticator(const FidoAuthenticator&) = delete;
+ FidoAuthenticator& operator=(const FidoAuthenticator&) = delete;
+
virtual ~FidoAuthenticator() = default;
// Sends GetInfo request to connected authenticator. Once response to GetInfo
@@ -283,9 +287,6 @@
virtual bool IsChromeOSAuthenticator() const = 0;
#endif
virtual base::WeakPtr<FidoAuthenticator> GetWeakPtr() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FidoAuthenticator);
};
} // namespace device
diff --git a/device/fido/fido_device.h b/device/fido/fido_device.h
index e2ccf3bf..36d1991c 100644
--- a/device/fido/fido_device.h
+++ b/device/fido/fido_device.h
@@ -59,6 +59,10 @@
};
FidoDevice();
+
+ FidoDevice(const FidoDevice&) = delete;
+ FidoDevice& operator=(const FidoDevice&) = delete;
+
virtual ~FidoDevice();
// Pure virtual function defined by each device type, implementing
// the device communication transaction. The function must not immediately
@@ -147,8 +151,6 @@
// device. It starts at one so that zero can be used as an invalid value where
// needed.
CancelToken next_cancel_token_ = kInvalidCancelToken + 1;
-
- DISALLOW_COPY_AND_ASSIGN(FidoDevice);
};
} // namespace device
diff --git a/device/fido/fido_device_authenticator.h b/device/fido/fido_device_authenticator.h
index a90c519..aeebe55b 100644
--- a/device/fido/fido_device_authenticator.h
+++ b/device/fido/fido_device_authenticator.h
@@ -38,6 +38,10 @@
: public FidoAuthenticator {
public:
explicit FidoDeviceAuthenticator(std::unique_ptr<FidoDevice> device);
+
+ FidoDeviceAuthenticator(const FidoDeviceAuthenticator&) = delete;
+ FidoDeviceAuthenticator& operator=(const FidoDeviceAuthenticator&) = delete;
+
~FidoDeviceAuthenticator() override;
// FidoAuthenticator:
@@ -268,8 +272,6 @@
absl::optional<PINUVAuthProtocol> chosen_pin_uv_auth_protocol_;
base::WeakPtrFactory<FidoDeviceAuthenticator> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FidoDeviceAuthenticator);
};
} // namespace device
diff --git a/device/fido/fido_device_discovery_unittest.cc b/device/fido/fido_device_discovery_unittest.cc
index 6b1dd0e..37445da 100644
--- a/device/fido/fido_device_discovery_unittest.cc
+++ b/device/fido/fido_device_discovery_unittest.cc
@@ -32,6 +32,10 @@
public:
explicit ConcreteFidoDiscovery(FidoTransportProtocol transport)
: FidoDeviceDiscovery(transport) {}
+
+ ConcreteFidoDiscovery(const ConcreteFidoDiscovery&) = delete;
+ ConcreteFidoDiscovery& operator=(const ConcreteFidoDiscovery&) = delete;
+
~ConcreteFidoDiscovery() override = default;
MOCK_METHOD0(StartInternal, void());
@@ -39,9 +43,6 @@
using FidoDeviceDiscovery::AddDevice;
using FidoDeviceDiscovery::NotifyDiscoveryStarted;
using FidoDeviceDiscovery::RemoveDevice;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ConcreteFidoDiscovery);
};
} // namespace
diff --git a/device/fido/fido_discovery_base.h b/device/fido/fido_discovery_base.h
index 8a29e3a..2c8d9aa 100644
--- a/device/fido/fido_discovery_base.h
+++ b/device/fido/fido_discovery_base.h
@@ -20,6 +20,9 @@
class COMPONENT_EXPORT(DEVICE_FIDO) FidoDiscoveryBase {
public:
+ FidoDiscoveryBase(const FidoDiscoveryBase&) = delete;
+ FidoDiscoveryBase& operator=(const FidoDiscoveryBase&) = delete;
+
virtual ~FidoDiscoveryBase();
class COMPONENT_EXPORT(DEVICE_FIDO) Observer {
@@ -62,8 +65,6 @@
private:
const FidoTransportProtocol transport_;
Observer* observer_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(FidoDiscoveryBase);
};
} // namespace device
diff --git a/device/fido/fido_request_handler_base.h b/device/fido/fido_request_handler_base.h
index 862d9a4..fa1533d 100644
--- a/device/fido/fido_request_handler_base.h
+++ b/device/fido/fido_request_handler_base.h
@@ -196,6 +196,10 @@
FidoRequestHandlerBase(
FidoDiscoveryFactory* fido_discovery_factory,
const base::flat_set<FidoTransportProtocol>& available_transports);
+
+ FidoRequestHandlerBase(const FidoRequestHandlerBase&) = delete;
+ FidoRequestHandlerBase& operator=(const FidoRequestHandlerBase&) = delete;
+
~FidoRequestHandlerBase() override;
// Triggers DispatchRequest() if |active_authenticators_| hold
@@ -327,7 +331,6 @@
bool internal_authenticator_found_ = false;
base::WeakPtrFactory<FidoRequestHandlerBase> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(FidoRequestHandlerBase);
};
} // namespace device
diff --git a/device/fido/fido_request_handler_unittest.cc b/device/fido/fido_request_handler_unittest.cc
index b959aaf..1f26312 100644
--- a/device/fido/fido_request_handler_unittest.cc
+++ b/device/fido/fido_request_handler_unittest.cc
@@ -72,6 +72,10 @@
FidoRequestHandlerBase::TransportAvailabilityInfo>;
TestObserver() = default;
+
+ TestObserver(const TestObserver&) = delete;
+ TestObserver& operator=(const TestObserver&) = delete;
+
~TestObserver() override = default;
FidoRequestHandlerBase::TransportAvailabilityInfo
@@ -126,8 +130,6 @@
private:
TransportAvailabilityNotificationReceiver
transport_availability_notification_receiver_;
-
- DISALLOW_COPY_AND_ASSIGN(TestObserver);
};
// Fake FidoTask implementation that sends an empty byte array to the device
diff --git a/device/fido/fido_task.h b/device/fido/fido_task.h
index acf467c..313caab 100644
--- a/device/fido/fido_task.h
+++ b/device/fido/fido_task.h
@@ -23,6 +23,10 @@
public:
// The |device| must outlive the FidoTask instance.
explicit FidoTask(FidoDevice* device);
+
+ FidoTask(const FidoTask&) = delete;
+ FidoTask& operator=(const FidoTask&) = delete;
+
virtual ~FidoTask();
// Cancel attempts to cancel the operation. This may safely be called at any
@@ -44,8 +48,6 @@
private:
FidoDevice* const device_;
base::WeakPtrFactory<FidoTask> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FidoTask);
};
} // namespace device
diff --git a/device/fido/get_assertion_request_handler.h b/device/fido/get_assertion_request_handler.h
index 3eb8a8f..37dcbcb 100644
--- a/device/fido/get_assertion_request_handler.h
+++ b/device/fido/get_assertion_request_handler.h
@@ -67,6 +67,11 @@
CtapGetAssertionOptions request_options,
bool allow_skipping_pin_touch,
CompletionCallback completion_callback);
+
+ GetAssertionRequestHandler(const GetAssertionRequestHandler&) = delete;
+ GetAssertionRequestHandler& operator=(const GetAssertionRequestHandler&) =
+ delete;
+
~GetAssertionRequestHandler() override;
private:
@@ -163,8 +168,6 @@
SEQUENCE_CHECKER(my_sequence_checker_);
base::WeakPtrFactory<GetAssertionRequestHandler> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(GetAssertionRequestHandler);
};
} // namespace device
diff --git a/device/fido/get_assertion_task.h b/device/fido/get_assertion_task.h
index 7ec054c..25a64a4 100644
--- a/device/fido/get_assertion_task.h
+++ b/device/fido/get_assertion_task.h
@@ -48,6 +48,10 @@
CtapGetAssertionRequest request,
CtapGetAssertionOptions options,
GetAssertionTaskCallback callback);
+
+ GetAssertionTask(const GetAssertionTask&) = delete;
+ GetAssertionTask& operator=(const GetAssertionTask&) = delete;
+
~GetAssertionTask() override;
// FidoTask:
@@ -107,8 +111,6 @@
bool canceled_ = false;
base::WeakPtrFactory<GetAssertionTask> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(GetAssertionTask);
};
} // namespace device
diff --git a/device/fido/hid/fido_hid_device_unittest.cc b/device/fido/hid/fido_hid_device_unittest.cc
index 067a7de..866a1db 100644
--- a/device/fido/hid/fido_hid_device_unittest.cc
+++ b/device/fido/hid/fido_hid_device_unittest.cc
@@ -202,6 +202,12 @@
explicit FidoDeviceEnumerateCallbackReceiver(
device::mojom::HidManager* hid_manager)
: hid_manager_(hid_manager) {}
+
+ FidoDeviceEnumerateCallbackReceiver(
+ const FidoDeviceEnumerateCallbackReceiver&) = delete;
+ FidoDeviceEnumerateCallbackReceiver& operator=(
+ const FidoDeviceEnumerateCallbackReceiver&) = delete;
+
~FidoDeviceEnumerateCallbackReceiver() = default;
std::vector<std::unique_ptr<FidoHidDevice>> TakeReturnedDevicesFiltered() {
@@ -228,8 +234,6 @@
private:
device::mojom::HidManager* hid_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(FidoDeviceEnumerateCallbackReceiver);
};
using TestDeviceCallbackReceiver =
diff --git a/device/fido/hid/fido_hid_discovery.h b/device/fido/hid/fido_hid_discovery.h
index b208c36..a25ceca 100644
--- a/device/fido/hid/fido_hid_discovery.h
+++ b/device/fido/hid/fido_hid_discovery.h
@@ -38,6 +38,10 @@
device::mojom::HidManagerClient {
public:
explicit FidoHidDiscovery(base::flat_set<VidPid> ignore_list = {});
+
+ FidoHidDiscovery(const FidoHidDiscovery&) = delete;
+ FidoHidDiscovery& operator=(const FidoHidDiscovery&) = delete;
+
~FidoHidDiscovery() override;
// Sets a callback for this class to use when binding a HidManager receiver.
@@ -61,8 +65,6 @@
HidDeviceFilter filter_;
base::flat_set<VidPid> ignore_list_;
base::WeakPtrFactory<FidoHidDiscovery> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FidoHidDiscovery);
};
} // namespace device
diff --git a/device/fido/hid/fido_hid_message.h b/device/fido/hid/fido_hid_message.h
index affc9a8..33623515 100644
--- a/device/fido/hid/fido_hid_message.h
+++ b/device/fido/hid/fido_hid_message.h
@@ -39,6 +39,10 @@
FidoHidMessage(FidoHidMessage&& that);
FidoHidMessage& operator=(FidoHidMessage&& other);
+
+ FidoHidMessage(const FidoHidMessage&) = delete;
+ FidoHidMessage& operator=(const FidoHidMessage&) = delete;
+
~FidoHidMessage();
bool MessageComplete() const;
@@ -68,8 +72,6 @@
FidoHidDeviceCommand cmd_ = FidoHidDeviceCommand::kMsg;
base::circular_deque<std::unique_ptr<FidoHidPacket>> packets_;
size_t remaining_size_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(FidoHidMessage);
};
} // namespace device
diff --git a/device/fido/hid/fido_hid_packet.h b/device/fido/hid/fido_hid_packet.h
index a235763..3abf7feee 100644
--- a/device/fido/hid/fido_hid_packet.h
+++ b/device/fido/hid/fido_hid_packet.h
@@ -27,6 +27,10 @@
class COMPONENT_EXPORT(DEVICE_FIDO) FidoHidPacket {
public:
FidoHidPacket(std::vector<uint8_t> data, uint32_t channel_id);
+
+ FidoHidPacket(const FidoHidPacket&) = delete;
+ FidoHidPacket& operator=(const FidoHidPacket&) = delete;
+
virtual ~FidoHidPacket();
virtual std::vector<uint8_t> GetSerializedData() const = 0;
@@ -41,8 +45,6 @@
private:
friend class HidMessage;
-
- DISALLOW_COPY_AND_ASSIGN(FidoHidPacket);
};
// FidoHidInitPacket, based on the CTAP specification consists of a header with
@@ -66,6 +68,10 @@
FidoHidDeviceCommand cmd,
std::vector<uint8_t> data,
uint16_t payload_length);
+
+ FidoHidInitPacket(const FidoHidInitPacket&) = delete;
+ FidoHidInitPacket& operator=(const FidoHidInitPacket&) = delete;
+
~FidoHidInitPacket() final;
std::vector<uint8_t> GetSerializedData() const final;
@@ -75,8 +81,6 @@
private:
FidoHidDeviceCommand command_;
uint16_t payload_length_;
-
- DISALLOW_COPY_AND_ASSIGN(FidoHidInitPacket);
};
// FidoHidContinuationPacket, based on the CTAP Specification consists of a
@@ -98,6 +102,11 @@
FidoHidContinuationPacket(uint32_t channel_id,
uint8_t sequence,
std::vector<uint8_t> data);
+
+ FidoHidContinuationPacket(const FidoHidContinuationPacket&) = delete;
+ FidoHidContinuationPacket& operator=(const FidoHidContinuationPacket&) =
+ delete;
+
~FidoHidContinuationPacket() final;
std::vector<uint8_t> GetSerializedData() const final;
@@ -105,8 +114,6 @@
private:
uint8_t sequence_;
-
- DISALLOW_COPY_AND_ASSIGN(FidoHidContinuationPacket);
};
} // namespace device
diff --git a/device/fido/mac/authenticator.h b/device/fido/mac/authenticator.h
index 67445ff..3189823c 100644
--- a/device/fido/mac/authenticator.h
+++ b/device/fido/mac/authenticator.h
@@ -47,6 +47,9 @@
static std::unique_ptr<TouchIdAuthenticator> Create(
AuthenticatorConfig config);
+ TouchIdAuthenticator(const TouchIdAuthenticator&) = delete;
+ TouchIdAuthenticator& operator=(const TouchIdAuthenticator&) = delete;
+
~TouchIdAuthenticator() override;
bool HasCredentialForGetAssertionRequest(
@@ -85,9 +88,6 @@
std::unique_ptr<Operation> operation_;
base::WeakPtrFactory<TouchIdAuthenticator> weak_factory_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TouchIdAuthenticator);
};
} // namespace mac
diff --git a/device/fido/mac/credential_store.h b/device/fido/mac/credential_store.h
index 644cf5f..2384a08 100644
--- a/device/fido/mac/credential_store.h
+++ b/device/fido/mac/credential_store.h
@@ -54,6 +54,10 @@
: public ::device::fido::PlatformCredentialStore {
public:
explicit TouchIdCredentialStore(AuthenticatorConfig config);
+
+ TouchIdCredentialStore(const TouchIdCredentialStore&) = delete;
+ TouchIdCredentialStore& operator=(const TouchIdCredentialStore&) = delete;
+
~TouchIdCredentialStore() override;
// An LAContext that has been successfully evaluated using |TouchIdContext|
@@ -137,8 +141,6 @@
AuthenticatorConfig config_;
LAContext* authentication_context_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(TouchIdCredentialStore);
};
} // namespace mac
diff --git a/device/fido/mac/fake_keychain.h b/device/fido/mac/fake_keychain.h
index 97f275aa..5484f6a 100644
--- a/device/fido/mac/fake_keychain.h
+++ b/device/fido/mac/fake_keychain.h
@@ -22,18 +22,23 @@
Item();
Item(Item&&);
Item& operator=(Item&&);
+
+ Item(const Item&) = delete;
+ Item& operator=(const Item&) = delete;
+
~Item();
std::string label;
std::string application_label;
std::string application_tag;
base::ScopedCFTypeRef<SecKeyRef> private_key;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Item);
};
FakeKeychain();
+
+ FakeKeychain(const FakeKeychain&) = delete;
+ FakeKeychain& operator=(const FakeKeychain&) = delete;
+
~FakeKeychain() override;
protected:
@@ -46,8 +51,6 @@
private:
std::vector<Item> items_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeKeychain);
};
} // namespace mac
diff --git a/device/fido/mac/fake_touch_id_context.h b/device/fido/mac/fake_touch_id_context.h
index 5d75db8..b913c9cd 100644
--- a/device/fido/mac/fake_touch_id_context.h
+++ b/device/fido/mac/fake_touch_id_context.h
@@ -16,6 +16,9 @@
class API_AVAILABLE(macosx(10.12.2)) FakeTouchIdContext
: public TouchIdContext {
public:
+ FakeTouchIdContext(const FakeTouchIdContext&) = delete;
+ FakeTouchIdContext& operator=(const FakeTouchIdContext&) = delete;
+
~FakeTouchIdContext() override;
// TouchIdContext:
@@ -31,8 +34,6 @@
FakeTouchIdContext();
bool callback_result_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(FakeTouchIdContext);
};
} // namespace mac
diff --git a/device/fido/mac/get_assertion_operation.h b/device/fido/mac/get_assertion_operation.h
index 3ac2e20..47f162c9 100644
--- a/device/fido/mac/get_assertion_operation.h
+++ b/device/fido/mac/get_assertion_operation.h
@@ -39,6 +39,10 @@
GetAssertionOperation(CtapGetAssertionRequest request,
TouchIdCredentialStore* credential_store,
Callback callback);
+
+ GetAssertionOperation(const GetAssertionOperation&) = delete;
+ GetAssertionOperation& operator=(const GetAssertionOperation&) = delete;
+
~GetAssertionOperation() override;
// Operation:
@@ -60,8 +64,6 @@
TouchIdCredentialStore* const credential_store_;
Callback callback_;
std::list<Credential> matching_credentials_;
-
- DISALLOW_COPY_AND_ASSIGN(GetAssertionOperation);
};
} // namespace mac
diff --git a/device/fido/mac/make_credential_operation.h b/device/fido/mac/make_credential_operation.h
index 921af42d4..ed030ad 100644
--- a/device/fido/mac/make_credential_operation.h
+++ b/device/fido/mac/make_credential_operation.h
@@ -56,6 +56,10 @@
MakeCredentialOperation(CtapMakeCredentialRequest request,
TouchIdCredentialStore* credential_store,
Callback callback);
+
+ MakeCredentialOperation(const MakeCredentialOperation&) = delete;
+ MakeCredentialOperation& operator=(const MakeCredentialOperation&) = delete;
+
~MakeCredentialOperation() override;
// Operation:
@@ -70,8 +74,6 @@
const CtapMakeCredentialRequest request_;
TouchIdCredentialStore* const credential_store_;
Callback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(MakeCredentialOperation);
};
} // namespace mac
diff --git a/device/fido/mac/operation.h b/device/fido/mac/operation.h
index c62a2c9..3a72a32 100644
--- a/device/fido/mac/operation.h
+++ b/device/fido/mac/operation.h
@@ -14,11 +14,12 @@
class Operation {
public:
Operation() = default;
+
+ Operation(const Operation&) = delete;
+ Operation& operator=(const Operation&) = delete;
+
virtual ~Operation() = default;
virtual void Run() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Operation);
};
} // namespace mac
diff --git a/device/fido/mac/scoped_touch_id_test_environment.h b/device/fido/mac/scoped_touch_id_test_environment.h
index 6512d5c..1decedc8 100644
--- a/device/fido/mac/scoped_touch_id_test_environment.h
+++ b/device/fido/mac/scoped_touch_id_test_environment.h
@@ -32,6 +32,11 @@
API_AVAILABLE(macosx(10.12.2)) ScopedTouchIdTestEnvironment {
public:
ScopedTouchIdTestEnvironment();
+
+ ScopedTouchIdTestEnvironment(const ScopedTouchIdTestEnvironment&) = delete;
+ ScopedTouchIdTestEnvironment& operator=(const ScopedTouchIdTestEnvironment&) =
+ delete;
+
~ScopedTouchIdTestEnvironment();
// ForgeNextTouchIdContext sets up the FakeTouchIdContext returned by the
@@ -61,8 +66,6 @@
std::unique_ptr<FakeTouchIdContext> next_touch_id_context_;
std::unique_ptr<FakeKeychain> keychain_;
bool touch_id_available_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedTouchIdTestEnvironment);
};
} // namespace mac
diff --git a/device/fido/mac/touch_id_context.h b/device/fido/mac/touch_id_context.h
index 7908691..12adcc9 100644
--- a/device/fido/mac/touch_id_context.h
+++ b/device/fido/mac/touch_id_context.h
@@ -50,6 +50,9 @@
static void TouchIdAvailable(AuthenticatorConfig config,
base::OnceCallback<void(bool is_available)>);
+ TouchIdContext(const TouchIdContext&) = delete;
+ TouchIdContext& operator=(const TouchIdContext&) = delete;
+
virtual ~TouchIdContext();
// PromptTouchId displays a local user authentication prompt with the provided
@@ -87,7 +90,6 @@
base::WeakPtrFactory<TouchIdContext> weak_ptr_factory_;
friend class ScopedTouchIdTestEnvironment;
- DISALLOW_COPY_AND_ASSIGN(TouchIdContext);
};
} // namespace mac
diff --git a/device/fido/make_credential_request_handler.h b/device/fido/make_credential_request_handler.h
index c424ce6..f9cc637 100644
--- a/device/fido/make_credential_request_handler.h
+++ b/device/fido/make_credential_request_handler.h
@@ -77,6 +77,11 @@
CtapMakeCredentialRequest request_parameter,
const MakeCredentialOptions& options,
CompletionCallback completion_callback);
+
+ MakeCredentialRequestHandler(const MakeCredentialRequestHandler&) = delete;
+ MakeCredentialRequestHandler& operator=(const MakeCredentialRequestHandler&) =
+ delete;
+
~MakeCredentialRequestHandler() override;
private:
@@ -170,8 +175,6 @@
SEQUENCE_CHECKER(my_sequence_checker_);
base::WeakPtrFactory<MakeCredentialRequestHandler> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MakeCredentialRequestHandler);
};
} // namespace device
diff --git a/device/fido/make_credential_task.h b/device/fido/make_credential_task.h
index 878fe9e5..3d1acf8 100644
--- a/device/fido/make_credential_task.h
+++ b/device/fido/make_credential_task.h
@@ -42,6 +42,10 @@
CtapMakeCredentialRequest request,
MakeCredentialOptions options,
MakeCredentialTaskCallback callback);
+
+ MakeCredentialTask(const MakeCredentialTask&) = delete;
+ MakeCredentialTask& operator=(const MakeCredentialTask&) = delete;
+
~MakeCredentialTask() override;
// GetTouchRequest returns a request that will cause a device to flash and
@@ -87,8 +91,6 @@
bool canceled_ = false;
base::WeakPtrFactory<MakeCredentialTask> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MakeCredentialTask);
};
// FilterAndBatchCredentialDescriptors splits a list of
diff --git a/device/fido/mock_fido_device.h b/device/fido/mock_fido_device.h
index 3b8750a..8b331ab 100644
--- a/device/fido/mock_fido_device.h
+++ b/device/fido/mock_fido_device.h
@@ -58,6 +58,10 @@
MockFidoDevice();
MockFidoDevice(ProtocolVersion protocol_version,
absl::optional<AuthenticatorGetInfoResponse> device_info);
+
+ MockFidoDevice(const MockFidoDevice&) = delete;
+ MockFidoDevice& operator=(const MockFidoDevice&) = delete;
+
~MockFidoDevice() override;
// TODO(crbug.com/729950): Remove these workarounds once support for move-only
@@ -106,8 +110,6 @@
FidoTransportProtocol transport_protocol_ =
FidoTransportProtocol::kUsbHumanInterfaceDevice;
base::WeakPtrFactory<FidoDevice> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MockFidoDevice);
};
} // namespace device
diff --git a/device/fido/mock_fido_discovery_observer.h b/device/fido/mock_fido_discovery_observer.h
index 6be1988..3f942e88 100644
--- a/device/fido/mock_fido_discovery_observer.h
+++ b/device/fido/mock_fido_discovery_observer.h
@@ -20,6 +20,11 @@
class MockFidoDiscoveryObserver : public FidoDiscoveryBase::Observer {
public:
MockFidoDiscoveryObserver();
+
+ MockFidoDiscoveryObserver(const MockFidoDiscoveryObserver&) = delete;
+ MockFidoDiscoveryObserver& operator=(const MockFidoDiscoveryObserver&) =
+ delete;
+
~MockFidoDiscoveryObserver() override;
MOCK_METHOD3(DiscoveryStarted,
@@ -33,9 +38,6 @@
void(FidoDiscoveryBase*, const std::string&, std::string));
MOCK_METHOD3(AuthenticatorPairingModeChanged,
void(FidoDiscoveryBase*, const std::string&, bool));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockFidoDiscoveryObserver);
};
} // namespace device
diff --git a/device/fido/opaque_attestation_statement.h b/device/fido/opaque_attestation_statement.h
index f97bdf2..ddac9ce4 100644
--- a/device/fido/opaque_attestation_statement.h
+++ b/device/fido/opaque_attestation_statement.h
@@ -20,6 +20,11 @@
public:
OpaqueAttestationStatement(std::string attestation_format,
cbor::Value attestation_statement_map);
+
+ OpaqueAttestationStatement(const OpaqueAttestationStatement&) = delete;
+ OpaqueAttestationStatement& operator=(const OpaqueAttestationStatement&) =
+ delete;
+
~OpaqueAttestationStatement() override;
// AttestationStatement:
@@ -30,8 +35,6 @@
private:
cbor::Value attestation_statement_map_;
-
- DISALLOW_COPY_AND_ASSIGN(OpaqueAttestationStatement);
};
} // namespace device
diff --git a/device/fido/reset_request_handler.h b/device/fido/reset_request_handler.h
index 173d904..3d42705 100644
--- a/device/fido/reset_request_handler.h
+++ b/device/fido/reset_request_handler.h
@@ -47,6 +47,10 @@
FinishedCallback finished_callback,
std::unique_ptr<FidoDiscoveryFactory> fido_discovery_factory =
std::make_unique<FidoDiscoveryFactory>());
+
+ ResetRequestHandler(const ResetRequestHandler&) = delete;
+ ResetRequestHandler& operator=(const ResetRequestHandler&) = delete;
+
~ResetRequestHandler() override;
private:
@@ -63,8 +67,6 @@
std::unique_ptr<FidoDiscoveryFactory> fido_discovery_factory_;
SEQUENCE_CHECKER(my_sequence_checker_);
base::WeakPtrFactory<ResetRequestHandler> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ResetRequestHandler);
};
} // namespace device
diff --git a/device/fido/set_pin_request_handler.h b/device/fido/set_pin_request_handler.h
index e841e054..050aee5 100644
--- a/device/fido/set_pin_request_handler.h
+++ b/device/fido/set_pin_request_handler.h
@@ -66,6 +66,10 @@
FinishedCallback finished_callback,
std::unique_ptr<FidoDiscoveryFactory> fido_discovery_factory =
std::make_unique<FidoDiscoveryFactory>());
+
+ SetPINRequestHandler(const SetPINRequestHandler&) = delete;
+ SetPINRequestHandler& operator=(const SetPINRequestHandler&) = delete;
+
~SetPINRequestHandler() override;
// ProvidePIN may be called after |get_pin_callback| has been used to indicate
@@ -106,8 +110,6 @@
std::unique_ptr<FidoDiscoveryFactory> fido_discovery_factory_;
SEQUENCE_CHECKER(my_sequence_checker_);
base::WeakPtrFactory<SetPINRequestHandler> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SetPINRequestHandler);
};
} // namespace device
diff --git a/device/fido/test_callback_receiver.h b/device/fido/test_callback_receiver.h
index d006268..989a97d 100644
--- a/device/fido/test_callback_receiver.h
+++ b/device/fido/test_callback_receiver.h
@@ -43,6 +43,10 @@
using TupleOfNonReferenceArgs = std::tuple<std::decay_t<CallbackArgs>...>;
TestCallbackReceiver() = default;
+
+ TestCallbackReceiver(const TestCallbackReceiver&) = delete;
+ TestCallbackReceiver& operator=(const TestCallbackReceiver&) = delete;
+
~TestCallbackReceiver() = default;
// Whether the |callback| was already called.
@@ -89,8 +93,6 @@
bool was_called_ = false;
base::RunLoop wait_for_callback_loop_;
absl::optional<TupleOfNonReferenceArgs> result_;
-
- DISALLOW_COPY_AND_ASSIGN(TestCallbackReceiver);
};
template <class Value>
diff --git a/device/fido/u2f_register_operation.h b/device/fido/u2f_register_operation.h
index c2348327..2c1d59b 100644
--- a/device/fido/u2f_register_operation.h
+++ b/device/fido/u2f_register_operation.h
@@ -34,6 +34,10 @@
U2fRegisterOperation(FidoDevice* device,
const CtapMakeCredentialRequest& request,
DeviceResponseCallback callback);
+
+ U2fRegisterOperation(const U2fRegisterOperation&) = delete;
+ U2fRegisterOperation& operator=(const U2fRegisterOperation&) = delete;
+
~U2fRegisterOperation() override;
// DeviceOperation:
@@ -61,8 +65,6 @@
// ID.
bool probing_alternative_rp_id_ = false;
base::WeakPtrFactory<U2fRegisterOperation> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(U2fRegisterOperation);
};
} // namespace device
diff --git a/device/fido/u2f_sign_operation.h b/device/fido/u2f_sign_operation.h
index 6026177..3192c48 100644
--- a/device/fido/u2f_sign_operation.h
+++ b/device/fido/u2f_sign_operation.h
@@ -34,6 +34,10 @@
U2fSignOperation(FidoDevice* device,
const CtapGetAssertionRequest& request,
DeviceResponseCallback callback);
+
+ U2fSignOperation(const U2fSignOperation&) = delete;
+ U2fSignOperation& operator=(const U2fSignOperation&) = delete;
+
~U2fSignOperation() override;
// DeviceOperation:
@@ -57,8 +61,6 @@
ApplicationParameterType app_param_type_ = ApplicationParameterType::kPrimary;
bool canceled_ = false;
base::WeakPtrFactory<U2fSignOperation> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(U2fSignOperation);
};
} // namespace device
diff --git a/device/fido/virtual_ctap2_device.h b/device/fido/virtual_ctap2_device.h
index 2d152220..fadf688 100644
--- a/device/fido/virtual_ctap2_device.h
+++ b/device/fido/virtual_ctap2_device.h
@@ -198,6 +198,10 @@
VirtualCtap2Device();
VirtualCtap2Device(scoped_refptr<State> state, const Config& config);
+
+ VirtualCtap2Device(const VirtualCtap2Device&) = delete;
+ VirtualCtap2Device& operator=(const VirtualCtap2Device&) = delete;
+
~VirtualCtap2Device() override;
// Configures and sets a PIN on the authenticator.
@@ -317,8 +321,6 @@
const Config config_;
RequestState request_state_;
base::WeakPtrFactory<FidoDevice> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(VirtualCtap2Device);
};
} // namespace device
diff --git a/device/fido/virtual_fido_device.h b/device/fido/virtual_fido_device.h
index 11191bbe..e0eacfa 100644
--- a/device/fido/virtual_fido_device.h
+++ b/device/fido/virtual_fido_device.h
@@ -94,6 +94,9 @@
RegistrationData(RegistrationData&& data);
RegistrationData& operator=(RegistrationData&& other);
+ RegistrationData(const RegistrationData&) = delete;
+ RegistrationData& operator=(const RegistrationData&) = delete;
+
~RegistrationData();
std::unique_ptr<PrivateKey> private_key = PrivateKey::FreshP256Key();
@@ -117,8 +120,6 @@
absl::optional<std::array<uint8_t, 32>> large_blob_key;
absl::optional<std::vector<uint8_t>> cred_blob;
-
- DISALLOW_COPY_AND_ASSIGN(RegistrationData);
};
// Stores the state of the device. Since |U2fDevice| objects only persist for
diff --git a/device/fido/virtual_fido_device_factory.h b/device/fido/virtual_fido_device_factory.h
index 82958de2..003a832 100644
--- a/device/fido/virtual_fido_device_factory.h
+++ b/device/fido/virtual_fido_device_factory.h
@@ -21,6 +21,10 @@
class VirtualFidoDeviceFactory : public device::FidoDiscoveryFactory {
public:
VirtualFidoDeviceFactory();
+
+ VirtualFidoDeviceFactory(const VirtualFidoDeviceFactory&) = delete;
+ VirtualFidoDeviceFactory& operator=(const VirtualFidoDeviceFactory&) = delete;
+
~VirtualFidoDeviceFactory() override;
// Sets the FidoTransportProtocol of the FidoDiscovery to be instantiated by
@@ -49,7 +53,6 @@
FidoTransportProtocol::kUsbHumanInterfaceDevice;
VirtualCtap2Device::Config ctap2_config_;
scoped_refptr<VirtualFidoDevice::State> state_ = new VirtualFidoDevice::State;
- DISALLOW_COPY_AND_ASSIGN(VirtualFidoDeviceFactory);
};
} // namespace test
diff --git a/device/fido/virtual_u2f_device.h b/device/fido/virtual_u2f_device.h
index bce29c9..bba7a75 100644
--- a/device/fido/virtual_u2f_device.h
+++ b/device/fido/virtual_u2f_device.h
@@ -26,6 +26,10 @@
VirtualU2fDevice();
explicit VirtualU2fDevice(scoped_refptr<State> state);
+
+ VirtualU2fDevice(const VirtualU2fDevice&) = delete;
+ VirtualU2fDevice& operator=(const VirtualU2fDevice&) = delete;
+
~VirtualU2fDevice() override;
// FidoDevice:
@@ -47,8 +51,6 @@
base::span<const uint8_t> data);
base::WeakPtrFactory<FidoDevice> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(VirtualU2fDevice);
};
} // namespace device
diff --git a/device/fido/win/authenticator.h b/device/fido/win/authenticator.h
index 5522111..cf055c4 100644
--- a/device/fido/win/authenticator.h
+++ b/device/fido/win/authenticator.h
@@ -41,6 +41,11 @@
// Callers must ensure that WinWebAuthnApi::IsAvailable() returns true
// before creating instances of this class.
WinWebAuthnApiAuthenticator(HWND current_window, WinWebAuthnApi* win_api_);
+
+ WinWebAuthnApiAuthenticator(const WinWebAuthnApiAuthenticator&) = delete;
+ WinWebAuthnApiAuthenticator& operator=(const WinWebAuthnApiAuthenticator&) =
+ delete;
+
~WinWebAuthnApiAuthenticator() override;
// ShowsPrivacyNotice returns true if the Windows native UI will show a
@@ -96,7 +101,6 @@
// sequence.
SEQUENCE_CHECKER(sequence_checker_);
base::WeakPtrFactory<WinWebAuthnApiAuthenticator> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(WinWebAuthnApiAuthenticator);
};
} // namespace device
diff --git a/device/gamepad/gamepad_haptics_manager.h b/device/gamepad/gamepad_haptics_manager.h
index 7e7d8e3..69617bc1 100644
--- a/device/gamepad/gamepad_haptics_manager.h
+++ b/device/gamepad/gamepad_haptics_manager.h
@@ -15,6 +15,10 @@
: public mojom::GamepadHapticsManager {
public:
GamepadHapticsManager();
+
+ GamepadHapticsManager(const GamepadHapticsManager&) = delete;
+ GamepadHapticsManager& operator=(const GamepadHapticsManager&) = delete;
+
~GamepadHapticsManager() override;
static void Create(
@@ -27,9 +31,6 @@
PlayVibrationEffectOnceCallback) override;
void ResetVibrationActuator(uint32_t pad_index,
ResetVibrationActuatorCallback) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GamepadHapticsManager);
};
} // namespace device
diff --git a/device/gamepad/gamepad_monitor.h b/device/gamepad/gamepad_monitor.h
index df120f23..dc7bffb 100644
--- a/device/gamepad/gamepad_monitor.h
+++ b/device/gamepad/gamepad_monitor.h
@@ -19,6 +19,10 @@
public mojom::GamepadMonitor {
public:
GamepadMonitor();
+
+ GamepadMonitor(const GamepadMonitor&) = delete;
+ GamepadMonitor& operator=(const GamepadMonitor&) = delete;
+
~GamepadMonitor() override;
static void Create(mojo::PendingReceiver<mojom::GamepadMonitor> receiver);
@@ -42,8 +46,6 @@
// True if this monitor has been registered with the gamepad service.
bool is_registered_consumer_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(GamepadMonitor);
};
} // namespace device
diff --git a/device/gamepad/gamepad_platform_data_fetcher_mac.h b/device/gamepad/gamepad_platform_data_fetcher_mac.h
index 67b6c12e..bc77b6e 100644
--- a/device/gamepad/gamepad_platform_data_fetcher_mac.h
+++ b/device/gamepad/gamepad_platform_data_fetcher_mac.h
@@ -32,6 +32,11 @@
GAMEPAD_SOURCE_MAC_HID>;
GamepadPlatformDataFetcherMac();
+
+ GamepadPlatformDataFetcherMac(const GamepadPlatformDataFetcherMac&) = delete;
+ GamepadPlatformDataFetcherMac& operator=(
+ const GamepadPlatformDataFetcherMac&) = delete;
+
~GamepadPlatformDataFetcherMac() override;
// GamepadDataFetcher public implementation.
@@ -95,8 +100,6 @@
// A map of all devices using this data fetcher with the source_id as the key.
std::unordered_map<int, std::unique_ptr<GamepadDeviceMac>> devices_;
-
- DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac);
};
} // namespace device
diff --git a/device/gamepad/gamepad_service.h b/device/gamepad/gamepad_service.h
index 93b8496a..40d2efad 100644
--- a/device/gamepad/gamepad_service.h
+++ b/device/gamepad/gamepad_service.h
@@ -112,6 +112,9 @@
// provider, bypassing the default platform one.
GamepadService(std::unique_ptr<GamepadDataFetcher> fetcher);
+ GamepadService(const GamepadService&) = delete;
+ GamepadService& operator=(const GamepadService&) = delete;
+
virtual ~GamepadService();
private:
@@ -158,8 +161,6 @@
int num_active_consumers_ = 0;
bool gesture_callback_pending_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(GamepadService);
};
} // namespace device
diff --git a/device/gamepad/gamepad_test_helpers.h b/device/gamepad/gamepad_test_helpers.h
index 98873fa..9dbe199 100644
--- a/device/gamepad/gamepad_test_helpers.h
+++ b/device/gamepad/gamepad_test_helpers.h
@@ -23,6 +23,9 @@
// returned when the provider queries us.
explicit MockGamepadDataFetcher(const Gamepads& test_data);
+ MockGamepadDataFetcher(const MockGamepadDataFetcher&) = delete;
+ MockGamepadDataFetcher& operator=(const MockGamepadDataFetcher&) = delete;
+
~MockGamepadDataFetcher() override;
GamepadSource source() override;
@@ -46,21 +49,21 @@
base::Lock lock_;
Gamepads test_data_;
base::WaitableEvent read_data_;
-
- DISALLOW_COPY_AND_ASSIGN(MockGamepadDataFetcher);
};
// Base class for the other test helpers. This just sets up the system monitor.
class GamepadTestHelper {
public:
GamepadTestHelper();
+
+ GamepadTestHelper(const GamepadTestHelper&) = delete;
+ GamepadTestHelper& operator=(const GamepadTestHelper&) = delete;
+
virtual ~GamepadTestHelper();
private:
// This must be constructed before the system monitor.
base::test::SingleThreadTaskEnvironment task_environment_;
-
- DISALLOW_COPY_AND_ASSIGN(GamepadTestHelper);
};
// Constructs a GamepadService with a mock data source. This bypasses the
@@ -68,6 +71,11 @@
class GamepadServiceTestConstructor : public GamepadTestHelper {
public:
explicit GamepadServiceTestConstructor(const Gamepads& test_data);
+
+ GamepadServiceTestConstructor(const GamepadServiceTestConstructor&) = delete;
+ GamepadServiceTestConstructor& operator=(
+ const GamepadServiceTestConstructor&) = delete;
+
~GamepadServiceTestConstructor() override;
GamepadService* gamepad_service() { return gamepad_service_; }
@@ -79,8 +87,6 @@
// Pointer owned by the provider (which is owned by the gamepad service).
MockGamepadDataFetcher* data_fetcher_;
-
- DISALLOW_COPY_AND_ASSIGN(GamepadServiceTestConstructor);
};
} // namespace device
diff --git a/device/gamepad/nintendo_data_fetcher.h b/device/gamepad/nintendo_data_fetcher.h
index b3c86b9..3f1a525 100644
--- a/device/gamepad/nintendo_data_fetcher.h
+++ b/device/gamepad/nintendo_data_fetcher.h
@@ -50,6 +50,10 @@
std::unordered_map<int, std::unique_ptr<NintendoController>>;
NintendoDataFetcher();
+
+ NintendoDataFetcher(const NintendoDataFetcher&) = delete;
+ NintendoDataFetcher& operator=(const NintendoDataFetcher&) = delete;
+
~NintendoDataFetcher() override;
// Add the newly-connected HID device described by |device_info|. Returns
@@ -115,8 +119,6 @@
mojo::Remote<mojom::HidManager> hid_manager_;
mojo::AssociatedReceiver<mojom::HidManagerClient> receiver_{this};
base::WeakPtrFactory<NintendoDataFetcher> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(NintendoDataFetcher);
};
} // namespace device
diff --git a/device/gamepad/xinput_data_fetcher_win.h b/device/gamepad/xinput_data_fetcher_win.h
index 55f9a57..abc800f4 100644
--- a/device/gamepad/xinput_data_fetcher_win.h
+++ b/device/gamepad/xinput_data_fetcher_win.h
@@ -53,6 +53,10 @@
Factory;
XInputDataFetcherWin();
+
+ XInputDataFetcherWin(const XInputDataFetcherWin&) = delete;
+ XInputDataFetcherWin& operator=(const XInputDataFetcherWin&) = delete;
+
~XInputDataFetcherWin() override;
GamepadSource source() override;
@@ -105,8 +109,6 @@
bool xinput_connected_[XUSER_MAX_COUNT];
std::unique_ptr<XInputHapticGamepadWin> haptics_[XUSER_MAX_COUNT];
-
- DISALLOW_COPY_AND_ASSIGN(XInputDataFetcherWin);
};
} // namespace device
diff --git a/device/test/run_all_unittests.cc b/device/test/run_all_unittests.cc
index d203d479..76978e1 100644
--- a/device/test/run_all_unittests.cc
+++ b/device/test/run_all_unittests.cc
@@ -19,6 +19,10 @@
class DeviceTestSuite : public base::TestSuite {
public:
DeviceTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
+
+ DeviceTestSuite(const DeviceTestSuite&) = delete;
+ DeviceTestSuite& operator=(const DeviceTestSuite&) = delete;
+
~DeviceTestSuite() override = default;
protected:
@@ -52,9 +56,6 @@
base::TestSuite::Shutdown();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeviceTestSuite);
};
} // namespace
diff --git a/device/udev_linux/udev0_loader.h b/device/udev_linux/udev0_loader.h
index 4126092..19f2750 100644
--- a/device/udev_linux/udev0_loader.h
+++ b/device/udev_linux/udev0_loader.h
@@ -17,6 +17,10 @@
class Udev0Loader : public UdevLoader {
public:
Udev0Loader();
+
+ Udev0Loader(const Udev0Loader&) = delete;
+ Udev0Loader& operator=(const Udev0Loader&) = delete;
+
~Udev0Loader() override;
private:
@@ -77,8 +81,6 @@
void udev_unref(udev* udev) override;
std::unique_ptr<LibUdev0Loader> lib_loader_;
-
- DISALLOW_COPY_AND_ASSIGN(Udev0Loader);
};
} // namespace device
diff --git a/device/udev_linux/udev1_loader.h b/device/udev_linux/udev1_loader.h
index c082075..f5faefa 100644
--- a/device/udev_linux/udev1_loader.h
+++ b/device/udev_linux/udev1_loader.h
@@ -17,6 +17,10 @@
class Udev1Loader : public UdevLoader {
public:
Udev1Loader();
+
+ Udev1Loader(const Udev1Loader&) = delete;
+ Udev1Loader& operator=(const Udev1Loader&) = delete;
+
~Udev1Loader() override;
private:
@@ -77,8 +81,6 @@
void udev_unref(udev* udev) override;
std::unique_ptr<LibUdev1Loader> lib_loader_;
-
- DISALLOW_COPY_AND_ASSIGN(Udev1Loader);
};
} // namespace device
diff --git a/device/vr/android/arcore/ar_image_transport.h b/device/vr/android/arcore/ar_image_transport.h
index 500cbe6..621b12c 100644
--- a/device/vr/android/arcore/ar_image_transport.h
+++ b/device/vr/android/arcore/ar_image_transport.h
@@ -48,6 +48,10 @@
explicit ArImageTransport(
std::unique_ptr<MailboxToSurfaceBridge> mailbox_bridge);
+
+ ArImageTransport(const ArImageTransport&) = delete;
+ ArImageTransport& operator=(const ArImageTransport&) = delete;
+
virtual ~ArImageTransport();
virtual void DestroySharedBuffers(WebXrPresentationState* webxr);
@@ -132,7 +136,6 @@
// Must be last.
base::WeakPtrFactory<ArImageTransport> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(ArImageTransport);
};
class COMPONENT_EXPORT(VR_ARCORE) ArImageTransportFactory {
diff --git a/device/vr/android/arcore/ar_renderer.h b/device/vr/android/arcore/ar_renderer.h
index b1365bc..699ed4e 100644
--- a/device/vr/android/arcore/ar_renderer.h
+++ b/device/vr/android/arcore/ar_renderer.h
@@ -15,6 +15,10 @@
class ArRenderer {
public:
ArRenderer();
+
+ ArRenderer(const ArRenderer&) = delete;
+ ArRenderer& operator=(const ArRenderer&) = delete;
+
~ArRenderer();
void Draw(int texture_handle, const float (&uv_transform)[16]);
@@ -27,8 +31,6 @@
GLuint uv_transform_ = 0;
GLuint vertex_buffer_ = 0;
GLuint index_buffer_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(ArRenderer);
};
} // namespace device
diff --git a/device/vr/android/arcore/arcore_device.h b/device/vr/android/arcore/arcore_device.h
index 39ca446..0a0788f 100644
--- a/device/vr/android/arcore/arcore_device.h
+++ b/device/vr/android/arcore/arcore_device.h
@@ -46,6 +46,10 @@
mailbox_to_surface_bridge_factory,
std::unique_ptr<ArCoreSessionUtils> arcore_session_utils,
XrFrameSinkClientFactory xr_frame_sink_client_factory);
+
+ ArCoreDevice(const ArCoreDevice&) = delete;
+ ArCoreDevice& operator=(const ArCoreDevice&) = delete;
+
~ArCoreDevice() override;
// VRDeviceBase implementation.
@@ -176,7 +180,6 @@
// Must be last.
base::WeakPtrFactory<ArCoreDevice> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(ArCoreDevice);
};
} // namespace device
diff --git a/device/vr/android/arcore/arcore_gl.h b/device/vr/android/arcore/arcore_gl.h
index c6254412..88bf19e 100644
--- a/device/vr/android/arcore/arcore_gl.h
+++ b/device/vr/android/arcore/arcore_gl.h
@@ -94,6 +94,10 @@
public mojom::XRSessionController {
public:
explicit ArCoreGl(std::unique_ptr<ArImageTransport> ar_image_transport);
+
+ ArCoreGl(const ArCoreGl&) = delete;
+ ArCoreGl& operator=(const ArCoreGl&) = delete;
+
~ArCoreGl() override;
void Initialize(
@@ -416,7 +420,6 @@
// Must be last.
base::WeakPtrFactory<ArCoreGl> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(ArCoreGl);
};
} // namespace device
diff --git a/device/vr/android/arcore/arcore_gl_thread.h b/device/vr/android/arcore/arcore_gl_thread.h
index a8a8578..5beae113 100644
--- a/device/vr/android/arcore/arcore_gl_thread.h
+++ b/device/vr/android/arcore/arcore_gl_thread.h
@@ -24,6 +24,10 @@
std::unique_ptr<ArImageTransportFactory> ar_image_transport_factory,
std::unique_ptr<MailboxToSurfaceBridge> mailbox_bridge,
base::OnceCallback<void()> initialized_callback);
+
+ ArCoreGlThread(const ArCoreGlThread&) = delete;
+ ArCoreGlThread& operator=(const ArCoreGlThread&) = delete;
+
~ArCoreGlThread() override;
ArCoreGl* GetArCoreGl();
@@ -38,8 +42,6 @@
// Created on GL thread.
std::unique_ptr<ArCoreGl> arcore_gl_;
-
- DISALLOW_COPY_AND_ASSIGN(ArCoreGlThread);
};
} // namespace device
diff --git a/device/vr/android/arcore/arcore_impl.h b/device/vr/android/arcore/arcore_impl.h
index 8293847..2c3692f6 100644
--- a/device/vr/android/arcore/arcore_impl.h
+++ b/device/vr/android/arcore/arcore_impl.h
@@ -77,6 +77,10 @@
class ArCoreImpl : public ArCore {
public:
ArCoreImpl();
+
+ ArCoreImpl(const ArCoreImpl&) = delete;
+ ArCoreImpl& operator=(const ArCoreImpl&) = delete;
+
~ArCoreImpl() override;
absl::optional<ArCore::InitializeResult> Initialize(
@@ -322,7 +326,6 @@
// Must be last.
base::WeakPtrFactory<ArCoreImpl> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(ArCoreImpl);
};
// TODO(https://crbug.com/843374): Once the arcore_device class is moved,
diff --git a/device/vr/android/gvr/gvr_delegate_provider_factory.h b/device/vr/android/gvr/gvr_delegate_provider_factory.h
index 755f9e42..ba0ee74 100644
--- a/device/vr/android/gvr/gvr_delegate_provider_factory.h
+++ b/device/vr/android/gvr/gvr_delegate_provider_factory.h
@@ -23,6 +23,10 @@
static void SetDevice(GvrDevice* device) { device_ = device; }
static GvrDevice* GetDevice() { return device_; }
+ GvrDelegateProviderFactory(const GvrDelegateProviderFactory&) = delete;
+ GvrDelegateProviderFactory& operator=(const GvrDelegateProviderFactory&) =
+ delete;
+
virtual ~GvrDelegateProviderFactory() = default;
protected:
@@ -31,9 +35,6 @@
virtual GvrDelegateProvider* CreateGvrDelegateProvider() = 0;
static GvrDevice* device_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GvrDelegateProviderFactory);
};
} // namespace device
diff --git a/device/vr/android/gvr/gvr_device.h b/device/vr/android/gvr/gvr_device.h
index eaf8de7..3cb028b 100644
--- a/device/vr/android/gvr/gvr_device.h
+++ b/device/vr/android/gvr/gvr_device.h
@@ -24,6 +24,10 @@
public mojom::XRSessionController {
public:
GvrDevice();
+
+ GvrDevice(const GvrDevice&) = delete;
+ GvrDevice& operator=(const GvrDevice&) = delete;
+
~GvrDevice() override;
// VRDeviceBase
@@ -65,8 +69,6 @@
mojom::XRRuntime::RequestSessionCallback pending_request_session_callback_;
base::WeakPtrFactory<GvrDevice> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(GvrDevice);
};
} // namespace device
diff --git a/device/vr/android/gvr/gvr_device_provider.h b/device/vr/android/gvr/gvr_device_provider.h
index 04e2f7819..8eb2f51 100644
--- a/device/vr/android/gvr/gvr_device_provider.h
+++ b/device/vr/android/gvr/gvr_device_provider.h
@@ -19,6 +19,10 @@
class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider {
public:
GvrDeviceProvider();
+
+ GvrDeviceProvider(const GvrDeviceProvider&) = delete;
+ GvrDeviceProvider& operator=(const GvrDeviceProvider&) = delete;
+
~GvrDeviceProvider() override;
void Initialize(
@@ -36,8 +40,6 @@
private:
std::unique_ptr<GvrDevice> vr_device_;
bool initialized_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider);
};
} // namespace device
diff --git a/device/vr/android/web_xr_presentation_state.h b/device/vr/android/web_xr_presentation_state.h
index 0af7431..237fcddb 100644
--- a/device/vr/android/web_xr_presentation_state.h
+++ b/device/vr/android/web_xr_presentation_state.h
@@ -189,6 +189,10 @@
static constexpr int kWebXrFrameCount = 3;
WebXrPresentationState();
+
+ WebXrPresentationState(const WebXrPresentationState&) = delete;
+ WebXrPresentationState& operator=(const WebXrPresentationState&) = delete;
+
~WebXrPresentationState();
void SetStateMachineType(StateMachineType type);
@@ -266,8 +270,6 @@
base::queue<WebXrFrame*> idle_frames_;
bool mailbox_bridge_ready_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(WebXrPresentationState);
};
} // namespace device
diff --git a/device/vr/openxr/openxr_anchor_manager.h b/device/vr/openxr/openxr_anchor_manager.h
index fb4bc2c..d106b6a 100644
--- a/device/vr/openxr/openxr_anchor_manager.h
+++ b/device/vr/openxr/openxr_anchor_manager.h
@@ -23,6 +23,10 @@
OpenXrAnchorManager(const OpenXrExtensionHelper& extension_helper,
XrSession session,
XrSpace mojo_space);
+
+ OpenXrAnchorManager(const OpenXrAnchorManager&) = delete;
+ OpenXrAnchorManager& operator=(const OpenXrAnchorManager&) = delete;
+
~OpenXrAnchorManager();
void AddCreateAnchorRequest(
@@ -89,7 +93,6 @@
AnchorId::Generator anchor_id_generator_; // 0 is not a valid anchor ID
std::map<AnchorId, AnchorData> openxr_anchors_;
- DISALLOW_COPY_AND_ASSIGN(OpenXrAnchorManager);
};
} // namespace device
diff --git a/device/vr/openxr/openxr_api_wrapper.h b/device/vr/openxr/openxr_api_wrapper.h
index 16ee3cf..f798fe6 100644
--- a/device/vr/openxr/openxr_api_wrapper.h
+++ b/device/vr/openxr/openxr_api_wrapper.h
@@ -45,6 +45,10 @@
class OpenXrApiWrapper {
public:
OpenXrApiWrapper();
+
+ OpenXrApiWrapper(const OpenXrApiWrapper&) = delete;
+ OpenXrApiWrapper& operator=(const OpenXrApiWrapper&) = delete;
+
~OpenXrApiWrapper();
bool IsInitialized() const;
@@ -206,8 +210,6 @@
std::unique_ptr<OpenXRSceneUnderstandingManager> scene_understanding_manager_;
base::WeakPtrFactory<OpenXrApiWrapper> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(OpenXrApiWrapper);
};
} // namespace device
diff --git a/device/vr/openxr/openxr_controller.h b/device/vr/openxr/openxr_controller.h
index eff8187..933b49b 100644
--- a/device/vr/openxr/openxr_controller.h
+++ b/device/vr/openxr/openxr_controller.h
@@ -24,6 +24,10 @@
class OpenXrController {
public:
OpenXrController();
+
+ OpenXrController(const OpenXrController&) = delete;
+ OpenXrController& operator=(const OpenXrController&) = delete;
+
~OpenXrController();
// The lifetime of OpenXRInputHelper is a superset of OpenXRController. Thus
@@ -166,8 +170,6 @@
const OpenXRPathHelper* path_helper_;
const OpenXrExtensionHelper* extension_helper_;
-
- DISALLOW_COPY_AND_ASSIGN(OpenXrController);
};
} // namespace device
diff --git a/device/vr/openxr/openxr_device.h b/device/vr/openxr/openxr_device.h
index e5e0e83..1662640d 100644
--- a/device/vr/openxr/openxr_device.h
+++ b/device/vr/openxr/openxr_device.h
@@ -29,6 +29,10 @@
public mojom::XRCompositorHost {
public:
OpenXrDevice(VizContextProviderFactoryAsync context_provider_factory_async);
+
+ OpenXrDevice(const OpenXrDevice&) = delete;
+ OpenXrDevice& operator=(const OpenXrDevice&) = delete;
+
~OpenXrDevice() override;
// VRDeviceBase
@@ -67,8 +71,6 @@
mojom::XRRuntime::RequestSessionCallback request_session_callback_;
base::WeakPtrFactory<OpenXrDevice> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(OpenXrDevice);
};
} // namespace device
diff --git a/device/vr/openxr/openxr_input_helper.h b/device/vr/openxr/openxr_input_helper.h
index 392e97a..8ea5bb2 100644
--- a/device/vr/openxr/openxr_input_helper.h
+++ b/device/vr/openxr/openxr_input_helper.h
@@ -29,6 +29,9 @@
OpenXRInputHelper(XrSession session, XrSpace local_space);
+ OpenXRInputHelper(const OpenXRInputHelper&) = delete;
+ OpenXRInputHelper& operator=(const OpenXRInputHelper&) = delete;
+
~OpenXRInputHelper();
std::vector<mojom::XRInputSourceStatePtr> GetInputState(
@@ -63,8 +66,6 @@
controller_states_;
std::unique_ptr<OpenXRPathHelper> path_helper_;
-
- DISALLOW_COPY_AND_ASSIGN(OpenXRInputHelper);
};
} // namespace device
diff --git a/device/vr/openxr/openxr_render_loop.h b/device/vr/openxr/openxr_render_loop.h
index a9659cd..d7f1d602 100644
--- a/device/vr/openxr/openxr_render_loop.h
+++ b/device/vr/openxr/openxr_render_loop.h
@@ -44,6 +44,10 @@
VizContextProviderFactoryAsync context_provider_factory_async,
XrInstance instance,
const OpenXrExtensionHelper& extension_helper_);
+
+ OpenXrRenderLoop(const OpenXrRenderLoop&) = delete;
+ OpenXrRenderLoop& operator=(const OpenXrRenderLoop&) = delete;
+
~OpenXrRenderLoop() override;
private:
@@ -146,8 +150,6 @@
// This must be the last member
base::WeakPtrFactory<OpenXrRenderLoop> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(OpenXrRenderLoop);
};
} // namespace device
diff --git a/device/vr/orientation/orientation_device_provider.h b/device/vr/orientation/orientation_device_provider.h
index 70373c9..0a04097 100644
--- a/device/vr/orientation/orientation_device_provider.h
+++ b/device/vr/orientation/orientation_device_provider.h
@@ -23,6 +23,11 @@
public:
explicit VROrientationDeviceProvider(
mojo::PendingRemote<device::mojom::SensorProvider> sensor_provider);
+
+ VROrientationDeviceProvider(const VROrientationDeviceProvider&) = delete;
+ VROrientationDeviceProvider& operator=(const VROrientationDeviceProvider&) =
+ delete;
+
~VROrientationDeviceProvider() override;
void Initialize(
@@ -52,8 +57,6 @@
mojo::PendingRemote<mojom::XRRuntime>)>
add_device_callback_;
base::OnceClosure initialized_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(VROrientationDeviceProvider);
};
} // namespace device
diff --git a/device/vr/test/fake_orientation_provider.h b/device/vr/test/fake_orientation_provider.h
index ebed3e3..0c288fad 100644
--- a/device/vr/test/fake_orientation_provider.h
+++ b/device/vr/test/fake_orientation_provider.h
@@ -15,6 +15,10 @@
class DEVICE_VR_EXPORT FakeOrientationSensor : public mojom::Sensor {
public:
FakeOrientationSensor(mojo::PendingReceiver<mojom::Sensor> receiver);
+
+ FakeOrientationSensor(const FakeOrientationSensor&) = delete;
+ FakeOrientationSensor& operator=(const FakeOrientationSensor&) = delete;
+
~FakeOrientationSensor() override;
void AddConfiguration(const PlatformSensorConfiguration& configuration,
@@ -30,8 +34,6 @@
private:
mojo::Receiver<mojom::Sensor> receiver_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeOrientationSensor);
};
} // namespace device
diff --git a/device/vr/test/fake_vr_device.h b/device/vr/test/fake_vr_device.h
index 348d8ac..8afc00f 100644
--- a/device/vr/test/fake_vr_device.h
+++ b/device/vr/test/fake_vr_device.h
@@ -18,6 +18,10 @@
public mojom::XRSessionController {
public:
explicit FakeVRDevice(mojom::XRDeviceId id);
+
+ FakeVRDevice(const FakeVRDevice&) = delete;
+ FakeVRDevice& operator=(const FakeVRDevice&) = delete;
+
~FakeVRDevice() override;
void RequestSession(
@@ -41,8 +45,6 @@
uint32_t size);
mojom::VRPosePtr pose_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeVRDevice);
};
} // namespace device
diff --git a/device/vr/test/fake_vr_device_provider.h b/device/vr/test/fake_vr_device_provider.h
index 022e8d5..8eed663 100644
--- a/device/vr/test/fake_vr_device_provider.h
+++ b/device/vr/test/fake_vr_device_provider.h
@@ -18,6 +18,10 @@
class DEVICE_VR_EXPORT FakeVRDeviceProvider : public VRDeviceProvider {
public:
FakeVRDeviceProvider();
+
+ FakeVRDeviceProvider(const FakeVRDeviceProvider&) = delete;
+ FakeVRDeviceProvider& operator=(const FakeVRDeviceProvider&) = delete;
+
~FakeVRDeviceProvider() override;
// Adds devices to the provider with the given device, which will be
@@ -45,8 +49,6 @@
mojo::PendingRemote<mojom::XRRuntime>)>
add_device_callback_;
base::RepeatingCallback<void(mojom::XRDeviceId)> remove_device_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeVRDeviceProvider);
};
} // namespace device
diff --git a/device/vr/test/fake_vr_service_client.h b/device/vr/test/fake_vr_service_client.h
index 68d8311..507397e 100644
--- a/device/vr/test/fake_vr_service_client.h
+++ b/device/vr/test/fake_vr_service_client.h
@@ -16,6 +16,10 @@
public:
explicit FakeVRServiceClient(
mojo::PendingReceiver<mojom::VRServiceClient> receiver);
+
+ FakeVRServiceClient(const FakeVRServiceClient&) = delete;
+ FakeVRServiceClient& operator=(const FakeVRServiceClient&) = delete;
+
~FakeVRServiceClient() override;
void OnDeviceChanged() override {}
@@ -25,8 +29,6 @@
private:
mojom::XRDeviceId last_device_id_ = static_cast<mojom::XRDeviceId>(0);
mojo::Receiver<mojom::VRServiceClient> receiver_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeVRServiceClient);
};
} // namespace device
diff --git a/device/vr/util/fps_meter.h b/device/vr/util/fps_meter.h
index bec9432..4f67e51 100644
--- a/device/vr/util/fps_meter.h
+++ b/device/vr/util/fps_meter.h
@@ -17,6 +17,10 @@
public:
FPSMeter();
explicit FPSMeter(size_t window_size);
+
+ FPSMeter(const FPSMeter&) = delete;
+ FPSMeter& operator=(const FPSMeter&) = delete;
+
~FPSMeter();
void AddFrame(const base::TimeTicks& time_stamp);
@@ -31,7 +35,6 @@
private:
SampleQueue frame_times_;
base::TimeTicks last_time_stamp_;
- DISALLOW_COPY_AND_ASSIGN(FPSMeter);
};
} // namespace device
diff --git a/device/vr/util/gamepad_builder.h b/device/vr/util/gamepad_builder.h
index e9c0ad0..654dbed 100644
--- a/device/vr/util/gamepad_builder.h
+++ b/device/vr/util/gamepad_builder.h
@@ -32,6 +32,10 @@
GamepadBuilder(const std::string& gamepad_id,
GamepadMapping mapping,
device::mojom::XRHandedness handedness);
+
+ GamepadBuilder(const GamepadBuilder&) = delete;
+ GamepadBuilder& operator=(const GamepadBuilder&) = delete;
+
virtual ~GamepadBuilder();
virtual bool IsValid() const;
@@ -51,9 +55,6 @@
GamepadMapping GetMapping() const { return gamepad_.mapping; }
Gamepad gamepad_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GamepadBuilder);
};
} // namespace device
diff --git a/device/vr/util/sample_queue.h b/device/vr/util/sample_queue.h
index d5cb238..c4e3884 100644
--- a/device/vr/util/sample_queue.h
+++ b/device/vr/util/sample_queue.h
@@ -19,6 +19,10 @@
class COMPONENT_EXPORT(DEVICE_VR_UTIL) SampleQueue {
public:
explicit SampleQueue(size_t window_size);
+
+ SampleQueue(const SampleQueue&) = delete;
+ SampleQueue& operator=(const SampleQueue&) = delete;
+
~SampleQueue();
int64_t GetSum() const { return sum_; }
@@ -35,7 +39,6 @@
size_t current_index_ = 0;
size_t window_size_;
std::vector<int64_t> samples_;
- DISALLOW_COPY_AND_ASSIGN(SampleQueue);
};
} // namespace device
diff --git a/device/vr/util/sliding_average.h b/device/vr/util/sliding_average.h
index 8eed606..f744d09 100644
--- a/device/vr/util/sliding_average.h
+++ b/device/vr/util/sliding_average.h
@@ -15,6 +15,10 @@
class COMPONENT_EXPORT(DEVICE_VR_UTIL) SlidingAverage {
public:
explicit SlidingAverage(size_t window_size);
+
+ SlidingAverage(const SlidingAverage&) = delete;
+ SlidingAverage& operator=(const SlidingAverage&) = delete;
+
~SlidingAverage();
void AddSample(int64_t value);
@@ -24,12 +28,15 @@
private:
SampleQueue values_;
- DISALLOW_COPY_AND_ASSIGN(SlidingAverage);
};
class COMPONENT_EXPORT(DEVICE_VR_UTIL) SlidingTimeDeltaAverage {
public:
explicit SlidingTimeDeltaAverage(size_t window_size);
+
+ SlidingTimeDeltaAverage(const SlidingTimeDeltaAverage&) = delete;
+ SlidingTimeDeltaAverage& operator=(const SlidingTimeDeltaAverage&) = delete;
+
virtual ~SlidingTimeDeltaAverage();
virtual void AddSample(base::TimeDelta value);
@@ -41,7 +48,6 @@
private:
SlidingAverage sample_microseconds_;
- DISALLOW_COPY_AND_ASSIGN(SlidingTimeDeltaAverage);
};
} // namespace device
diff --git a/device/vr/util/xr_standard_gamepad_builder.h b/device/vr/util/xr_standard_gamepad_builder.h
index a677262..d1b04b5f 100644
--- a/device/vr/util/xr_standard_gamepad_builder.h
+++ b/device/vr/util/xr_standard_gamepad_builder.h
@@ -18,6 +18,10 @@
class COMPONENT_EXPORT(DEVICE_VR_UTIL) XRStandardGamepadBuilder {
public:
XRStandardGamepadBuilder(device::mojom::XRHandedness handedness);
+
+ XRStandardGamepadBuilder(const XRStandardGamepadBuilder&) = delete;
+ XRStandardGamepadBuilder& operator=(const XRStandardGamepadBuilder&) = delete;
+
virtual ~XRStandardGamepadBuilder();
void SetPrimaryButton(const GamepadButton& button) {
primary_button_ = button;
@@ -59,8 +63,6 @@
bool has_optional_axes_ = false;
device::mojom::XRHandedness handedness_;
-
- DISALLOW_COPY_AND_ASSIGN(XRStandardGamepadBuilder);
};
} // namespace device
diff --git a/device/vr/vr_device_base.h b/device/vr/vr_device_base.h
index 92ab03f..e78e651 100644
--- a/device/vr/vr_device_base.h
+++ b/device/vr/vr_device_base.h
@@ -26,6 +26,10 @@
class COMPONENT_EXPORT(DEVICE_VR_BASE) VRDeviceBase : public mojom::XRRuntime {
public:
explicit VRDeviceBase(mojom::XRDeviceId id);
+
+ VRDeviceBase(const VRDeviceBase&) = delete;
+ VRDeviceBase& operator=(const VRDeviceBase&) = delete;
+
~VRDeviceBase() override;
// XRRuntime implementation
@@ -81,8 +85,6 @@
device::mojom::XRDeviceData device_data_;
mojo::Receiver<mojom::XRRuntime> runtime_receiver_{this};
-
- DISALLOW_COPY_AND_ASSIGN(VRDeviceBase);
};
} // namespace device
diff --git a/device/vr/vr_device_base_unittest.cc b/device/vr/vr_device_base_unittest.cc
index 39f847e..e492799c 100644
--- a/device/vr/vr_device_base_unittest.cc
+++ b/device/vr/vr_device_base_unittest.cc
@@ -25,6 +25,10 @@
class VRDeviceBaseForTesting : public VRDeviceBase {
public:
VRDeviceBaseForTesting() : VRDeviceBase(mojom::XRDeviceId::FAKE_DEVICE_ID) {}
+
+ VRDeviceBaseForTesting(const VRDeviceBaseForTesting&) = delete;
+ VRDeviceBaseForTesting& operator=(const VRDeviceBaseForTesting&) = delete;
+
~VRDeviceBaseForTesting() override = default;
void SetVRDisplayInfoForTest(mojom::VRDisplayInfoPtr display_info) {
@@ -34,10 +38,6 @@
void RequestSession(
mojom::XRRuntimeSessionOptionsPtr options,
mojom::XRRuntime::RequestSessionCallback callback) override {}
-
- private:
-
- DISALLOW_COPY_AND_ASSIGN(VRDeviceBaseForTesting);
};
class StubVRDeviceEventListener : public mojom::XRRuntimeEventListener {
@@ -66,6 +66,10 @@
class VRDeviceTest : public testing::Test {
public:
VRDeviceTest() {}
+
+ VRDeviceTest(const VRDeviceTest&) = delete;
+ VRDeviceTest& operator=(const VRDeviceTest&) = delete;
+
~VRDeviceTest() override {}
protected:
@@ -77,8 +81,6 @@
}
base::test::SingleThreadTaskEnvironment task_environment_;
-
- DISALLOW_COPY_AND_ASSIGN(VRDeviceTest);
};
// Tests VRDevice class default behaviour when it dispatches "vrdevicechanged"
diff --git a/device/vr/windows/compositor_base.h b/device/vr/windows/compositor_base.h
index 54f0ed8..e597256 100644
--- a/device/vr/windows/compositor_base.h
+++ b/device/vr/windows/compositor_base.h
@@ -62,6 +62,10 @@
base::OnceCallback<void(bool result, mojom::XRSessionPtr)>;
XRCompositorCommon();
+
+ XRCompositorCommon(const XRCompositorCommon&) = delete;
+ XRCompositorCommon& operator=(const XRCompositorCommon&) = delete;
+
~XRCompositorCommon() override;
// on_presentation_ended will be called when this the compositor stops
@@ -215,8 +219,6 @@
mojom::XRVisibilityState::VISIBLE;
mojom::VRStageParametersPtr current_stage_parameters_;
uint32_t stage_parameters_id_;
-
- DISALLOW_COPY_AND_ASSIGN(XRCompositorCommon);
};
} // namespace device