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

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

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 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/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/prefs/scoped_user_pref_update.h" 10 #include "base/prefs/scoped_user_pref_update.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 return true; 80 return true;
81 } 81 }
82 82
83 bool IsInKioskMode() { 83 bool IsInKioskMode() {
84 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) 84 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode))
85 return true; 85 return true;
86 86
87 #if defined(OS_CHROMEOS) 87 #if defined(OS_CHROMEOS)
88 const chromeos::UserManager* user_manager = chromeos::UserManager::Get(); 88 const chromeos::UserManager* user_manager = chromeos::GetUserManager();
89 return user_manager && user_manager->IsLoggedInAsKioskApp(); 89 return user_manager && user_manager->IsLoggedInAsKioskApp();
90 #else 90 #else
91 return false; 91 return false;
92 #endif 92 #endif
93 } 93 }
94 94
95 enum DevicePermissionActions { 95 enum DevicePermissionActions {
96 kAllowHttps = 0, 96 kAllowHttps = 0,
97 kAllowHttp, 97 kAllowHttp,
98 kDeny, 98 kDeny,
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 it->second.permission == MEDIA_ALLOWED); 653 it->second.permission == MEDIA_ALLOWED);
654 } 654 }
655 655
656 bool MediaStreamDevicesController::IsDeviceVideoCaptureRequestedAndAllowed() 656 bool MediaStreamDevicesController::IsDeviceVideoCaptureRequestedAndAllowed()
657 const { 657 const {
658 MediaStreamTypeSettingsMap::const_iterator it = 658 MediaStreamTypeSettingsMap::const_iterator it =
659 request_permissions_.find(content::MEDIA_DEVICE_VIDEO_CAPTURE); 659 request_permissions_.find(content::MEDIA_DEVICE_VIDEO_CAPTURE);
660 return (it != request_permissions_.end() && 660 return (it != request_permissions_.end() &&
661 it->second.permission == MEDIA_ALLOWED); 661 it->second.permission == MEDIA_ALLOWED);
662 } 662 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698