Commit 75cdb263 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Migrate WebRtcEventLogUploaderImpl to SimpleURLLoader

URLFetcher will stop working with advent of Network Service, and
SimpleURLLoader is the replacement API for most clients.
This CL migrates WebRtcEventLogUploaderImpl et al away from URLFetcher.

Note that this CL slightly changes the flow of the WebRtcEventLogUploader code.
Previously, an URLRequestContextGetter instance was acquired on UI thread,
passed to the IO-capable task runner, used there, and ultimately deleted either
on the UI thread or on the IO-capable task runner thread, depending on the
termination circumstance (eg BrowserProcessImpl shutdown or upload completion,
respectively).

However, URLLoaderFactory and SimpleURLLoader have stricter threading
restrictions than URLFetcher and URLRequestContextGetter. For instance, a
SharedURLLoaderFactory instance needs to be created, used and deleted on
the same thread.
Given this scenario, a natural approach to tackle this migration would be
the use of CrossThreadSharedURLLoaderFactory{Info} classes. However, as
mentioned earlier, the fact that WebRtcEventLogUploader instances are
constructed the aforementioned IO-capable task runner thread and the
deletion thread varies, make the use of CrossThreadSharedURLLoaderFactory{Info}
less straightforward.

This CL makes use of the thread agnostic network::mojom::URLLoaderFactoryPtrInfo
class instead: from the IO-capable task runner it posts a message to the UI thread
to bind a network::mojom::URLLoaderFactory object. As per the mojo documentation [1]:

  "Once the LoggerPtr is bound we can immediately begin calling Logger interface
  methods on it, which will immediately write messages into the pipe. These
  messages will stay queued on the receiving end of the pipe until someone
  binds to it and starts reading them."

[1] https://chromium.googlesource.com/chromium/src/+/master/mojo/public/cpp/bindings/README.md#Binding-an-Interface-Request

BUG=773295,873187

Change-Id: Ic29222ea63e90dcb26f3124bdea1c627570dc04d
Reviewed-on: https://chromium-review.googlesource.com/1171622
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarElad Alon <eladalon@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584048}
parent 514383a2
......@@ -621,39 +621,28 @@ void WebRtcEventLogManager::OnFirstBrowserContextLoaded() {
content::GetNetworkConnectionTracker();
DCHECK(network_connection_tracker);
net::URLRequestContextGetter* url_request_context_getter =
g_browser_process->system_request_context();
DCHECK(url_request_context_getter);
auto log_file_writer_factory = CreateRemoteLogFileWriterFactory();
DCHECK(log_file_writer_factory);
// * |url_request_context_getter| is owned by IOThread. The internal task
// runner that uses it (|task_runner_|) stops before IOThread dies, so we
// can trust that |url_request_context_getter| will not be used after
// destruction.
// * |network_connection_tracker| is owned by BrowserProcessImpl, which
// owns the IOThread, so the logic explaining why using base::Unretained
// was safe for with |url_request_context_getter|, also applies to it.
// |network_connection_tracker| is owned by BrowserProcessImpl, which owns
// the IOThread. The internal task runner on which |this| uses
// |network_connection_tracker|, stops before IOThread dies, so we can trust
// that |network_connection_tracker| will not be used after destruction.
task_runner_->PostTask(
FROM_HERE,
base::BindOnce(
&WebRtcEventLogManager::OnFirstBrowserContextLoadedInternal,
base::Unretained(this), base::Unretained(network_connection_tracker),
base::Unretained(url_request_context_getter),
std::move(log_file_writer_factory)));
}
void WebRtcEventLogManager::OnFirstBrowserContextLoadedInternal(
network::NetworkConnectionTracker* network_connection_tracker,
net::URLRequestContextGetter* url_request_context_getter,
std::unique_ptr<LogFileWriter::Factory> log_file_writer_factory) {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK(network_connection_tracker);
DCHECK(url_request_context_getter);
DCHECK(log_file_writer_factory);
remote_logs_manager_.SetNetworkConnectionTracker(network_connection_tracker);
remote_logs_manager_.SetUrlRequestContextGetter(url_request_context_getter);
remote_logs_manager_.SetLogFileWriterFactory(
std::move(log_file_writer_factory));
}
......
......@@ -207,9 +207,9 @@ class WebRtcEventLogManager final : public content::RenderProcessHostObserver,
void OnPrefChange(content::BrowserContext* browser_context);
// network_connection_tracker() and system_request_context() are not available
// during instantiation; we get them when the first profile is loaded, which
// is also the earliest time when they could be needed.
// network_connection_tracker() is not available during instantiation;
// we get it when the first profile is loaded, which is also the earliest
// time when it could be needed.
// The LogFileWriter::Factory is similarly deferred, but for a different
// reason - it makes it easier to allow unit tests to inject their own.
// OnFirstBrowserContextLoaded() is on the UI thread.
......@@ -217,7 +217,6 @@ class WebRtcEventLogManager final : public content::RenderProcessHostObserver,
void OnFirstBrowserContextLoaded();
void OnFirstBrowserContextLoadedInternal(
network::NetworkConnectionTracker* network_connection_tracker,
net::URLRequestContextGetter* url_request_context_getter,
std::unique_ptr<LogFileWriter::Factory> log_file_writer_factory);
void EnableRemoteBoundLoggingForBrowserContext(
......
......@@ -127,6 +127,8 @@ WebRtcRemoteEventLogManager::WebRtcRemoteEventLogManager(
network_connection_tracker_(nullptr),
uploading_supported_for_connection_type_(false),
scheduled_upload_tasks_(0),
uploader_factory_(
std::make_unique<WebRtcEventLogUploaderImpl::Factory>()),
task_runner_(task_runner),
weak_ptr_factory_(
std::make_unique<base::WeakPtrFactory<WebRtcRemoteEventLogManager>>(
......@@ -192,15 +194,6 @@ void WebRtcRemoteEventLogManager::SetNetworkConnectionTracker(
DCHECK_EQ(enabled_browser_contexts_.size(), 0u);
}
void WebRtcRemoteEventLogManager::SetUrlRequestContextGetter(
net::URLRequestContextGetter* context_getter) {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK(context_getter);
DCHECK(!uploader_factory_);
uploader_factory_ =
std::make_unique<WebRtcEventLogUploaderImpl::Factory>(context_getter);
}
void WebRtcRemoteEventLogManager::SetLogFileWriterFactory(
std::unique_ptr<LogFileWriter::Factory> log_file_writer_factory) {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
......@@ -215,7 +208,6 @@ void WebRtcRemoteEventLogManager::EnableForBrowserContext(
DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK(network_connection_tracker_)
<< "SetNetworkConnectionTracker not called.";
DCHECK(uploader_factory_) << "SetUrlRequestContextGetter() not called.";
DCHECK(log_file_writer_factory_) << "SetLogFileWriterFactory() not called.";
DCHECK(!BrowserContextEnabled(browser_context_id)) << "Already enabled.";
......@@ -464,6 +456,7 @@ void WebRtcRemoteEventLogManager::OnConnectionChanged(
void WebRtcRemoteEventLogManager::SetWebRtcEventLogUploaderFactoryForTesting(
std::unique_ptr<WebRtcEventLogUploader::Factory> uploader_factory) {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK(uploader_factory);
uploader_factory_ = std::move(uploader_factory);
}
......
......@@ -18,10 +18,6 @@
// TODO(crbug.com/775415): Avoid uploading logs when Chrome shutdown imminent.
namespace net {
class URLRequestContextGetter;
} // namespace net
class WebRtcRemoteEventLogManager final
: public network::NetworkConnectionTracker::NetworkConnectionObserver {
using BrowserContextId = WebRtcEventLogPeerConnectionKey::BrowserContextId;
......@@ -42,11 +38,6 @@ class WebRtcRemoteEventLogManager final
void SetNetworkConnectionTracker(
network::NetworkConnectionTracker* network_connection_tracker);
// Sets a net::URLRequestContextGetter which will be used for uploads.
// Must not be called more than once.
// Must be called before any call to EnableForBrowserContext().
void SetUrlRequestContextGetter(net::URLRequestContextGetter* context_getter);
// Sets a LogFileWriter factory.
// Must not be called more than once.
// Must be called before any call to EnableForBrowserContext().
......
......@@ -50,8 +50,9 @@
#include "content/public/browser/network_service_instance.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "net/url_request/url_request_test_util.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_network_connection_tracker.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/zlib/google/compression_utils.h"
......@@ -221,14 +222,15 @@ class MockWebRtcRemoteEventLogsObserver : public WebRtcRemoteEventLogsObserver {
class WebRtcEventLogManagerTestBase : public ::testing::Test {
public:
WebRtcEventLogManagerTestBase()
: url_request_context_getter_(new net::TestURLRequestContextGetter(
base::ThreadTaskRunnerHandle::Get())),
: test_shared_url_loader_factory_(
base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
&test_url_loader_factory_)),
run_loop_(std::make_unique<base::RunLoop>()),
uploader_run_loop_(std::make_unique<base::RunLoop>()),
browser_context_(nullptr),
browser_context_id_(GetBrowserContextId(browser_context_.get())) {
TestingBrowserProcess::GetGlobal()->SetSystemRequestContext(
url_request_context_getter_.get());
TestingBrowserProcess::GetGlobal()->SetSharedURLLoaderFactory(
test_shared_url_loader_factory_);
// Avoid proactive pruning; it has the potential to mess up tests, as well
// as keep pendings tasks around with a dangling reference to the unit
......@@ -697,7 +699,9 @@ class WebRtcEventLogManagerTestBase : public ::testing::Test {
base::test::ScopedFeatureList scoped_feature_list_;
base::test::ScopedCommandLine scoped_command_line_;
base::SimpleTestClock frozen_clock_;
scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_;
network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory>
test_shared_url_loader_factory_;
// The main loop, which allows waiting for the operations invoked on the
// unit-under-test to be completed. Do not use this object directly from the
......
......@@ -10,12 +10,14 @@
#include "base/strings/stringprintf.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "components/version_info/version_info.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/load_flags.h"
#include "net/base/mime_util.h"
#include "net/http/http_status_code.h"
#include "net/url_request/url_request_context_getter.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/simple_url_loader.h"
namespace {
// TODO(crbug.com/817495): Eliminate the duplication with other uploaders.
......@@ -24,6 +26,8 @@ const char kBoundary[] = "----**--yradnuoBgoLtrapitluMklaTelgooG--**----";
constexpr size_t kExpectedMimeOverheadBytes = 1000; // Intentional overshot.
constexpr size_t kMaxResponseSizeBytes = 1024;
// TODO(crbug.com/817495): Eliminate the duplication with other uploaders.
#if defined(OS_WIN)
const char kProduct[] = "Chrome";
......@@ -94,42 +98,18 @@ std::string MimeContentType() {
return content_type;
}
} // namespace
const char WebRtcEventLogUploaderImpl::kUploadURL[] =
"https://clients2.google.com/cr/report";
WebRtcEventLogUploaderImpl::Factory::Factory(
net::URLRequestContextGetter* request_context_getter)
: request_context_getter_(request_context_getter) {}
std::unique_ptr<WebRtcEventLogUploader>
WebRtcEventLogUploaderImpl::Factory::Create(const WebRtcLogFileInfo& log_file,
UploadResultCallback callback) {
return std::make_unique<WebRtcEventLogUploaderImpl>(
request_context_getter_, log_file, std::move(callback),
kMaxRemoteLogFileSizeBytes);
}
std::unique_ptr<WebRtcEventLogUploader>
WebRtcEventLogUploaderImpl::Factory::CreateWithCustomMaxSizeForTesting(
const WebRtcLogFileInfo& log_file,
UploadResultCallback callback,
size_t max_log_file_size_bytes) {
return std::make_unique<WebRtcEventLogUploaderImpl>(
request_context_getter_, log_file, std::move(callback),
max_log_file_size_bytes);
void BindURLLoaderFactoryRequest(
network::mojom::URLLoaderFactoryRequest url_loader_factory_request) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory =
g_browser_process->shared_url_loader_factory();
DCHECK(shared_url_loader_factory);
shared_url_loader_factory->Clone(std::move(url_loader_factory_request));
}
WebRtcEventLogUploaderImpl::Delegate::Delegate(
WebRtcEventLogUploaderImpl* owner)
: owner_(owner) {}
#if DCHECK_IS_ON()
void WebRtcEventLogUploaderImpl::Delegate::OnURLFetchUploadProgress(
const net::URLFetcher* source,
int64_t current,
int64_t total) {
void OnURLLoadUploadProgress(uint64_t current, uint64_t total) {
std::string unit;
if (total <= 1000) {
unit = "bytes";
......@@ -147,19 +127,32 @@ void WebRtcEventLogUploaderImpl::Delegate::OnURLFetchUploadProgress(
}
#endif
void WebRtcEventLogUploaderImpl::Delegate::OnURLFetchComplete(
const net::URLFetcher* source) {
owner_->OnURLFetchComplete(source);
} // namespace
const char WebRtcEventLogUploaderImpl::kUploadURL[] =
"https://clients2.google.com/cr/report";
std::unique_ptr<WebRtcEventLogUploader>
WebRtcEventLogUploaderImpl::Factory::Create(const WebRtcLogFileInfo& log_file,
UploadResultCallback callback) {
return std::make_unique<WebRtcEventLogUploaderImpl>(
log_file, std::move(callback), kMaxRemoteLogFileSizeBytes);
}
std::unique_ptr<WebRtcEventLogUploader>
WebRtcEventLogUploaderImpl::Factory::CreateWithCustomMaxSizeForTesting(
const WebRtcLogFileInfo& log_file,
UploadResultCallback callback,
size_t max_log_file_size_bytes) {
return std::make_unique<WebRtcEventLogUploaderImpl>(
log_file, std::move(callback), max_log_file_size_bytes);
}
WebRtcEventLogUploaderImpl::WebRtcEventLogUploaderImpl(
net::URLRequestContextGetter* request_context_getter,
const WebRtcLogFileInfo& log_file,
UploadResultCallback callback,
size_t max_log_file_size_bytes)
: delegate_(this),
request_context_getter_(request_context_getter),
log_file_(log_file),
: log_file_(log_file),
callback_(std::move(callback)),
max_log_file_size_bytes_(max_log_file_size_bytes),
io_task_runner_(base::SequencedTaskRunnerHandle::Get()) {
......@@ -175,19 +168,19 @@ WebRtcEventLogUploaderImpl::WebRtcEventLogUploaderImpl(
WebRtcEventLogUploaderImpl::~WebRtcEventLogUploaderImpl() {
// WebRtcEventLogUploaderImpl objects' deletion scenarios:
// 1. Upload started and finished - |url_fetcher_| should have been reset
// 1. Upload started and finished - |url_loader_| should have been reset
// so that we would be able to DCHECK and demonstrate that the determinant
// is maintained.
// 2. Upload started and cancelled - behave similarly to a finished upload.
// 3. The upload was never started, due to an early failure (e.g. file not
// found). In that case, |url_fetcher_| will not have been set.
// found). In that case, |url_loader_| will not have been set.
// 4. Chrome shutdown.
if (io_task_runner_->RunsTasksInCurrentSequence()) { // Scenarios 1-3.
DCHECK(!url_fetcher_);
DCHECK(!url_loader_);
} else { // # Scenario #4 - Chrome shutdown.
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
bool will_delete =
io_task_runner_->DeleteSoon(FROM_HERE, url_fetcher_.release());
io_task_runner_->DeleteSoon(FROM_HERE, url_loader_.release());
DCHECK(!will_delete)
<< "Task runners must have been stopped by this stage of shutdown.";
}
......@@ -202,7 +195,7 @@ const WebRtcLogFileInfo& WebRtcEventLogUploaderImpl::GetWebRtcLogFileInfo()
bool WebRtcEventLogUploaderImpl::Cancel() {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
if (!url_fetcher_) {
if (!url_loader_) {
// The upload either already completed, or was never properly started (due
// to a file read failure, etc.).
return false;
......@@ -211,7 +204,7 @@ bool WebRtcEventLogUploaderImpl::Cancel() {
// Note that in this case, it might still be that the last bytes hit the
// wire right as we attempt to cancel the upload. OnURLFetchComplete, however,
// would not be called.
url_fetcher_.reset();
url_loader_.reset();
DeleteLogFile();
return true;
}
......@@ -252,40 +245,57 @@ bool WebRtcEventLogUploaderImpl::PrepareUploadData(std::string* upload_data) {
void WebRtcEventLogUploaderImpl::StartUpload(const std::string& upload_data) {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
url_fetcher_ = net::URLFetcher::Create(
GURL(kUploadURL), net::URLFetcher::POST, &delegate_,
kWebrtcEventLogUploaderTrafficAnnotation);
url_fetcher_->SetRequestContext(request_context_getter_);
url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |
net::LOAD_DO_NOT_SEND_COOKIES);
url_fetcher_->SetUploadData(MimeContentType(), upload_data);
url_fetcher_->Start(); // Delegat::OnURLFetchComplete called when finished.
auto resource_request = std::make_unique<network::ResourceRequest>();
resource_request->url = GURL(kUploadURL);
resource_request->method = "POST";
resource_request->load_flags =
net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_COOKIES;
// Create a new mojo pipe. It's safe to pass this around and use
// immediately, even though it needs to finish initialization on the UI
// thread.
network::mojom::URLLoaderFactoryPtr url_loader_factory_ptr;
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::BindOnce(BindURLLoaderFactoryRequest,
mojo::MakeRequest(&url_loader_factory_ptr)));
url_loader_ = network::SimpleURLLoader::Create(
std::move(resource_request), kWebrtcEventLogUploaderTrafficAnnotation);
url_loader_->AttachStringForUpload(upload_data, MimeContentType());
#if DCHECK_IS_ON()
url_loader_->SetOnUploadProgressCallback(
base::BindRepeating(OnURLLoadUploadProgress));
#endif
// See comment in destructor for an explanation about why using
// base::Unretained(this) is safe here.
url_loader_->DownloadToString(
url_loader_factory_ptr.get(),
base::BindOnce(&WebRtcEventLogUploaderImpl::OnURLLoadComplete,
base::Unretained(this)),
kMaxResponseSizeBytes);
}
void WebRtcEventLogUploaderImpl::OnURLFetchComplete(
const net::URLFetcher* source) {
void WebRtcEventLogUploaderImpl::OnURLLoadComplete(
std::unique_ptr<std::string> response_body) {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
DCHECK(url_fetcher_);
DCHECK_EQ(source, url_fetcher_.get());
const bool upload_successful =
(source->GetStatus().status() == net::URLRequestStatus::SUCCESS &&
source->GetResponseCode() == net::HTTP_OK);
DCHECK(url_loader_);
const bool upload_successful = (response_body != nullptr);
if (upload_successful) {
// TODO(crbug.com/775415): Update chrome://webrtc-logs.
std::string report_id;
if (!url_fetcher_->GetResponseAsString(&report_id)) {
if (response_body->empty()) {
LOG(WARNING) << "WebRTC event log completed, but report ID unknown.";
} else {
// TODO(crbug.com/775415): Remove this when chrome://webrtc-logs updated.
VLOG(1) << "WebRTC event log successfully uploaded: " << report_id;
VLOG(1) << "WebRTC event log successfully uploaded: " << *response_body;
}
} else {
LOG(WARNING) << "WebRTC event log upload failed.";
}
url_fetcher_.reset(); // Explicitly maintain determinant.
url_loader_.reset(); // Explicitly maintain determinant.
ReportResult(upload_successful);
}
......
......@@ -12,12 +12,11 @@
#include "base/memory/scoped_refptr.h"
#include "base/sequenced_task_runner.h"
#include "chrome/browser/media/webrtc/webrtc_event_log_manager_common.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
namespace net {
class URLRequestContextGetter;
} // namespace net
namespace network {
class SimpleURLLoader;
} // namespace network
// 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
......@@ -64,8 +63,6 @@ class WebRtcEventLogUploaderImpl : public WebRtcEventLogUploader {
public:
class Factory : public WebRtcEventLogUploader::Factory {
public:
explicit Factory(net::URLRequestContextGetter* request_context_getter);
~Factory() override = default;
std::unique_ptr<WebRtcEventLogUploader> Create(
......@@ -79,13 +76,9 @@ class WebRtcEventLogUploaderImpl : public WebRtcEventLogUploader {
const WebRtcLogFileInfo& log_file,
UploadResultCallback callback,
size_t max_remote_log_file_size_bytes);
private:
net::URLRequestContextGetter* const request_context_getter_;
};
WebRtcEventLogUploaderImpl(
net::URLRequestContextGetter* request_context_getter,
const WebRtcLogFileInfo& log_file,
UploadResultCallback callback,
size_t max_remote_log_file_size_bytes);
......@@ -107,10 +100,10 @@ class WebRtcEventLogUploaderImpl : public WebRtcEventLogUploader {
// Initiates the file's upload.
void StartUpload(const std::string& upload_data);
// Before this is called, other methods of the URLFetcherDelegate API may be
// called, but this is guaranteed to be the last call, so deleting |this| is
// permissible afterwards.
void OnURLFetchComplete(const net::URLFetcher* source);
// Callback invoked when the file upload has finished.
// If the |url_loader_| instance it was bound to is deleted before
// its invocation, the callback will not be called.
void OnURLLoadComplete(std::unique_ptr<std::string> response_body);
// Cleanup and posting of the result callback.
void ReportResult(bool result);
......@@ -121,31 +114,10 @@ class WebRtcEventLogUploaderImpl : public WebRtcEventLogUploader {
// Allows testing the behavior for excessively large files.
void SetMaxRemoteLogFileSizeBytesForTesting(size_t max_size_bytes);
private:
// The URL used for uploading the logs.
static const char kUploadURL[];
private:
class Delegate : public net::URLFetcherDelegate {
public:
explicit Delegate(WebRtcEventLogUploaderImpl* owner);
~Delegate() override = default;
// net::URLFetcherDelegate implementation.
#if DCHECK_IS_ON()
void OnURLFetchUploadProgress(const net::URLFetcher* source,
int64_t current,
int64_t total) override;
#endif
void OnURLFetchComplete(const net::URLFetcher* source) override;
private:
WebRtcEventLogUploaderImpl* const owner_;
} delegate_;
// Supplier of URLRequestContext objects, which are used by |url_fetcher_|.
// They must outlive |this|.
net::URLRequestContextGetter* const request_context_getter_;
// Housekeeping information about the uploaded file (path, time of last
// modification, associated BrowserContext).
const WebRtcLogFileInfo log_file_;
......@@ -158,7 +130,7 @@ class WebRtcEventLogUploaderImpl : public WebRtcEventLogUploader {
const size_t max_log_file_size_bytes_;
// This object is in charge of the actual upload.
std::unique_ptr<net::URLFetcher> url_fetcher_;
std::unique_ptr<network::SimpleURLLoader> url_loader_;
// The object lives on this IO-capable task runner.
scoped_refptr<base::SequencedTaskRunner> io_task_runner_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment