summaryrefslogtreecommitdiffstats
path: root/components/pairing
diff options
context:
space:
mode:
authorachuith <achuith@chromium.org>2014-10-14 18:07:13 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-15 01:07:29 +0000
commit76ebe81c525cad2d1707a4e1569a11123478baeb (patch)
tree27439884afb0aab1a5a18e4a17b6f15997ac65de /components/pairing
parent3044c2b06b9a5c651f744cb3f469844bea78d66a (diff)
downloadchromium_src-76ebe81c525cad2d1707a4e1569a11123478baeb.zip
chromium_src-76ebe81c525cad2d1707a4e1569a11123478baeb.tar.gz
chromium_src-76ebe81c525cad2d1707a4e1569a11123478baeb.tar.bz2
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}
Diffstat (limited to 'components/pairing')
-rw-r--r--components/pairing/bluetooth_host_pairing_controller.cc8
-rw-r--r--components/pairing/fake_host_pairing_controller.cc4
-rw-r--r--components/pairing/host_pairing_controller.h2
3 files changed, 7 insertions, 7 deletions
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
};