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

Side by Side Diff: chrome/browser/media/media_stream_devices_controller.cc

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media/media_stream_devices_controller.h" 5 #include "chrome/browser/media/media_stream_devices_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/content_settings/content_settings_provider.h" 10 #include "chrome/browser/content_settings/content_settings_provider.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 MediaStreamDevicesController::~MediaStreamDevicesController() { 90 MediaStreamDevicesController::~MediaStreamDevicesController() {
91 if (!callback_.is_null()) { 91 if (!callback_.is_null()) {
92 callback_.Run(content::MediaStreamDevices(), 92 callback_.Run(content::MediaStreamDevices(),
93 scoped_ptr<content::MediaStreamUI>()); 93 scoped_ptr<content::MediaStreamUI>());
94 } 94 }
95 } 95 }
96 96
97 // static 97 // static
98 void MediaStreamDevicesController::RegisterUserPrefs( 98 void MediaStreamDevicesController::RegisterProfilePrefs(
99 user_prefs::PrefRegistrySyncable* prefs) { 99 user_prefs::PrefRegistrySyncable* prefs) {
100 prefs->RegisterBooleanPref(prefs::kVideoCaptureAllowed, 100 prefs->RegisterBooleanPref(prefs::kVideoCaptureAllowed,
101 true, 101 true,
102 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 102 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
103 prefs->RegisterBooleanPref(prefs::kAudioCaptureAllowed, 103 prefs->RegisterBooleanPref(prefs::kAudioCaptureAllowed,
104 true, 104 true,
105 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 105 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
106 prefs->RegisterListPref(prefs::kVideoCaptureAllowedUrls, 106 prefs->RegisterListPref(prefs::kVideoCaptureAllowedUrls,
107 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 107 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
108 prefs->RegisterListPref(prefs::kAudioCaptureAllowedUrls, 108 prefs->RegisterListPref(prefs::kAudioCaptureAllowedUrls,
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 if (request_.audio_type == content::MEDIA_TAB_AUDIO_CAPTURE || 425 if (request_.audio_type == content::MEDIA_TAB_AUDIO_CAPTURE ||
426 request_.video_type == content::MEDIA_TAB_VIDEO_CAPTURE) { 426 request_.video_type == content::MEDIA_TAB_VIDEO_CAPTURE) {
427 return; 427 return;
428 } 428 }
429 429
430 if (request_.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE) 430 if (request_.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE)
431 content_settings_->OnMicrophoneAccessBlocked(); 431 content_settings_->OnMicrophoneAccessBlocked();
432 if (request_.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE) 432 if (request_.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE)
433 content_settings_->OnCameraAccessBlocked(); 433 content_settings_->OnCameraAccessBlocked();
434 } 434 }
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.h ('k') | chrome/browser/media_galleries/media_galleries_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698