diff --git a/chromium_src/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc b/chromium_src/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc new file mode 100644 index 000000000000..b06337b1fab2 --- /dev/null +++ b/chromium_src/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc @@ -0,0 +1,12 @@ +/* Copyright (c) 2020 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.h" + +#define BRAVE_DISABLE_RPH_FROM_REQUEST \ + *error = "Unsupported"; return nullptr; + +#include "../../../../../../../chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc" +#undef BRAVE_DISABLE_RPH_FROM_REQUEST diff --git a/patches/chrome-browser-extensions-api-webrtc_logging_private-webrtc_logging_private_api.cc.patch b/patches/chrome-browser-extensions-api-webrtc_logging_private-webrtc_logging_private_api.cc.patch index 9332b7c9fab0..0a90c1bb8623 100644 --- a/patches/chrome-browser-extensions-api-webrtc_logging_private-webrtc_logging_private_api.cc.patch +++ b/patches/chrome-browser-extensions-api-webrtc_logging_private-webrtc_logging_private_api.cc.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc -index 32845ee2e0e9677d7d2194e31f0bb2718c925bd4..18381a3c61b45879397836f23543d1d642a3ee24 100644 +index 32845ee2e0e9677d7d2194e31f0bb2718c925bd4..2146214dced7a1f54feb75b91717d876b7b7b511 100644 --- a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc +++ b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc @@ -89,6 +89,7 @@ content::RenderProcessHost* WebrtcLoggingPrivateFunction::RphFromRequest( const api::webrtc_logging_private::RequestInfo& request, const std::string& security_origin, std::string* error) { -+ return nullptr; // feature disabled in Brave ++ BRAVE_DISABLE_RPH_FROM_REQUEST //feature disabled in Brave // There are 2 ways these API functions can get called. // // 1. From a whitelisted component extension on behalf of a page with the