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

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

Issue 1248613003: Issue 501916 : Add data type counts to profile deletion flow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First draft Created 5 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
Index: components/password_manager/core/browser/password_store.cc
diff --git a/components/password_manager/core/browser/password_store.cc b/components/password_manager/core/browser/password_store.cc
index 9a380a84078d0c46c35a558be1d453aebafb0201..7561d9c5fc3ba54b5d98e5e238f45cd66f372943 100644
--- a/components/password_manager/core/browser/password_store.cc
+++ b/components/password_manager/core/browser/password_store.cc
@@ -9,6 +9,7 @@
#include "base/location.h"
#include "base/metrics/histogram_macros.h"
#include "base/stl_util.h"
+#include "base/task_runner_util.h"
#include "base/thread_task_runner_handle.h"
#include "components/autofill/core/common/password_form.h"
#include "components/password_manager/core/browser/affiliated_match_helper.h"
@@ -172,6 +173,18 @@ void PasswordStore::GetBlacklistLogins(PasswordStoreConsumer* consumer) {
Schedule(&PasswordStore::GetBlacklistLoginsImpl, consumer);
}
+void PasswordStore::GetCountOfLogins(base::Callback<void(int)> callback) {
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner(
+ GetBackgroundTaskRunner());
+ if (task_runner.get()) {
+ base::PostTaskAndReplyWithResult(
+ task_runner.get(), FROM_HERE,
+ base::Bind(&PasswordStore::GetCountOfLoginsImpl,
+ base::Unretained(this)),
+ callback);
+ }
+}
+
void PasswordStore::ReportMetrics(const std::string& sync_username,
bool custom_passphrase_sync_enabled) {
scoped_refptr<base::SingleThreadTaskRunner> task_runner(

Powered by Google App Engine
This is Rietveld 408576698