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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 926463002: mac: Add profiling for MediaStreamManager::StartMonitoringOnUIThread. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 11bfb0ed242c5cd9471ebf9f48f03cfcd175c374..cf9e36b06f3b840e484bdd40727d567e5b2ee9d8 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/power_monitor/power_monitor.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/rand_util.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
@@ -965,6 +966,11 @@ void MediaStreamManager::StopRemovedDevice(const MediaStreamDevice& device) {
}
void MediaStreamManager::StartMonitoring() {
+ // TODO(erikchen): Remove ScopedTracker below once crbug.com/458404 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458404 MediaStreamManager::StartMonitoring"));
+
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (monitoring_started_)
return;
@@ -975,10 +981,19 @@ void MediaStreamManager::StartMonitoring() {
monitoring_started_ = true;
base::SystemMonitor::Get()->AddDevicesChangedObserver(this);
+ // TODO(erikchen): Remove ScopedTracker below once crbug.com/458404 is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458404 MediaStreamManager::StartMonitoring::EnumerateAudio"));
// Enumerate both the audio and video devices to cache the device lists
// and send them to media observer.
++active_enumeration_ref_count_[MEDIA_DEVICE_AUDIO_CAPTURE];
audio_input_device_manager_->EnumerateDevices(MEDIA_DEVICE_AUDIO_CAPTURE);
+
+ // TODO(erikchen): Remove ScopedTracker below once crbug.com/458404 is fixed.
+ tracked_objects::ScopedTracker tracking_profile3(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458404 MediaStreamManager::StartMonitoring::EnumerateVideo"));
++active_enumeration_ref_count_[MEDIA_DEVICE_VIDEO_CAPTURE];
video_capture_manager_->EnumerateDevices(MEDIA_DEVICE_VIDEO_CAPTURE);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698