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

Unified Diff: content/renderer/pepper/pepper_media_device_manager.cc

Issue 577983002: PPAPI: Make empty webcam names turn in to a space. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wrap in std::string constructor so types match Created 6 years, 3 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/renderer/pepper/pepper_media_device_manager.cc
diff --git a/content/renderer/pepper/pepper_media_device_manager.cc b/content/renderer/pepper/pepper_media_device_manager.cc
index aaf437f0f0228b8ee7646db604ad3e353109b135..0d54964ebc43be717448af96ad6ff693228c3522 100644
--- a/content/renderer/pepper/pepper_media_device_manager.cc
+++ b/content/renderer/pepper/pepper_media_device_manager.cc
@@ -16,7 +16,9 @@ namespace {
ppapi::DeviceRefData FromStreamDeviceInfo(const StreamDeviceInfo& info) {
ppapi::DeviceRefData data;
data.id = info.device.id;
- data.name = info.device.name;
+ // Some Flash content can't handle an empty string, so stick a space in to
+ // make them happy. See crbug.com/408404.
+ data.name = info.device.name.empty() ? std::string(" ") : info.device.name;
data.type = PepperMediaDeviceManager::FromMediaStreamType(info.device.type);
return data;
}
« 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