From 76ebe81c525cad2d1707a4e1569a11123478baeb Mon Sep 17 00:00:00 2001 From: achuith Date: Tue, 14 Oct 2014 18:07:13 -0700 Subject: Rename STAGE_PAIRING_DONE to STAGE_ENROLLMENT_SUCCESS STAGE_PAIRING_DONE is not handled by HostPairingScreen. Change generic controller to shark_controller or remora_controller as appropriate. BUG=418061 TEST=compiles. Review URL: https://codereview.chromium.org/651303004 Cr-Commit-Position: refs/heads/master@{#299608} --- components/pairing/bluetooth_host_pairing_controller.cc | 8 ++++---- components/pairing/fake_host_pairing_controller.cc | 4 ++-- components/pairing/host_pairing_controller.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'components/pairing') diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc index d5319c9..dc857c2 100644 --- a/components/pairing/bluetooth_host_pairing_controller.cc +++ b/components/pairing/bluetooth_host_pairing_controller.cc @@ -326,7 +326,7 @@ void BluetoothHostPairingController::OnPairDevicesMessage( void BluetoothHostPairingController::OnCompleteSetupMessage( const pairing_api::CompleteSetup& message) { DCHECK(thread_checker_.CalledOnValidThread()); - if (current_stage_ != STAGE_PAIRING_DONE) { + if (current_stage_ != STAGE_ENROLLMENT_SUCCESS) { AbortWithError(PAIRING_ERROR_PAIRING_OR_ENROLLMENT, kErrorInvalidProtocol); return; } @@ -404,10 +404,10 @@ void BluetoothHostPairingController::OnEnrollmentStatusChanged( enrollment_status_ = enrollment_status; if (enrollment_status == ENROLLMENT_STATUS_SUCCESS) { - ChangeStage(STAGE_PAIRING_DONE); + ChangeStage(STAGE_ENROLLMENT_SUCCESS); } else if (enrollment_status == ENROLLMENT_STATUS_FAILURE) { - AbortWithError(PAIRING_ERROR_PAIRING_OR_ENROLLMENT, - kErrorEnrollmentFailed); + AbortWithError(PAIRING_ERROR_PAIRING_OR_ENROLLMENT, + kErrorEnrollmentFailed); } SendHostStatus(); } diff --git a/components/pairing/fake_host_pairing_controller.cc b/components/pairing/fake_host_pairing_controller.cc index 7b3cc0d..9ebf1b6 100644 --- a/components/pairing/fake_host_pairing_controller.cc +++ b/components/pairing/fake_host_pairing_controller.cc @@ -159,7 +159,7 @@ void FakeHostPairingController::PairingStageChanged(Stage new_stage) { enrollment_should_fail_ = false; ChangeStageLater(STAGE_ENROLLMENT_ERROR); } else { - ChangeStageLater(STAGE_PAIRING_DONE); + ChangeStageLater(STAGE_ENROLLMENT_SUCCESS); } break; } @@ -167,7 +167,7 @@ void FakeHostPairingController::PairingStageChanged(Stage new_stage) { ChangeStageLater(STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE); break; } - case STAGE_PAIRING_DONE: { + case STAGE_ENROLLMENT_SUCCESS: { ChangeStageLater(STAGE_FINISHED); break; } diff --git a/components/pairing/host_pairing_controller.h b/components/pairing/host_pairing_controller.h index 5c5d96d..7be8f59 100644 --- a/components/pairing/host_pairing_controller.h +++ b/components/pairing/host_pairing_controller.h @@ -23,7 +23,7 @@ class HostPairingController { STAGE_WAITING_FOR_CREDENTIALS, STAGE_ENROLLING, STAGE_ENROLLMENT_ERROR, - STAGE_PAIRING_DONE, + STAGE_ENROLLMENT_SUCCESS, STAGE_FINISHED }; -- cgit v1.1