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

Unified Diff: content/browser/media/media_devices_util.cc

Issue 2713653002: Revert of Fall back to default media device from preferences if no default is supplied from the command line. (Closed)
Patch Set: Created 3 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/media/media_devices_util.cc
diff --git a/content/browser/media/media_devices_util.cc b/content/browser/media/media_devices_util.cc
index 722798c5644f8586bc4bfc71753754ebcccbde97..f8320a46fd34be15d1fd8ece6a373c18136972e7 100644
--- a/content/browser/media/media_devices_util.cc
+++ b/content/browser/media/media_devices_util.cc
@@ -49,8 +49,7 @@
return delegate->GetDefaultMediaDeviceID(media_stream_type);
}
-// This function is intended for testing purposes. It returns an empty string
-// if no default device is supplied via the command line.
+// This function is intended for testing purposes.
std::string GetDefaultMediaDeviceIDFromCommandLine(
MediaDeviceType device_type) {
DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -95,12 +94,8 @@
const base::Callback<void(const std::string&)>& callback) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kUseFakeDeviceForMediaStream)) {
- std::string command_line_default_device_id =
- GetDefaultMediaDeviceIDFromCommandLine(device_type);
- if (!command_line_default_device_id.empty()) {
- callback.Run(command_line_default_device_id);
- return;
- }
+ callback.Run(GetDefaultMediaDeviceIDFromCommandLine(device_type));
+ return;
}
BrowserThread::PostTaskAndReplyWithResult(
« 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