summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 02:00:46 +0000
committerdpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 02:00:46 +0000
commit12bb682a916f1fde517fbee8fc7cdcf7cdede878 (patch)
treecc3b4a17af52dcb4840cb3dc1cd78bcdfa6665d3 /chrome
parent56ee015da5ac5d2e254da2ba517bdd59a554d170 (diff)
downloadchromium_src-12bb682a916f1fde517fbee8fc7cdcf7cdede878.zip
chromium_src-12bb682a916f1fde517fbee8fc7cdcf7cdede878.tar.gz
chromium_src-12bb682a916f1fde517fbee8fc7cdcf7cdede878.tar.bz2
Add a histogram tracking the responses to the "remember password" infobar.
BUG=45946 R=jar@chromium.org, jcivelli@chromium.org TEST=none Review URL: http://codereview.chromium.org/2729022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index e398ded..78b2124 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -3099,15 +3099,18 @@ void TabContents::SetAppIcon(const SkBitmap& app_icon) {
class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
SavePasswordInfoBarDelegate(TabContents* tab_contents,
- PasswordFormManager* form_to_save) :
- ConfirmInfoBarDelegate(tab_contents),
- form_to_save_(form_to_save) {
+ PasswordFormManager* form_to_save)
+ : ConfirmInfoBarDelegate(tab_contents),
+ form_to_save_(form_to_save),
+ infobar_response_(kNoResponse) {
}
virtual ~SavePasswordInfoBarDelegate() { }
// Overridden from ConfirmInfoBarDelegate:
virtual void InfoBarClosed() {
+ UMA_HISTOGRAM_ENUMERATION("PasswordManager.InfoBarResponse",
+ infobar_response_, kNumResponseTypes);
delete this;
}
@@ -3136,12 +3139,14 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate {
virtual bool Accept() {
DCHECK(form_to_save_.get());
form_to_save_->Save();
+ infobar_response_ = kRememberPassword;
return true;
}
virtual bool Cancel() {
DCHECK(form_to_save_.get());
form_to_save_->PermanentlyBlacklist();
+ infobar_response_ = kDontRememberPassword;
return true;
}
@@ -3150,6 +3155,15 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate {
// and should update as per her decision.
scoped_ptr<PasswordFormManager> form_to_save_;
+ // Used to track the results we get from the info bar.
+ enum ResponseType {
+ kNoResponse = 0,
+ kRememberPassword,
+ kDontRememberPassword,
+ kNumResponseTypes,
+ };
+ ResponseType infobar_response_;
+
DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate);
};