Commit 18fab25c authored by gbillock@chromium.org's avatar gbillock@chromium.org

[Media] Add a Finch experiment to enable the permission bubble request.

R=xhwang@chromium.org

Review URL: https://codereview.chromium.org/286883002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273099 0039d316-1c4b-4281-b951-d872f2087c98
parent 85bb5af7
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment