summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorreillyg <reillyg@chromium.org>2015-02-09 12:18:33 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-09 20:19:19 +0000
commit9a77a7236aeab865e82dcb0baef21ab6e039cd2b (patch)
tree38b03be4cfb2ef13d1dbd94edda2350b8559f20d /components
parentc4f022a6bd3426307459d3773a0b86553d3efeea (diff)
downloadchromium_src-9a77a7236aeab865e82dcb0baef21ab6e039cd2b.zip
chromium_src-9a77a7236aeab865e82dcb0baef21ab6e039cd2b.tar.gz
chromium_src-9a77a7236aeab865e82dcb0baef21ab6e039cd2b.tar.bz2
Pass FROM_HERE to ObserverListThreadSafe::Notify to improve profile.
ObserverListThreadSafe::Notify is the 4th most called function in a profile generated on my host. This is because all tasks posted from it are stamped with this callsite, providing very little information. This patch forces callers to pass in their own tracking data so that the profile will differentiate between each observer list holder. TBR=garykac@chromium.org,rdsmith@chromium.org,stuartmorgan@chromium.org,gbillock@chromium.org Review URL: https://codereview.chromium.org/877993003 Cr-Commit-Position: refs/heads/master@{#315372}
Diffstat (limited to 'components')
-rw-r--r--components/password_manager/core/browser/password_store.cc2
-rw-r--r--components/storage_monitor/storage_monitor.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/components/password_manager/core/browser/password_store.cc b/components/password_manager/core/browser/password_store.cc
index ebdeb83..0934321 100644
--- a/components/password_manager/core/browser/password_store.cc
+++ b/components/password_manager/core/browser/password_store.cc
@@ -225,7 +225,7 @@ void PasswordStore::NotifyLoginsChanged(
const PasswordStoreChangeList& changes) {
DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread());
if (!changes.empty()) {
- observers_->Notify(&Observer::OnLoginsChanged, changes);
+ observers_->Notify(FROM_HERE, &Observer::OnLoginsChanged, changes);
#if defined(PASSWORD_MANAGER_ENABLE_SYNC)
if (syncable_service_)
syncable_service_->ActOnPasswordStoreChanges(changes);
diff --git a/components/storage_monitor/storage_monitor.cc b/components/storage_monitor/storage_monitor.cc
index f82995d..0f1f6cc 100644
--- a/components/storage_monitor/storage_monitor.cc
+++ b/components/storage_monitor/storage_monitor.cc
@@ -172,7 +172,7 @@ void StorageMonitor::ProcessAttach(const StorageInfo& info) {
DVLOG(1) << "StorageAttached id " << info.device_id();
if (StorageInfo::IsRemovableDevice(info.device_id())) {
observer_list_->Notify(
- &RemovableStorageObserver::OnRemovableStorageAttached, info);
+ FROM_HERE, &RemovableStorageObserver::OnRemovableStorageAttached, info);
}
}
@@ -190,7 +190,7 @@ void StorageMonitor::ProcessDetach(const std::string& id) {
DVLOG(1) << "StorageDetached for id " << id;
if (StorageInfo::IsRemovableDevice(info.device_id())) {
observer_list_->Notify(
- &RemovableStorageObserver::OnRemovableStorageDetached, info);
+ FROM_HERE, &RemovableStorageObserver::OnRemovableStorageDetached, info);
}
}