Chromium Code Reviews| 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; |