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 |