| Index: chromeos/components/tether/disconnect_tethering_operation.cc
|
| diff --git a/chromeos/components/tether/disconnect_tethering_operation.cc b/chromeos/components/tether/disconnect_tethering_operation.cc
|
| index f8ba990672e9dda82e45a0a223881292b210d2c2..72b2218b0ade078a83bc2804f0d1bd6ad484195f 100644
|
| --- a/chromeos/components/tether/disconnect_tethering_operation.cc
|
| +++ b/chromeos/components/tether/disconnect_tethering_operation.cc
|
| @@ -48,6 +48,7 @@ DisconnectTetheringOperation::DisconnectTetheringOperation(
|
| : MessageTransferOperation(
|
| std::vector<cryptauth::RemoteDevice>{device_to_connect},
|
| connection_manager),
|
| + device_id_(device_to_connect.GetDeviceId()),
|
| has_authenticated_(false) {}
|
|
|
| DisconnectTetheringOperation::~DisconnectTetheringOperation() {}
|
| @@ -60,6 +61,13 @@ void DisconnectTetheringOperation::RemoveObserver(Observer* observer) {
|
| observer_list_.RemoveObserver(observer);
|
| }
|
|
|
| +void DisconnectTetheringOperation::NotifyObserversOperationFinished(
|
| + bool success) {
|
| + for (auto& observer : observer_list_) {
|
| + observer.OnOperationFinished(device_id_, success);
|
| + }
|
| +}
|
| +
|
| void DisconnectTetheringOperation::OnDeviceAuthenticated(
|
| const cryptauth::RemoteDevice& remote_device) {
|
| DCHECK(remote_devices().size() == 1u && remote_devices()[0] == remote_device);
|
| @@ -71,9 +79,7 @@ void DisconnectTetheringOperation::OnDeviceAuthenticated(
|
| }
|
|
|
| void DisconnectTetheringOperation::OnOperationFinished() {
|
| - for (auto& observer : observer_list_) {
|
| - observer.OnOperationFinished(has_authenticated_);
|
| - }
|
| + NotifyObserversOperationFinished(has_authenticated_);
|
| }
|
|
|
| MessageType DisconnectTetheringOperation::GetMessageTypeForConnection() {
|
|
|