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

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

Issue 1132203002: Switch media stream permissions to use IsOriginSecure() instead of SchemeIsSecure(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix incorrect test code that I accidentally committed. Created 5 years, 4 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_devices_controller.cc
diff --git a/chrome/browser/media/media_stream_devices_controller.cc b/chrome/browser/media/media_stream_devices_controller.cc
index 6da7f54a920f4cb32056d4278974d1f4be677e7c..f305de8eb56464ad0e20c9ee7a69d9cc98b34eb8 100644
--- a/chrome/browser/media/media_stream_devices_controller.cc
+++ b/chrome/browser/media/media_stream_devices_controller.cc
@@ -24,6 +24,8 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/media_stream_request.h"
+#include "content/public/common/origin_util.h"
+#include "extensions/common/constants.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -154,7 +156,7 @@ GURL MediaStreamDevicesController::GetRequestingHostname() const {
void MediaStreamDevicesController::PermissionGranted() {
GURL origin(GetSecurityOriginSpec());
- if (origin.SchemeIsSecure()) {
+ if (content::IsOriginSecure(origin)) {
UMA_HISTOGRAM_ENUMERATION("Media.DevicePermissionActions",
kAllowHttps, kPermissionActionsMax);
} else {
@@ -334,7 +336,6 @@ void MediaStreamDevicesController::StorePermission(
ContentSetting new_audio_setting,
ContentSetting new_video_setting) const {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
ContentSettingsPattern primary_pattern =
ContentSettingsPattern::FromURLNoWildcard(request_.security_origin);
« no previous file with comments | « chrome/browser/media/media_stream_device_permissions.cc ('k') | chrome/browser/media/media_stream_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698