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

Unified Diff: media/video/capture/fake_video_capture_device.cc

Issue 17846002: Refactor the VideoCaptureDevice::Name struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 6 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
Index: media/video/capture/fake_video_capture_device.cc
diff --git a/media/video/capture/fake_video_capture_device.cc b/media/video/capture/fake_video_capture_device.cc
index 34f8f20d701d8b3e2accd3b433db342a2b5b8ebe..0201b098af17a3dfc8283835db233685535ce4c4 100644
--- a/media/video/capture/fake_video_capture_device.cc
+++ b/media/video/capture/fake_video_capture_device.cc
@@ -27,9 +27,8 @@ void FakeVideoCaptureDevice::GetDeviceNames(Names* const device_names) {
device_names->erase(device_names->begin(), device_names->end());
for (int n = 0; n < kNumberOfFakeDevices; n++) {
- Name name;
- name.unique_id = base::StringPrintf("/dev/video%d", n);
- name.device_name = base::StringPrintf("fake_device_%d", n);
+ Name name(base::StringPrintf("fake_device_%d", n),
+ base::StringPrintf("/dev/video%d", n));
device_names->push_back(name);
}
}
@@ -41,7 +40,7 @@ VideoCaptureDevice* FakeVideoCaptureDevice::Create(const Name& device_name) {
}
for (int n = 0; n < kNumberOfFakeDevices; ++n) {
std::string possible_id = base::StringPrintf("/dev/video%d", n);
- if (device_name.unique_id.compare(possible_id) == 0) {
+ if (device_name.id().compare(possible_id) == 0) {
return new FakeVideoCaptureDevice(device_name);
}
}
« no previous file with comments | « media/video/capture/android/video_capture_device_android.cc ('k') | media/video/capture/linux/video_capture_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698