Index: components/password_manager/core/browser/password_form_manager.h |
diff --git a/components/password_manager/core/browser/password_form_manager.h b/components/password_manager/core/browser/password_form_manager.h |
index 0ad2261d268459037df09e440eb86b4fff015d44..cbd056fd3177f30657482fda874c7e1fd02c7104 100644 |
--- a/components/password_manager/core/browser/password_form_manager.h |
+++ b/components/password_manager/core/browser/password_form_manager.h |
@@ -273,6 +273,13 @@ class PasswordFormManager : public FormFetcher::Consumer { |
kManagerActionMax |
}; |
+ // Same as above, without the obsoleted 'Blacklisted' action. |
+ enum ManagerActionNew { |
+ kManagerActionNewNone, |
+ kManagerActionNewAutofilled, |
+ kManagerActionNewMax |
+ }; |
+ |
// UserAction - What does the user do with this form? If they do nothing |
// (either by accepting what the password manager did, or by simply (not |
// typing anything at all), you get None. If there were multiple choices and |
@@ -325,6 +332,28 @@ class PasswordFormManager : public FormFetcher::Consumer { |
static const int kMaxNumActionsTaken = |
kManagerActionMax * kUserActionMax * kSubmitResultMax; |
+ // Enumerates whether there was a `suppressed` stored credential, meaning that |
+ // it was not filled because it had an origin that almost, but not quite |
kolos1
2017/05/23 09:50:11
I believe "that almost, but not quite matched" is
engedy
2017/05/23 20:40:18
Done.
|
+ // matched the origin of |observed_form_|. If so, also records whether its |
+ // username and password match those entered or filled into the observed form. |
+ enum SuppressedAccountType { |
kolos1
2017/05/23 09:50:11
SuppressedAccountType => SuppressedAccountMatch. W
engedy
2017/05/23 20:40:18
Actually, how about SuppressedAccountExistence?
|
+ kSuppressedAccountNone, |
+ // Recorded when there exists a suppressed credential, but there was no |
+ // submitted form to compare the username and password to. |
+ kSuppressedAccountExists, |
+ // Recorded when there was a submitted form. |
+ kSuppressedAccountExistsDifferentUsername, |
+ kSuppressedAccountExistsSameUsername, |
+ kSuppressedAccountExistsSameUsernameAndPassword, |
+ kSuppressedAccountTypeMax, |
+ }; |
+ |
+ // The maximum number of combinations recorded into histograms in the |
+ // PasswordManager.SuppressedAccount.* family. |
+ static constexpr int kMaxSuppressedAccountStats = |
+ kSuppressedAccountTypeMax * kManagerActionNewMax * kUserActionMax * |
+ kSubmitResultMax; |
+ |
// Through |driver|, supply the associated frame with appropriate information |
// (fill data, whether to allow password generation, etc.). |
void ProcessFrameInternal(const base::WeakPtr<PasswordManagerDriver>& driver); |
@@ -399,6 +428,13 @@ class PasswordFormManager : public FormFetcher::Consumer { |
// UMA. |
int GetActionsTaken() const; |
+ // Computes statistics on whether there was a stored credential with the |
+ // specified |type| that could not be filled into the |observed_form_| because |
+ // the scheme of its origin was HTTPS rather than HTTP; and encodes this |
+ // information into an integer so it can be recorded as a UMA histogram. |
+ int GetStatsForSuppressedHTTPSAccount( |
+ autofill::PasswordForm::Type type) const; |
+ |
// Tries to set all votes (e.g. autofill field types, generation vote) to |
// a |FormStructure| and upload it to the server. Returns true on success. |
bool UploadPasswordVote(const autofill::PasswordForm& form_to_upload, |
@@ -469,7 +505,7 @@ class PasswordFormManager : public FormFetcher::Consumer { |
// Set of blacklisted forms from the PasswordStore that best match the current |
// form. They are owned by |form_fetcher_|, with the exception that if |
// |new_blacklisted_| is not null, the address of that form is also inside |
- // |blacklisted_matches_|.. |
+ // |blacklisted_matches_|. |
std::vector<const autofill::PasswordForm*> blacklisted_matches_; |
// If the observed form gets blacklisted through |this|, the blacklist entry |