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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc

Issue 924733003: Credential Manager API pops up an auto-signin toast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
index cb41abdcf9b28016a50afc75f697097ff9a0ba8f..4fdc14cd5739b66a7dd54887623d72fd0efbc538 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
@@ -182,6 +182,8 @@ void ManagePasswordsBubbleModel::OnBubbleShown(
metrics_util::AUTOMATIC_GENERATED_PASSWORD_CONFIRMATION;
} else if (state_ == password_manager::ui::CREDENTIAL_REQUEST_STATE) {
display_disposition_ = metrics_util::AUTOMATIC_CREDENTIAL_REQUEST;
+ } else if (state_ == password_manager::ui::AUTO_SIGNIN_STATE) {
+ display_disposition_ = metrics_util::AUTOMATIC_AUTO_SIGNIN_TOAST;
Mike West 2015/02/18 22:28:04 Nit: AUTOMATIC_AUTO is a bit much. How about AUTOM
vasilii 2015/02/19 09:37:34 Done.
} else {
display_disposition_ = metrics_util::AUTOMATIC_WITH_PASSWORD_PENDING;
}
@@ -230,13 +232,13 @@ void ManagePasswordsBubbleModel::OnBubbleHidden() {
metrics_util::LogUIDismissalReason(dismissal_reason_);
// Other use cases have been reported in the callbacks like OnSaveClicked().
- if (dismissal_reason_ == metrics_util::NO_DIRECT_INTERACTION)
+ if (state_ == password_manager::ui::PENDING_PASSWORD_STATE &&
Mike West 2015/02/18 22:28:04 What about clicking away in MANAGE state?
vasilii 2015/02/19 09:37:34 We care only about the "Save" bubble. The "Manage"
+ dismissal_reason_ == metrics_util::NO_DIRECT_INTERACTION)
RecordExperimentStatistics(web_contents(), dismissal_reason_);
}
void ManagePasswordsBubbleModel::OnCollectURLClicked(const std::string& url) {
dismissal_reason_ = metrics_util::CLICKED_COLLECT_URL;
- RecordExperimentStatistics(web_contents(), dismissal_reason_);
// User interaction with bubble has happened, do not need to show bubble
// in case it was before transition to another page.
state_ = password_manager::ui::ASK_USER_REPORT_URL_BUBBLE_SHOWN_STATE;
@@ -249,7 +251,6 @@ void ManagePasswordsBubbleModel::OnCollectURLClicked(const std::string& url) {
void ManagePasswordsBubbleModel::OnDoNotCollectURLClicked() {
dismissal_reason_ = metrics_util::CLICKED_DO_NOT_COLLECT_URL;
- RecordExperimentStatistics(web_contents(), dismissal_reason_);
// User interaction with bubble has happened, do not need to show bubble
// in case it was before transition to another page.
state_ = password_manager::ui::ASK_USER_REPORT_URL_BUBBLE_SHOWN_STATE;
@@ -314,6 +315,10 @@ void ManagePasswordsBubbleModel::OnManageLinkClicked() {
->NavigateToPasswordManagerSettingsPage();
}
+void ManagePasswordsBubbleModel::OnAutoSignInToastTimeout() {
+ dismissal_reason_ = metrics_util::AUTO_SIGNIN_TOAST_TIMEOUT;
+}
+
void ManagePasswordsBubbleModel::OnPasswordAction(
const autofill::PasswordForm& password_form,
PasswordAction action) {

Powered by Google App Engine
This is Rietveld 408576698