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

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

Issue 1276373004: Revert of Switch media stream permissions to use IsOriginSecure() instead of SchemeIsSecure(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/desktop_capture_access_handler.cc
diff --git a/chrome/browser/media/desktop_capture_access_handler.cc b/chrome/browser/media/desktop_capture_access_handler.cc
index 25bfa5f511379c0b2c733055146b1f37e7e4477d..86785ae5c840e1adf132052a787db5609628f01a 100644
--- a/chrome/browser/media/desktop_capture_access_handler.cc
+++ b/chrome/browser/media/desktop_capture_access_handler.cc
@@ -22,7 +22,6 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/media_stream_request.h"
-#include "content/public/common/origin_util.h"
#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/common/constants.h"
@@ -78,8 +77,8 @@
return base::UTF8ToUTF16(title);
}
GURL url = web_contents->GetURL();
- title = content::IsOriginSecure(url) ? net::GetHostAndOptionalPort(url)
- : url.GetOrigin().spec();
+ title = url.SchemeIsSecure() ? net::GetHostAndOptionalPort(url)
+ : url.GetOrigin().spec();
return base::UTF8ToUTF16(title);
}
@@ -180,7 +179,8 @@
IsBuiltInExtension(request.security_origin);
const bool origin_is_secure =
- content::IsOriginSecure(request.security_origin) ||
+ request.security_origin.SchemeIsSecure() ||
+ request.security_origin.SchemeIs(extensions::kExtensionScheme) ||
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAllowHttpScreenCapture);

Powered by Google App Engine
This is Rietveld 408576698