Commit 8e48128a authored by Regan Hsu's avatar Regan Hsu Committed by Commit Bot

[CrOS PhoneHub] Readjust NotificationAccessSetupOperation::Status enums.

The NotoficationAccessSetupOperation::Status enums were out of sync by
1, because the multidevice_notification_access_setup_dialog.js enums
include a NOT_STARTED state to accommodate the initial dialog state.
This CL fixes that.

Bug: 1106937
Change-Id: I3d27cac52adb20cd5775a238355f2aaa9aae722c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462608Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815672}
parent 2fd257cc
...@@ -27,26 +27,27 @@ namespace phonehub { ...@@ -27,26 +27,27 @@ namespace phonehub {
class NotificationAccessSetupOperation { class NotificationAccessSetupOperation {
public: public:
// Note: Numerical values should not be changed because they must stay in // Note: Numerical values should not be changed because they must stay in
// sync with multidevice_notification_access_setup_dialog.js. // sync with multidevice_notification_access_setup_dialog.js, with the
// exception of NOT_STARTED, which has a value of 0.
enum class Status { enum class Status {
// Connecting to the phone in order to set up notification access. // Connecting to the phone in order to set up notification access.
kConnecting = 0, kConnecting = 1,
// No connection was able to be made to the phone within the expected time // No connection was able to be made to the phone within the expected time
// period. // period.
kTimedOutConnecting = 1, kTimedOutConnecting = 2,
// A connection to the phone was successful, but it unexpectedly became // A connection to the phone was successful, but it unexpectedly became
// disconnected before the setup flow could complete. // disconnected before the setup flow could complete.
kConnectionDisconnected = 2, kConnectionDisconnected = 3,
// A connection to the phone has succeeded, and a message has been sent to // A connection to the phone has succeeded, and a message has been sent to
// the phone to start the notification access opt-in flow. However, the user // the phone to start the notification access opt-in flow. However, the user
// has not yet completed the flow phone-side. // has not yet completed the flow phone-side.
kSentMessageToPhoneAndWaitingForResponse = 3, kSentMessageToPhoneAndWaitingForResponse = 4,
// The user has completed the phone-side opt-in flow. // The user has completed the phone-side opt-in flow.
kCompletedSuccessfully = 4, kCompletedSuccessfully = 5,
}; };
// Returns true if the provided status is the final one for this operation, // Returns true if the provided status is the final one for this operation,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment