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

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

Issue 1828803003: Media permissions: Remove plumbing for insecure pepper requests in Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and fix tests Created 4 years, 6 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_device_permissions.cc
diff --git a/chrome/browser/media/media_stream_device_permissions.cc b/chrome/browser/media/media_stream_device_permissions.cc
index 6f01fa4f4d5e83246ba8b81daca1c172a4119e6f..26cc93aacba90b9cfa807ab794071d1947f84d7f 100644
--- a/chrome/browser/media/media_stream_device_permissions.cc
+++ b/chrome/browser/media/media_stream_device_permissions.cc
@@ -16,29 +16,6 @@
#include "extensions/common/constants.h"
#include "url/gurl.h"
-bool ShouldPersistContentSetting(ContentSetting setting,
- const GURL& origin,
- bool is_pepper_request) {
- // When the request is from an invalid scheme we don't persist it.
- if (!ContentSettingsPattern::FromURLNoWildcard(origin).IsValid())
- return false;
-
- // It's safe to persist block settings all the time.
- if (setting == CONTENT_SETTING_BLOCK)
- return true;
-
- // Pepper requests should always be persisted to prevent annoying users of
- // plugins.
- if (is_pepper_request)
- return true;
-
- // We persist requests from secure origins.
- if (content::IsOriginSecure(origin))
- return true;
-
- return false;
-}
-
MediaStreamDevicePolicy GetDevicePolicy(const Profile* profile,
const GURL& security_origin,
const char* policy_name,
« no previous file with comments | « chrome/browser/media/media_stream_device_permissions.h ('k') | chrome/browser/media/media_stream_devices_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698