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

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

Issue 644053003: [Password Manager] Add UMA stats for custom passphrase users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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_manager.cc
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index aa5744e18b28bbd180072f8f6e54e81f47647f72..ec7991cc19b45463e04efde10b96ea925d9db3b2 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -41,7 +41,8 @@ typedef autofill::SavePasswordProgressLogger Logger;
// that this is only ever called from a single thread in order to
// avoid needing to lock (a static boolean flag is then sufficient to
// guarantee running only once).
-void ReportMetrics(bool password_manager_enabled) {
+void ReportMetrics(bool password_manager_enabled,
+ PasswordManagerClient* client) {
static base::PlatformThreadId initial_thread_id =
base::PlatformThread::CurrentId();
DCHECK(initial_thread_id == base::PlatformThread::CurrentId());
@@ -51,6 +52,8 @@ void ReportMetrics(bool password_manager_enabled) {
return;
ran_once = true;
+ PasswordStore* store = client->GetPasswordStore();
+ store->ReportMetrics(client);
UMA_HISTOGRAM_BOOLEAN("PasswordManager.Enabled", password_manager_enabled);
}
@@ -112,7 +115,7 @@ PasswordManager::PasswordManager(PasswordManagerClient* client)
saving_passwords_enabled_.Init(prefs::kPasswordManagerSavingEnabled,
client_->GetPrefs());
- ReportMetrics(*saving_passwords_enabled_);
+ ReportMetrics(*saving_passwords_enabled_, client_);
}
PasswordManager::~PasswordManager() {

Powered by Google App Engine
This is Rietveld 408576698