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

Unified Diff: chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc

Issue 1131993005: Switch //chrome/browser code to use IsOriginSecure() instead of SchemeIsSecure(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/extensions/api/desktop_capture/desktop_capture_api.cc
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
index d3c8ad4c0f89447488296870c0d90755f1c163b9..34fb4dd876db9328b4468e1684116983f8099afc 100644
--- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
+++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
@@ -21,6 +21,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/origin_util.h"
#include "net/base/net_util.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
@@ -107,12 +108,13 @@ bool DesktopCaptureChooseDesktopMediaFunction::RunAsync() {
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAllowHttpScreenCapture) &&
- !origin_.SchemeIsSecure()) {
+ !IsOriginSecure(origin_)) {
error_ = kTabUrlNotSecure;
return false;
}
- target_name = base::UTF8ToUTF16(origin_.SchemeIsSecure() ?
- net::GetHostAndOptionalPort(origin_) : origin_.spec());
+ target_name = base::UTF8ToUTF16(IsOriginSecure(origin_)
+ ? net::GetHostAndOptionalPort(origin_)
felt 2015/05/09 15:14:27 did git cl format do this? the wrapping looks odd
lgarron 2015/05/12 01:53:08 Yeah, this is the result of `git cl format`. I don
+ : origin_.spec());
if (!params->target_tab->id) {
error_ = kNoTabIdError;

Powered by Google App Engine
This is Rietveld 408576698