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

Side by Side Diff: media/video/capture/win/video_capture_device_factory_win.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « media/renderers/video_renderer_impl.cc ('k') | mojo/runner/shell_apptest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/video/capture/win/video_capture_device_factory_win.h" 5 #include "media/video/capture/win/video_capture_device_factory_win.h"
6 6
7 #include <mfapi.h> 7 #include <mfapi.h>
8 #include <mferror.h> 8 #include <mferror.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (!PrepareVideoCaptureAttributesMediaFoundation(attributes.Receive(), 1)) 101 if (!PrepareVideoCaptureAttributesMediaFoundation(attributes.Receive(), 1))
102 return false; 102 return false;
103 103
104 return SUCCEEDED(MFEnumDeviceSources(attributes.get(), devices, count)); 104 return SUCCEEDED(MFEnumDeviceSources(attributes.get(), devices, count));
105 } 105 }
106 106
107 static bool IsDeviceBlackListed(const std::string& name) { 107 static bool IsDeviceBlackListed(const std::string& name) {
108 DCHECK_EQ(BLACKLISTED_CAMERA_MAX + 1, 108 DCHECK_EQ(BLACKLISTED_CAMERA_MAX + 1,
109 static_cast<int>(arraysize(kBlacklistedCameraNames))); 109 static_cast<int>(arraysize(kBlacklistedCameraNames)));
110 for (size_t i = 0; i < arraysize(kBlacklistedCameraNames); ++i) { 110 for (size_t i = 0; i < arraysize(kBlacklistedCameraNames); ++i) {
111 if (base::StartsWithASCII(name, kBlacklistedCameraNames[i], false)) { 111 if (base::StartsWith(name, kBlacklistedCameraNames[i],
112 base::CompareCase::INSENSITIVE_ASCII)) {
112 DVLOG(1) << "Enumerated blacklisted device: " << name; 113 DVLOG(1) << "Enumerated blacklisted device: " << name;
113 UMA_HISTOGRAM_ENUMERATION("Media.VideoCapture.BlacklistedDevice", 114 UMA_HISTOGRAM_ENUMERATION("Media.VideoCapture.BlacklistedDevice",
114 i, BLACKLISTED_CAMERA_MAX + 1); 115 i, BLACKLISTED_CAMERA_MAX + 1);
115 return true; 116 return true;
116 } 117 }
117 } 118 }
118 return false; 119 return false;
119 } 120 }
120 121
121 static void GetDeviceNamesDirectShow(Names* device_names) { 122 static void GetDeviceNamesDirectShow(Names* device_names) {
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 426 }
426 427
427 // static 428 // static
428 VideoCaptureDeviceFactory* 429 VideoCaptureDeviceFactory*
429 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 430 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
430 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 431 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
431 return new VideoCaptureDeviceFactoryWin(); 432 return new VideoCaptureDeviceFactoryWin();
432 } 433 }
433 434
434 } // namespace media 435 } // namespace media
OLDNEW
« no previous file with comments | « media/renderers/video_renderer_impl.cc ('k') | mojo/runner/shell_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698