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

Unified Diff: base/power_monitor/power_monitor.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/observer_list_unittest.cc ('k') | base/system_monitor/system_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/power_monitor/power_monitor.cc
diff --git a/base/power_monitor/power_monitor.cc b/base/power_monitor/power_monitor.cc
index 14dc4b517832785c07153abfed2bcc4a3a738940..98c9c68c1dfae151f7252b816103af14d5f09e9f 100644
--- a/base/power_monitor/power_monitor.cc
+++ b/base/power_monitor/power_monitor.cc
@@ -45,17 +45,18 @@ bool PowerMonitor::IsOnBatteryPower() {
void PowerMonitor::NotifyPowerStateChange(bool battery_in_use) {
DVLOG(1) << "PowerStateChange: " << (battery_in_use ? "On" : "Off")
<< " battery";
- observers_->Notify(&PowerObserver::OnPowerStateChange, battery_in_use);
+ observers_->Notify(FROM_HERE, &PowerObserver::OnPowerStateChange,
+ battery_in_use);
}
void PowerMonitor::NotifySuspend() {
DVLOG(1) << "Power Suspending";
- observers_->Notify(&PowerObserver::OnSuspend);
+ observers_->Notify(FROM_HERE, &PowerObserver::OnSuspend);
}
void PowerMonitor::NotifyResume() {
DVLOG(1) << "Power Resuming";
- observers_->Notify(&PowerObserver::OnResume);
+ observers_->Notify(FROM_HERE, &PowerObserver::OnResume);
}
} // namespace base
« no previous file with comments | « base/observer_list_unittest.cc ('k') | base/system_monitor/system_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698