| Index: components/password_manager/core/common/password_manager_ui.cc
|
| diff --git a/components/password_manager/core/common/password_manager_ui.cc b/components/password_manager/core/common/password_manager_ui.cc
|
| index 4b6e7d5884f30d0a1963282e2e31945c4c2ca287..b76394ed7f1a79662850d375e45ab29fd1a63903 100644
|
| --- a/components/password_manager/core/common/password_manager_ui.cc
|
| +++ b/components/password_manager/core/common/password_manager_ui.cc
|
| @@ -2,6 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "base/logging.h"
|
| #include "components/password_manager/core/common/password_manager_ui.h"
|
|
|
| namespace password_manager {
|
| @@ -13,6 +14,26 @@ bool IsPendingState(State state) {
|
| state == PENDING_PASSWORD_STATE;
|
| }
|
|
|
| +bool IsAutomaticDisplayState(State state) {
|
| + return state == PENDING_PASSWORD_AND_BUBBLE_STATE ||
|
| + state == CONFIRMATION_STATE;
|
| +}
|
| +
|
| +State GetEndStateForAutomaticState(State state) {
|
| + DCHECK(IsAutomaticDisplayState(state));
|
| + switch (state) {
|
| + case PENDING_PASSWORD_AND_BUBBLE_STATE:
|
| + return PENDING_PASSWORD_STATE;
|
| + break;
|
| + case CONFIRMATION_STATE:
|
| + return MANAGE_STATE;
|
| + break;
|
| + default:
|
| + NOTREACHED();
|
| + return INACTIVE_STATE;
|
| + }
|
| +}
|
| +
|
| } // namespace ui
|
|
|
| } // namespace password_manager
|
|
|