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

Unified Diff: trunk/src/media/video/capture/mac/video_capture_device_mac.mm

Issue 61213006: Revert 235728 "Removed RunUntilIdle between Stop and Close in UT..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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
Index: trunk/src/media/video/capture/mac/video_capture_device_mac.mm
===================================================================
--- trunk/src/media/video/capture/mac/video_capture_device_mac.mm (revision 235779)
+++ trunk/src/media/video/capture/mac/video_capture_device_mac.mm (working copy)
@@ -208,17 +208,10 @@
DCHECK_EQ(loop_proxy_, base::MessageLoopProxy::current());
DCHECK_EQ(state_, kNotInitialized);
- // TODO(mcasas): The following check might not be necessary; if the device has
- // disappeared after enumeration and before coming here, opening would just
- // fail but not necessarily produce a crash.
Names device_names;
GetDeviceNames(&device_names);
- Names::iterator it = device_names.begin();
- for (; it != device_names.end(); ++it) {
- if (it->id() == device_name_.id())
- break;
- }
- if (it == device_names.end())
+ Name* found = device_names.FindById(device_name_.id());
+ if (!found)
return false;
capture_device_ =
« no previous file with comments | « trunk/src/media/video/capture/fake_video_capture_device.cc ('k') | trunk/src/media/video/capture/video_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698