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

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

Issue 2779463002: Chrome OS: Fix taking user pictures to be used as user POD images. (Closed)
Patch Set: Update after review. 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 b330bdf238c4f0b5c81b29e33bcbdac7793de8e9..c67abc060a7ee9c8e570590173b4dc98444d741f 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