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

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: Fix tests Created 6 years, 6 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 5f7d21fe499d74f674d9b1950df562abe54acdb1..28987209ed9f18dd4dfdaa91379e3491fedeb898 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"
@@ -533,6 +535,13 @@ void PasswordFormManager::UpdateLogin() {
// Update metadata.
++pending_credentials_.times_used;
+ if (client_->IsPasswordSyncAccountCredential(
vabr (Chromium) 2014/07/01 08:52:00 Should this signal also be in PasswordFormManager:
Garrett Casto 2014/07/04 07:27:49 If we are saving a new password then the credentia
vabr (Chromium) 2014/07/04 15:53:15 Ah, right, thanks for explaining that to me.
+ 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