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

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

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 years, 10 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/media/media_stream_devices_controller.cc
diff --git a/chrome/browser/media/media_stream_devices_controller.cc b/chrome/browser/media/media_stream_devices_controller.cc
index e07b7ccb406d6447f3946b45d51c48aca0b76a7a..08bc4ccf086a2f9ed7b70142475f91acf73917fc 100644
--- a/chrome/browser/media/media_stream_devices_controller.cc
+++ b/chrome/browser/media/media_stream_devices_controller.cc
@@ -12,6 +12,8 @@
#include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h"
#include "chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
+#include "chrome/browser/prefs/pref_registry_syncable.h"
+#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -66,13 +68,13 @@ MediaStreamDevicesController::~MediaStreamDevicesController() {}
// static
void MediaStreamDevicesController::RegisterUserPrefs(
- PrefServiceSyncable* prefs) {
+ PrefRegistrySyncable* prefs) {
prefs->RegisterBooleanPref(prefs::kVideoCaptureAllowed,
true,
- PrefServiceSyncable::UNSYNCABLE_PREF);
+ PrefRegistrySyncable::UNSYNCABLE_PREF);
prefs->RegisterBooleanPref(prefs::kAudioCaptureAllowed,
true,
- PrefServiceSyncable::UNSYNCABLE_PREF);
+ PrefRegistrySyncable::UNSYNCABLE_PREF);
}
@@ -184,11 +186,11 @@ MediaStreamDevicesController::DevicePolicy
MediaStreamDevicesController::GetDevicePolicy(const char* policy_name) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- PrefServiceSyncable* pref = profile_->GetPrefs();
- if (!pref->IsManagedPreference(policy_name))
+ PrefService* prefs = profile_->GetPrefs();
+ if (!prefs->IsManagedPreference(policy_name))
return POLICY_NOT_SET;
- return pref->GetBoolean(policy_name) ? ALWAYS_ALLOW : ALWAYS_DENY;
+ return prefs->GetBoolean(policy_name) ? ALWAYS_ALLOW : ALWAYS_DENY;
}
bool MediaStreamDevicesController::IsRequestAllowedByDefault() const {
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.h ('k') | chrome/browser/media_gallery/media_galleries_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698