Chromium Code Reviews| Index: components/pairing/bluetooth_host_pairing_controller.cc |
| diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc |
| index 37e4854239b87c7a8199820c9ca0c6cf5d01050c..394f27185ed88f2544028d608a30eaf7497e7315 100644 |
| --- a/components/pairing/bluetooth_host_pairing_controller.cc |
| +++ b/components/pairing/bluetooth_host_pairing_controller.cc |
| @@ -308,17 +308,20 @@ void BluetoothHostPairingController::OnSetError() { |
| void BluetoothHostPairingController::OnAcceptError( |
| const std::string& error_message) { |
| LOG(ERROR) << error_message; |
| + ChangeStage(STAGE_CONTROLLER_CONNECTION_ERROR); |
| } |
| void BluetoothHostPairingController::OnSendError( |
| const std::string& error_message) { |
| LOG(ERROR) << error_message; |
| + ChangeStage(STAGE_CONTROLLER_CONNECTION_ERROR); |
|
dzhioev (left Google)
2015/12/17 23:33:32
I don't think we should call this if |enrollment_s
xdai1
2015/12/17 23:49:08
Agreed. Addressed your comment.
|
| } |
| void BluetoothHostPairingController::OnReceiveError( |
| device::BluetoothSocket::ErrorReason reason, |
| const std::string& error_message) { |
| LOG(ERROR) << reason << ", " << error_message; |
| + ChangeStage(STAGE_CONTROLLER_CONNECTION_ERROR); |
| } |
| void BluetoothHostPairingController::OnHostStatusMessage( |
| @@ -352,6 +355,7 @@ void BluetoothHostPairingController::OnCompleteSetupMessage( |
| const pairing_api::CompleteSetup& message) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| if (current_stage_ != STAGE_ENROLLMENT_SUCCESS) { |
| + ChangeStage(STAGE_ENROLLMENT_ERROR); |
| AbortWithError(PAIRING_ERROR_PAIRING_OR_ENROLLMENT, kErrorInvalidProtocol); |
| return; |
| } |