Chromium Code Reviews| 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 276090ab12f0b3fac862c57be77c9bde9dc49031..164db45209728823677aea2364155392f17fb674 100644 |
| --- a/components/password_manager/core/browser/password_store.cc |
| +++ b/components/password_manager/core/browser/password_store.cc |
| @@ -160,10 +160,15 @@ void PasswordStore::GetBlacklistLogins(PasswordStoreConsumer* consumer) { |
| void PasswordStore::ReportMetrics(const std::string& sync_username, |
| bool custom_passphrase_sync_enabled) { |
| - ScheduleTask(base::Bind(&PasswordStore::ReportMetricsImpl, |
| - this, |
| - sync_username, |
| - custom_passphrase_sync_enabled)); |
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner( |
| + GetBackgroundTaskRunner()); |
| + if (task_runner) { |
| + base::Closure task = |
| + base::Bind(&PasswordStore::ReportMetricsImpl, this, sync_username, |
|
vasilii
2015/02/03 17:27:42
My concern is that you capture the scoped pointer
|
| + custom_passphrase_sync_enabled); |
| + task_runner->PostDelayedTask(FROM_HERE, task, |
| + base::TimeDelta::FromSeconds(30)); |
| + } |
| } |
| void PasswordStore::AddObserver(Observer* observer) { |