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

Unified Diff: media/video/capture/mac/video_capture_device_factory_mac.mm

Issue 921983004: mac: Add profiling for VideoCaptureDeviceFactoryMac::EnumerateDeviceNames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from mcasas. 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: media/video/capture/mac/video_capture_device_factory_mac.mm
diff --git a/media/video/capture/mac/video_capture_device_factory_mac.mm b/media/video/capture/mac/video_capture_device_factory_mac.mm
index ad285b6dd935475a5b5b69d3e74a2eddb85699d3..79863463ca1e7d0d1c7121716301dbb4d1fea2dc 100644
--- a/media/video/capture/mac/video_capture_device_factory_mac.mm
+++ b/media/video/capture/mac/video_capture_device_factory_mac.mm
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_util.h"
#include "base/task_runner_util.h"
#import "media/base/mac/avfoundation_glue.h"
@@ -44,6 +45,12 @@ static bool IsDeviceBlacklisted(const VideoCaptureDevice::Name& name) {
static scoped_ptr<media::VideoCaptureDevice::Names>
EnumerateDevicesUsingQTKit() {
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/458397 is
+ // fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458397 media::EnumerateDevicesUsingQTKit"));
+
scoped_ptr<VideoCaptureDevice::Names> device_names(
new VideoCaptureDevice::Names());
NSMutableDictionary* capture_devices =
@@ -64,6 +71,11 @@ static void RunDevicesEnumeratedCallback(
const base::Callback<void(scoped_ptr<media::VideoCaptureDevice::Names>)>&
callback,
scoped_ptr<media::VideoCaptureDevice::Names> device_names) {
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/458397 is
+ // fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458397 media::RunDevicesEnumeratedCallback"));
callback.Run(device_names.Pass());
}
@@ -102,6 +114,11 @@ scoped_ptr<VideoCaptureDevice> VideoCaptureDeviceFactoryMac::Create(
void VideoCaptureDeviceFactoryMac::GetDeviceNames(
VideoCaptureDevice::Names* device_names) {
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/458397 is
+ // fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "458397 VideoCaptureDeviceFactoryMac::GetDeviceNames"));
DCHECK(thread_checker_.CalledOnValidThread());
// Loop through all available devices and add to |device_names|.
NSDictionary* capture_devices;
« 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