Skip to content

Commit

Permalink
log deprecation notices for webframe
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee authored and kevinsawicki committed Dec 12, 2016
1 parent b458201 commit a46040a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions atom/renderer/api/atom_api_web_frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "atom/renderer/api/atom_api_web_frame.h"

#include <iostream>

#include "atom/common/api/event_emitter_caller.h"
#include "atom/common/native_mate_converters/blink_converter.h"
#include "atom/common/native_mate_converters/callback.h"
Expand Down Expand Up @@ -137,6 +139,7 @@ void WebFrame::RegisterURLSchemeAsSecure(const std::string& scheme) {
// Register scheme to secure list (https, wss, data).
blink::WebSecurityPolicy::registerURLSchemeAsSecure(
blink::WebString::fromUTF8(scheme));
std::cout << "webFrame.registerURLSchemeAsSecure is deprecated. Use protocol.registerStandardSchemes with {secure:true}" << std::endl;
}

void WebFrame::RegisterURLSchemeAsBypassingCSP(const std::string& scheme) {
Expand Down Expand Up @@ -167,6 +170,7 @@ void WebFrame::RegisterURLSchemeAsPrivileged(const std::string& scheme,
blink::WebString privileged_scheme(blink::WebString::fromUTF8(scheme));
if (secure) {
// TODO(pfrazee): Remove 2.0
std::cout << "webFrame.registerURLSchemeAsPrivileged with {secure:true} is deprecated. Use protocol.registerStandardSchemes with {secure:true}" << std::endl;
blink::WebSecurityPolicy::registerURLSchemeAsSecure(privileged_scheme);
}
if (bypassCSP) {
Expand Down

0 comments on commit a46040a

Please sign in to comment.