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

Unified Diff: chrome/browser/ui/passwords/password_manager_presenter.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: chrome/browser/ui/passwords/password_manager_presenter.cc
diff --git a/chrome/browser/ui/passwords/password_manager_presenter.cc b/chrome/browser/ui/passwords/password_manager_presenter.cc
index a8d96a7f1fdba7d90f95743443d5cc3103ba6e9d..e8ec2baeace3f682b93070262b294c7cf1d49e63 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter.cc
+++ b/chrome/browser/ui/passwords/password_manager_presenter.cc
@@ -6,11 +6,14 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/metrics/user_metrics_action.h"
#include "base/prefs/pref_service.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/values.h"
#include "chrome/browser/password_manager/password_manager_util.h"
#include "chrome/browser/password_manager/password_store_factory.h"
+#include "chrome/browser/password_manager/sync_metrics.h"
#include "chrome/browser/ui/passwords/password_ui_view.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
@@ -125,6 +128,15 @@ void PasswordManagerPresenter::RequestShowPassword(size_t index) {
else
return;
}
+
+ if (password_manager_sync_metrics::IsPasswordSyncAccountCredential(
+ password_view_->GetProfile(),
+ UTF16ToUTF8(password_list_[index]->username_value),
+ password_list_[index]->signon_realm)) {
+ content::RecordAction(
+ base::UserMetricsAction("PasswordManager_SyncCredentialShown"));
+ }
+
// Call back the front end to reveal the password.
password_view_->ShowPassword(index, password_list_[index]->password_value);
#endif

Powered by Google App Engine
This is Rietveld 408576698