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

Unified Diff: base/observer_list_threadsafe.h

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/metrics/field_trial.cc ('k') | base/observer_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/observer_list_threadsafe.h
diff --git a/base/observer_list_threadsafe.h b/base/observer_list_threadsafe.h
index b951a7176c64e4a83802cf62945842aae9bc6fa0..1a6633372b8da5ac8589eef0f4dfe79f2ebaef7b 100644
--- a/base/observer_list_threadsafe.h
+++ b/base/observer_list_threadsafe.h
@@ -168,7 +168,9 @@ class ObserverListThreadSafe
// that at the completion of the Notify call that all Observers have
// been Notified. The notification may still be pending delivery.
template <class Method, class... Params>
- void Notify(Method m, const Params&... params) {
+ void Notify(const tracked_objects::Location& from_here,
+ Method m,
+ const Params&... params) {
UnboundMethod<ObserverType, Method, Tuple<Params...>> method(
m, MakeTuple(params...));
@@ -176,7 +178,7 @@ class ObserverListThreadSafe
for (const auto& entry : observer_lists_) {
ObserverListContext* context = entry.second;
context->loop->PostTask(
- FROM_HERE,
+ from_here,
base::Bind(
&ObserverListThreadSafe<ObserverType>::template NotifyWrapper<
Method, Tuple<Params...>>,
« no previous file with comments | « base/metrics/field_trial.cc ('k') | base/observer_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698