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

Unified Diff: chrome/browser/media/media_capture_devices_dispatcher.cc

Issue 286883002: [Media] Add a Finch experiment to enable the permission bubble request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: name Created 6 years, 7 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: 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,
« 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