Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: chromeos/components/tether/disconnect_tethering_operation.cc

Issue 2915713002: Tether MessageTransferOperation: Only wait for a response from a host for a certain amount of time … (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/components/tether/disconnect_tethering_operation.h" 5 #include "chromeos/components/tether/disconnect_tethering_operation.h"
6 6
7 #include "chromeos/components/tether/message_wrapper.h" 7 #include "chromeos/components/tether/message_wrapper.h"
8 #include "chromeos/components/tether/proto/tether.pb.h" 8 #include "chromeos/components/tether/proto/tether.pb.h"
9 #include "components/proximity_auth/logging/logging.h" 9 #include "components/proximity_auth/logging/logging.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 connection_manager); 42 connection_manager);
43 } 43 }
44 44
45 DisconnectTetheringOperation::DisconnectTetheringOperation( 45 DisconnectTetheringOperation::DisconnectTetheringOperation(
46 const cryptauth::RemoteDevice& device_to_connect, 46 const cryptauth::RemoteDevice& device_to_connect,
47 BleConnectionManager* connection_manager) 47 BleConnectionManager* connection_manager)
48 : MessageTransferOperation( 48 : MessageTransferOperation(
49 std::vector<cryptauth::RemoteDevice>{device_to_connect}, 49 std::vector<cryptauth::RemoteDevice>{device_to_connect},
50 connection_manager), 50 connection_manager),
51 device_id_(device_to_connect.GetDeviceId()), 51 device_id_(device_to_connect.GetDeviceId()),
52 has_authenticated_(false) {} 52 has_authenticated_(false) {
53 SetWaitForResponse(false);
54 }
53 55
54 DisconnectTetheringOperation::~DisconnectTetheringOperation() {} 56 DisconnectTetheringOperation::~DisconnectTetheringOperation() {}
55 57
56 void DisconnectTetheringOperation::AddObserver(Observer* observer) { 58 void DisconnectTetheringOperation::AddObserver(Observer* observer) {
57 observer_list_.AddObserver(observer); 59 observer_list_.AddObserver(observer);
58 } 60 }
59 61
60 void DisconnectTetheringOperation::RemoveObserver(Observer* observer) { 62 void DisconnectTetheringOperation::RemoveObserver(Observer* observer) {
61 observer_list_.RemoveObserver(observer); 63 observer_list_.RemoveObserver(observer);
62 } 64 }
(...skipping 19 matching lines...) Expand all
82 NotifyObserversOperationFinished(has_authenticated_); 84 NotifyObserversOperationFinished(has_authenticated_);
83 } 85 }
84 86
85 MessageType DisconnectTetheringOperation::GetMessageTypeForConnection() { 87 MessageType DisconnectTetheringOperation::GetMessageTypeForConnection() {
86 return MessageType::DISCONNECT_TETHERING_REQUEST; 88 return MessageType::DISCONNECT_TETHERING_REQUEST;
87 } 89 }
88 90
89 } // namespace tether 91 } // namespace tether
90 92
91 } // namespace chromeos 93 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698