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

Side by Side Diff: components/password_manager/core/browser/password_store.cc

Issue 877993003: Pass FROM_HERE to ObserverListThreadSafe::Notify to improve profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/local/canned_syncable_file_system.cc ('k') | components/storage_monitor/storage_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698