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

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: Address nhiroki's comment. Created 5 years, 8 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 4bfb4c9b75e67baa6562e8701bfd2f84fdc736ce..005a9f3db832f33ca17b83e400eb06213e1ff4d8 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.cc
+++ b/chrome/browser/media/media_capture_devices_dispatcher.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/origin_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "components/content_settings/core/browser/host_content_settings_map.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);
}
@@ -599,8 +600,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