67 lines
2.5 KiB
Diff
67 lines
2.5 KiB
Diff
|
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||
|
Date: Mon, 12 Feb 2018 21:21:36 +0100
|
||
|
Subject: ungoogled-chromium: Disable webRTC log uploader
|
||
|
|
||
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||
|
Change-Id: Ieb553d3b7c839dee6c5b06c1d3587842b95cba1c
|
||
|
---
|
||
|
.../media/webrtc/webrtc_log_uploader.cc | 36 +++----------------
|
||
|
1 file changed, 5 insertions(+), 31 deletions(-)
|
||
|
|
||
|
diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
|
||
|
--- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
|
||
|
+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
|
||
|
@@ -126,37 +126,6 @@ void WebRtcLogUploader::OnLoggingStopped(
|
||
|
DCHECK(log_buffer.get());
|
||
|
DCHECK(meta_data.get());
|
||
|
DCHECK(!upload_done_data.paths.directory.empty());
|
||
|
-
|
||
|
- std::string compressed_log = CompressLog(log_buffer.get());
|
||
|
-
|
||
|
- std::string local_log_id;
|
||
|
-
|
||
|
- if (base::PathExists(upload_done_data.paths.directory)) {
|
||
|
- webrtc_logging::DeleteOldWebRtcLogFiles(upload_done_data.paths.directory);
|
||
|
-
|
||
|
- local_log_id = base::NumberToString(base::Time::Now().ToDoubleT());
|
||
|
- base::FilePath log_file_path =
|
||
|
- upload_done_data.paths.directory.AppendASCII(local_log_id)
|
||
|
- .AddExtension(FILE_PATH_LITERAL(".gz"));
|
||
|
- WriteCompressedLogToFile(compressed_log, log_file_path);
|
||
|
-
|
||
|
- base::FilePath log_list_path =
|
||
|
- webrtc_logging::TextLogList::GetWebRtcLogListFileForDirectory(
|
||
|
- upload_done_data.paths.directory);
|
||
|
- AddLocallyStoredLogInfoToUploadListFile(log_list_path, local_log_id);
|
||
|
- }
|
||
|
-
|
||
|
- upload_done_data.local_log_id = local_log_id;
|
||
|
-
|
||
|
- if (is_text_log_upload_allowed) {
|
||
|
- PrepareMultipartPostData(compressed_log, std::move(meta_data),
|
||
|
- std::move(upload_done_data));
|
||
|
- } else {
|
||
|
- main_task_runner_->PostTask(
|
||
|
- FROM_HERE,
|
||
|
- base::BindOnce(&WebRtcLogUploader::NotifyUploadDisabled,
|
||
|
- base::Unretained(this), std::move(upload_done_data)));
|
||
|
- }
|
||
|
}
|
||
|
|
||
|
void WebRtcLogUploader::PrepareMultipartPostData(
|
||
|
@@ -167,6 +136,11 @@ void WebRtcLogUploader::PrepareMultipartPostData(
|
||
|
DCHECK(!compressed_log.empty());
|
||
|
DCHECK(meta_data.get());
|
||
|
|
||
|
+ if ((true)) {
|
||
|
+ NotifyUploadDoneAndLogStats(net::HTTP_OK, net::OK, "", std::move(upload_done_data));
|
||
|
+ return;
|
||
|
+ }
|
||
|
+
|
||
|
std::unique_ptr<std::string> post_data(new std::string());
|
||
|
SetupMultipart(post_data.get(), compressed_log,
|
||
|
upload_done_data.paths.incoming_rtp_dump,
|
||
|
--
|
||
|
2.40.1
|
||
|
|