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

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: 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
« no previous file with comments | « chrome/browser/password_manager/test_password_store_service.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9b78a51d2744263172f36e16b4d4246d80afe11d 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(),
+ base::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
« no previous file with comments | « chrome/browser/password_manager/test_password_store_service.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698