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

Unified Diff: chrome/browser/content_settings/content_settings_policy_provider.cc

Issue 10537099: add "always allow" option to the mediastream infobar and allow user to allow/not allow acces to devi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Check the exceptions before the default setting, sites in the exceptions list can access the device… Created 8 years, 6 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
Index: chrome/browser/content_settings/content_settings_policy_provider.cc
diff --git a/chrome/browser/content_settings/content_settings_policy_provider.cc b/chrome/browser/content_settings/content_settings_policy_provider.cc
index f71bb4ca19f829fcd97a48019b6e801996caa294..50a84e3a0d86344c7a46a916f2375145012c4a42 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider.cc
+++ b/chrome/browser/content_settings/content_settings_policy_provider.cc
@@ -35,6 +35,7 @@ const char* kPrefToManageType[CONTENT_SETTINGS_NUM_TYPES] = {
NULL, // No policy for default value of content type intents
NULL, // No policy for default value of content type auto-select-certificate
NULL, // No policy for default value of fullscreen requests
+ prefs::kManagedDefaultMediaStreamSetting,
};
struct PrefsForManagedContentSettingsMapEntry {
@@ -157,6 +158,9 @@ void PolicyProvider::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterIntegerPref(prefs::kManagedDefaultNotificationsSetting,
CONTENT_SETTING_DEFAULT,
PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterIntegerPref(prefs::kManagedDefaultMediaStreamSetting,
+ CONTENT_SETTING_DEFAULT,
+ PrefService::UNSYNCABLE_PREF);
}
PolicyProvider::PolicyProvider(PrefService* prefs) : prefs_(prefs) {
@@ -194,6 +198,7 @@ PolicyProvider::PolicyProvider(PrefService* prefs) : prefs_(prefs) {
pref_change_registrar_.Add(prefs::kManagedDefaultPopupsSetting, this);
pref_change_registrar_.Add(prefs::kManagedDefaultGeolocationSetting, this);
pref_change_registrar_.Add(prefs::kManagedDefaultNotificationsSetting, this);
+ pref_change_registrar_.Add(prefs::kManagedDefaultMediaStreamSetting, this);
}
PolicyProvider::~PolicyProvider() {
@@ -435,6 +440,8 @@ void PolicyProvider::Observe(int type,
UpdateManagedDefaultSetting(CONTENT_SETTINGS_TYPE_GEOLOCATION);
} else if (*name == prefs::kManagedDefaultNotificationsSetting) {
UpdateManagedDefaultSetting(CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
+ } else if (*name == prefs::kManagedDefaultMediaStreamSetting) {
+ UpdateManagedDefaultSetting(CONTENT_SETTINGS_TYPE_MEDIASTREAM);
} else if (*name == prefs::kManagedAutoSelectCertificateForUrls ||
*name == prefs::kManagedCookiesAllowedForUrls ||
*name == prefs::kManagedCookiesBlockedForUrls ||

Powered by Google App Engine
This is Rietveld 408576698