| 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..87fcb2a6c934ba93745107a19ee0417236f7cf5b 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 MediaStreamPermissionBubbleExperimentEnabled() {
|
| + const std::string group =
|
| + base::FieldTrialList::FindFullName("MediaStreamPermissionBubble");
|
| + 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() ||
|
| + MediaStreamPermissionBubbleExperimentEnabled()) {
|
| scoped_ptr<MediaStreamDevicesController> controller(
|
| new MediaStreamDevicesController(web_contents,
|
| it->second.front().request,
|
|
|