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

Unified Diff: extensions/browser/event_router.cc

Issue 600213002: Instrumenting OnExtensionAddListener observer invocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« base/profiler/scoped_profile.h ('K') | « base/profiler/scoped_profile.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/event_router.cc
diff --git a/extensions/browser/event_router.cc b/extensions/browser/event_router.cc
index d006d1e9a7588f049faf243e26c7097c71f47b25..7615a54e3914564c33fa44dec6e7522279dd5c12 100644
--- a/extensions/browser/event_router.cc
+++ b/extensions/browser/event_router.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
+#include "base/profiler/scoped_profile.h"
#include "base/stl_util.h"
#include "base/values.h"
#include "content/public/browser/child_process_security_policy.h"
@@ -237,8 +238,12 @@ void EventRouter::OnListenerAdded(const EventListener* listener) {
listener->GetBrowserContext());
std::string base_event_name = GetBaseEventName(listener->event_name());
ObserverMap::iterator observer = observers_.find(base_event_name);
- if (observer != observers_.end())
+ if (observer != observers_.end()) {
+ // TODO(vadimt): Remove TRACK_RUN_IN_THIS_SCOPED_REGION call below once
+ // crbug.com/417106 is fixed.
Ilya Sherman 2014/09/24 23:38:01 nit: Please prepend "http://" to the link, to incr
+ TRACK_RUN_IN_THIS_SCOPED_REGION(EventRouter_OnListenerAdded_ObserverCall);
observer->second->OnListenerAdded(details);
+ }
}
void EventRouter::OnListenerRemoved(const EventListener* listener) {
« base/profiler/scoped_profile.h ('K') | « base/profiler/scoped_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698