// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_LOG_UPLOADER_H_ #define CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_LOG_UPLOADER_H_ #include <stdint.h> #include <list> #include <map> #include <memory> #include <optional> #include <string> #include "base/feature_list.h" #include "base/files/file_path.h" #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "base/sequence_checker.h" #include "base/task/sequenced_task_runner.h" #include "chrome/browser/media/webrtc/webrtc_log_buffer.h" #include "url/gurl.h" namespace network { class SimpleURLLoader; } z_stream; struct WebRtcLogPaths { … }; WebRtcLogMetaDataMap; // Upload failure reasons used for UMA stats. A failure reason can be one of // those listed here or a response code for the upload HTTP request. The // values in this list must be less than 100 and cannot be changed. struct WebRtcLogUploadFailureReason { … }; // Changes the crash product under which text and event logs are uploaded // to have a "_webrtc" suffix, and removes the "-webrtc" suffix from the // crash version field. // eg, when enabled: product: "Chrome_Mac_webrtc", version: "121.0.6151.0" // when disabled: product: "Chrome_Mac", version: "121.0.6151.0-webrtc" BASE_DECLARE_FEATURE(kWebRTCLogUploadSuffix); // Returns the product string to use for crash log uploads. std::string GetLogUploadProduct(); // Returns the version string to use for crash log uploads. std::string GetLogUploadVersion(); // WebRtcLogUploader uploads WebRTC logs, keeps count of how many logs have // been started and denies further logs if a limit is reached. It also adds // the timestamp and report ID of the uploded log to a text file. There must // only be one object of this type. class WebRtcLogUploader { … }; #endif // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_LOG_UPLOADER_H_