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

Unified Diff: components/password_manager/core/browser/password_form_manager.cc

Issue 355143006: [Password Manager] Add UMA stats to track interaction with synced accounts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo 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/browser/password_form_manager.cc
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index 42a5681772ba44c4a007409a50522063f03b4763..b8de2fdc110d383ca0914049fa04551f3320169b 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -7,8 +7,10 @@
#include <algorithm>
#include "base/metrics/histogram.h"
+#include "base/metrics/user_metrics.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/autofill/core/browser/form_structure.h"
#include "components/autofill/core/browser/validation.h"
@@ -540,6 +542,13 @@ void PasswordFormManager::UpdateLogin() {
// Update metadata.
++pending_credentials_.times_used;
+ if (client_->IsPasswordSyncAccountCredential(
+ base::UTF16ToUTF8(pending_credentials_.username_value),
+ pending_credentials_.signon_realm)) {
+ base::RecordAction(
+ base::UserMetricsAction("PasswordManager_SyncCredentialUsed"));
+ }
+
// Check to see if this form is a candidate for password generation.
CheckForAccountCreationForm(pending_credentials_, observed_form_);

Powered by Google App Engine
This is Rietveld 408576698