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

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 772413004: Revive PasswordManager.OsPasswordStatus histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: blank lines Created 6 years 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 | « no previous file | chrome/browser/password_manager/password_manager_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/chrome_password_manager_client.cc
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index e0b00b7cc4953bd3d4aaeb24bb1f65c2f5ae73f1..b98f9e7d496500ebd6343c48ccf5c09388142be0 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -50,6 +50,19 @@
#include "chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h"
#endif
+namespace {
+
+void ReportOsPassword() {
+ password_manager_util::OsPasswordStatus status =
+ password_manager_util::GetOsPasswordStatus();
+
+ UMA_HISTOGRAM_ENUMERATION("PasswordManager.OsPasswordStatus",
+ status,
+ password_manager_util::MAX_PASSWORD_STATUS);
+}
+
+} // namespace
+
using password_manager::ContentPasswordManagerDriverFactory;
using password_manager::PasswordManagerInternalsService;
using password_manager::PasswordManagerInternalsServiceFactory;
@@ -94,6 +107,12 @@ ChromePasswordManagerClient::ChromePasswordManagerClient(
if (service)
can_use_log_router_ = service->RegisterClient(this);
SetUpAutofillSyncState();
+ // Avoid checking OS password until later on in browser startup
+ // since it calls a few Windows APIs.
+ base::MessageLoopProxy::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&ReportOsPassword),
+ base::TimeDelta::FromSeconds(10));
}
ChromePasswordManagerClient::~ChromePasswordManagerClient() {
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_manager_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698