Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Unified Diff: components/password_manager/core/common/password_manager_ui.cc

Issue 399573002: [Password Generation] Trigger confirmation bubble when a password is saved (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win Again Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « components/password_manager/core/common/password_manager_ui.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698