Skip to content

Commit

Permalink
Merge pull request #809 from brave/mpilgrim_webrtc_uploader
Browse files Browse the repository at this point in the history
Disable both WebRTC log uploaders
  • Loading branch information
pilgrim-brave authored Nov 7, 2018
2 parents 1182853 + 0c4e905 commit 59244bc
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +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 babc823c9df6..7495718e768a 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
@@ -85,6 +85,7 @@ std::string HashIdWithOrigin(const std::string& security_origin,
content::RenderProcessHost* WebrtcLoggingPrivateFunction::RphFromRequest(
const api::webrtc_logging_private::RequestInfo& request,
const std::string& security_origin) {
+ return nullptr; // 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
index 571da26670db..f0cc7c00e198 100644
--- a/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
+++ b/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
@@ -255,6 +255,7 @@ bool WebRtcEventLogUploaderImpl::PrepareUploadData(std::string* upload_data) {
}

void WebRtcEventLogUploaderImpl::StartUpload(const std::string& upload_data) {
+ return; // feature disabled in Brave
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());

auto resource_request = std::make_unique<network::ResourceRequest>();
12 changes: 12 additions & 0 deletions patches/chrome-browser-media-webrtc-webrtc_log_uploader.cc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
index cd618497a48d..a17f017923b8 100644
--- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
@@ -469,6 +469,7 @@ void WebRtcLogUploader::ResizeForNextOutput(std::string* compressed_log,
void WebRtcLogUploader::UploadCompressedLog(
const WebRtcLogUploadDoneData& upload_done_data,
std::unique_ptr<std::string> post_data) {
+ return; // feature disabled in Brave
DCHECK_CURRENTLY_ON(BrowserThread::IO);

DecreaseLogCount();

0 comments on commit 59244bc

Please sign in to comment.