OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/password_manager/core/browser/password_store.h" | 5 #include "components/password_manager/core/browser/password_store.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/dump_without_crashing.h" | 8 #include "base/debug/dump_without_crashing.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 void PasswordStore::LogStatsForBulkDeletionDuringRollback(int num_deletions) { | 235 void PasswordStore::LogStatsForBulkDeletionDuringRollback(int num_deletions) { |
236 UMA_HISTOGRAM_COUNTS("PasswordManager.NumPasswordsDeletedDuringRollback", | 236 UMA_HISTOGRAM_COUNTS("PasswordManager.NumPasswordsDeletedDuringRollback", |
237 num_deletions); | 237 num_deletions); |
238 } | 238 } |
239 | 239 |
240 void PasswordStore::NotifyLoginsChanged( | 240 void PasswordStore::NotifyLoginsChanged( |
241 const PasswordStoreChangeList& changes) { | 241 const PasswordStoreChangeList& changes) { |
242 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 242 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
243 if (!changes.empty()) { | 243 if (!changes.empty()) { |
244 observers_->Notify(&Observer::OnLoginsChanged, changes); | 244 observers_->Notify(FROM_HERE, &Observer::OnLoginsChanged, changes); |
245 #if defined(PASSWORD_MANAGER_ENABLE_SYNC) | 245 #if defined(PASSWORD_MANAGER_ENABLE_SYNC) |
246 if (syncable_service_) | 246 if (syncable_service_) |
247 syncable_service_->ActOnPasswordStoreChanges(changes); | 247 syncable_service_->ActOnPasswordStoreChanges(changes); |
248 #endif | 248 #endif |
249 } | 249 } |
250 } | 250 } |
251 | 251 |
252 template <typename BackendFunc> | 252 template <typename BackendFunc> |
253 void PasswordStore::Schedule(BackendFunc func, | 253 void PasswordStore::Schedule(BackendFunc func, |
254 PasswordStoreConsumer* consumer) { | 254 PasswordStoreConsumer* consumer) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 syncable_service_->InjectStartSyncFlare(flare); | 302 syncable_service_->InjectStartSyncFlare(flare); |
303 } | 303 } |
304 | 304 |
305 void PasswordStore::DestroySyncableService() { | 305 void PasswordStore::DestroySyncableService() { |
306 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); | 306 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); |
307 syncable_service_.reset(); | 307 syncable_service_.reset(); |
308 } | 308 } |
309 #endif | 309 #endif |
310 | 310 |
311 } // namespace password_manager | 311 } // namespace password_manager |
OLD | NEW |