summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/preference/preference_api.cc
diff options
context:
space:
mode:
authorvadimt <vadimt@chromium.org>2014-10-08 11:23:19 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-08 18:24:01 +0000
commit753717a592d27b490657f4e40b188ac6391f5241 (patch)
tree9395c33296bc7d1df126c2a7642c20ebf7a8085a /chrome/browser/extensions/api/preference/preference_api.cc
parent4ccdc6d40988948297afc0439037d93ef70f3773 (diff)
downloadchromium_src-753717a592d27b490657f4e40b188ac6391f5241.zip
chromium_src-753717a592d27b490657f4e40b188ac6391f5241.tar.gz
chromium_src-753717a592d27b490657f4e40b188ac6391f5241.tar.bz2
Instrumenting descendants of EventRouter::Observer to find out what causes jankiness of ExtensionMessageFilter::OnExtensionAddListener task.
See the bug and the previous checking in the bug for details. BUG=417106 Review URL: https://codereview.chromium.org/638763002 Cr-Commit-Position: refs/heads/master@{#298749}
Diffstat (limited to 'chrome/browser/extensions/api/preference/preference_api.cc')
-rw-r--r--chrome/browser/extensions/api/preference/preference_api.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/extensions/api/preference/preference_api.cc b/chrome/browser/extensions/api/preference/preference_api.cc
index 1eeb6f0..c4cf8a6 100644
--- a/chrome/browser/extensions/api/preference/preference_api.cc
+++ b/chrome/browser/extensions/api/preference/preference_api.cc
@@ -10,6 +10,7 @@
#include "base/lazy_instance.h"
#include "base/memory/singleton.h"
#include "base/prefs/pref_service.h"
+#include "base/profiler/scoped_profile.h"
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
@@ -449,6 +450,10 @@ PreferenceAPI* PreferenceAPI::Get(content::BrowserContext* context) {
}
void PreferenceAPI::OnListenerAdded(const EventListenerInfo& details) {
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/417106 is fixed.
+ tracked_objects::ScopedProfile tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("PreferenceAPI::OnListenerAdded"));
+
preference_event_router_.reset(new PreferenceEventRouter(profile_));
EventRouter::Get(profile_)->UnregisterObserver(this);
}