Chromium Code Reviews| Index: chrome/browser/media/media_capture_devices_dispatcher.cc |
| diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc |
| index 45fb447f612d58e820ed6eb8986ab84297c5e94e..fe08ad44b0847efa1736a560c38125c2f890789c 100644 |
| --- a/chrome/browser/media/media_capture_devices_dispatcher.cc |
| +++ b/chrome/browser/media/media_capture_devices_dispatcher.cc |
| @@ -8,6 +8,7 @@ |
| #include "apps/app_window_registry.h" |
| #include "base/command_line.h" |
| #include "base/logging.h" |
| +#include "base/metrics/field_trial.h" |
| #include "base/prefs/pref_service.h" |
| #include "base/prefs/scoped_user_pref_update.h" |
| #include "base/sha1.h" |
| @@ -64,6 +65,16 @@ using content::MediaStreamDevices; |
| namespace { |
| +// A finch experiment to enable the permission bubble for media requests only. |
| +bool WebRTCPermissionBubbleExperimentEnabled() { |
|
Sergey Ulanov
2014/05/19 18:39:17
s/WebRTC/MediaSstream/. WebRTC is too generic in t
Greg Billock
2014/05/27 18:08:40
Done.
|
| + const std::string group = |
| + base::FieldTrialList::FindFullName("WebRTCPermissionBubble"); |
| + if (group == "enabled") |
| + return true; |
| + |
| + return false; |
| +} |
| + |
| // Finds a device in |devices| that has |device_id|, or NULL if not found. |
| const content::MediaStreamDevice* FindDeviceWithId( |
| const content::MediaStreamDevices& devices, |
| @@ -623,7 +634,8 @@ void MediaCaptureDevicesDispatcher::ProcessQueuedAccessRequest( |
| DCHECK(!it->second.empty()); |
| - if (PermissionBubbleManager::Enabled()) { |
| + if (PermissionBubbleManager::Enabled() || |
| + WebRTCPermissionBubbleExperimentEnabled()) { |
| scoped_ptr<MediaStreamDevicesController> controller( |
| new MediaStreamDevicesController(web_contents, |
| it->second.front().request, |