diff options
author | vadimt <vadimt@chromium.org> | 2014-10-08 11:23:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-08 18:24:01 +0000 |
commit | 753717a592d27b490657f4e40b188ac6391f5241 (patch) | |
tree | 9395c33296bc7d1df126c2a7642c20ebf7a8085a /extensions/browser/api | |
parent | 4ccdc6d40988948297afc0439037d93ef70f3773 (diff) | |
download | chromium_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 'extensions/browser/api')
-rw-r--r-- | extensions/browser/api/bluetooth/bluetooth_api.cc | 5 | ||||
-rw-r--r-- | extensions/browser/api/system_info/system_info_api.cc | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/extensions/browser/api/bluetooth/bluetooth_api.cc b/extensions/browser/api/bluetooth/bluetooth_api.cc index 2e1e4bc..c59a084 100644 --- a/extensions/browser/api/bluetooth/bluetooth_api.cc +++ b/extensions/browser/api/bluetooth/bluetooth_api.cc @@ -9,6 +9,7 @@ #include "base/bind_helpers.h" #include "base/lazy_instance.h" #include "base/memory/ref_counted.h" +#include "base/profiler/scoped_profile.h" #include "content/public/browser/browser_thread.h" #include "device/bluetooth/bluetooth_adapter.h" #include "device/bluetooth/bluetooth_device.h" @@ -85,6 +86,10 @@ void BluetoothAPI::Shutdown() { } void BluetoothAPI::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("BluetoothAPI::OnListenerAdded")); + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (event_router()->IsBluetoothSupported()) event_router()->OnListenerAdded(); diff --git a/extensions/browser/api/system_info/system_info_api.cc b/extensions/browser/api/system_info/system_info_api.cc index 4f82610..488dc41 100644 --- a/extensions/browser/api/system_info/system_info_api.cc +++ b/extensions/browser/api/system_info/system_info_api.cc @@ -10,6 +10,7 @@ #include "base/lazy_instance.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" +#include "base/profiler/scoped_profile.h" #include "base/strings/string_util.h" #include "base/values.h" #include "components/storage_monitor/removable_storage_observer.h" @@ -237,6 +238,10 @@ void SystemInfoAPI::Shutdown() { } void SystemInfoAPI::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("SystemInfoAPI::OnListenerAdded")); + if (IsSystemStorageEvent(details.event_name)) { StorageMonitor::GetInstance()->EnsureInitialized( base::Bind(&AddEventListener, details.event_name)); |