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

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

Issue 1099453005: Switch web API/permission code to use IsOriginSecure() instead of SchemeIsSecure(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change WalletServiceUrl::IsSignInContinueUrl to use SchemeIsCryptographic. Created 5 years, 7 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_capture_devices_dispatcher.cc
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc
index 851b456bfdc85dc0aa8a407902dd27285ad1db21..b213056180f87f85e28700cc8d0e9bd73f03e5aa 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.cc
+++ b/chrome/browser/media/media_capture_devices_dispatcher.cc
@@ -40,6 +40,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/media_stream_request.h"
+#include "content/public/common/origin_util.h"
#include "extensions/common/constants.h"
#include "media/audio/audio_manager_base.h"
#include "media/base/media_switches.h"
@@ -167,8 +168,8 @@ base::string16 GetApplicationTitle(content::WebContents* web_contents,
}
#endif
GURL url = web_contents->GetURL();
- title = url.SchemeIsSecure() ? net::GetHostAndOptionalPort(url)
- : url.GetOrigin().spec();
+ title = IsOriginSecure(url) ? net::GetHostAndOptionalPort(url)
+ : url.GetOrigin().spec();
return base::UTF8ToUTF16(title);
}
@@ -595,8 +596,7 @@ void MediaCaptureDevicesDispatcher::ProcessScreenCaptureAccessRequest(
#endif
const bool origin_is_secure =
- request.security_origin.SchemeIsSecure() ||
- request.security_origin.SchemeIs(extensions::kExtensionScheme) ||
+ IsOriginSecure(request.security_origin) ||
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAllowHttpScreenCapture);

Powered by Google App Engine
This is Rietveld 408576698