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

Unified Diff: chrome/browser/media/webrtc/media_permission.cc

Issue 2787283002: Chrome OS: Fix taking user pictures to be used as user POD images. (Closed)
Patch Set: Created 3 years, 9 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 | « chrome/browser/chromeos/login/ui/webui_login_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/webrtc/media_permission.cc
diff --git a/chrome/browser/media/webrtc/media_permission.cc b/chrome/browser/media/webrtc/media_permission.cc
index 13b3dcafa73d0899a8155179a12f26714687fd1e..7c7840c4d08985e5d9d1173c32dc6e78dbd66db3 100644
--- a/chrome/browser/media/webrtc/media_permission.cc
+++ b/chrome/browser/media/webrtc/media_permission.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/permissions/permission_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/url_constants.h"
#include "content/public/browser/permission_manager.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
@@ -69,6 +70,12 @@ ContentSetting MediaPermission::GetPermissionStatus(
return CONTENT_SETTING_BLOCK;
}
+ // When creating new user (including supervised user), we must
+ // be able to use photo for user image.
+ if (requesting_origin_.spec() == chrome::kChromeUIOobeURL) {
+ return CONTENT_SETTING_ALLOW;
+ }
+
const chromeos::CrosSettings* const settings =
chromeos::CrosSettings::Get();
if (!settings) {
« no previous file with comments | « chrome/browser/chromeos/login/ui/webui_login_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698