// Copyright 2018 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_EVENT_LOG_UPLOADER_H_ #define CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENT_LOG_UPLOADER_H_ #include <memory> #include <string> #include "base/files/file_path.h" #include "base/memory/scoped_refptr.h" #include "base/task/sequenced_task_runner.h" #include "chrome/browser/media/webrtc/webrtc_event_log_history.h" #include "chrome/browser/media/webrtc/webrtc_event_log_manager_common.h" #include "services/network/public/mojom/url_loader_factory.mojom-forward.h" namespace network { class SimpleURLLoader; } // namespace network namespace webrtc_event_logging { // A sublcass of this interface will take ownership of a file, and either // upload it to a remote server (actual implementation), or pretend to do so // (in unit tests). Upon completion, success/failure will be reported by posting // an UploadResultCallback task to the task queue on which this object lives. class WebRtcEventLogUploader { … }; // Primary implementation of WebRtcEventLogUploader. Uploads log files to crash. // Deletes log files whether they were successfully uploaded or not. class WebRtcEventLogUploaderImpl : public WebRtcEventLogUploader { … }; } // namespace webrtc_event_logging #endif // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENT_LOG_UPLOADER_H_