Index: chrome/browser/profiles/profile_io_data.cc |
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc |
index e0821fb2ecbf9f42224b98c3d5bb2c0f545dad70..72d30e576e85dd9a08ddcdab12b7193ec3093df2 100644 |
--- a/chrome/browser/profiles/profile_io_data.cc |
+++ b/chrome/browser/profiles/profile_io_data.cc |
@@ -96,6 +96,7 @@ |
#include "net/proxy/proxy_config_service_fixed.h" |
#include "net/proxy/proxy_script_fetcher_impl.h" |
#include "net/proxy/proxy_service.h" |
+#include "net/reporting/reporting_service.h" |
#include "net/ssl/channel_id_service.h" |
#include "net/ssl/client_cert_store.h" |
#include "net/url_request/data_protocol_handler.h" |
@@ -578,7 +579,14 @@ void ProfileIOData::AppRequestContext::SetJobFactory( |
set_job_factory(job_factory_.get()); |
} |
+void ProfileIOData::AppRequestContext::SetReportingService( |
+ std::unique_ptr<net::ReportingService> reporting_service) { |
+ reporting_service_ = std::move(reporting_service); |
+ set_reporting_service(reporting_service_.get()); |
+} |
+ |
ProfileIOData::AppRequestContext::~AppRequestContext() { |
+ SetReportingService(std::unique_ptr<net::ReportingService>()); |
AssertNoURLRequests(); |
} |
@@ -662,6 +670,10 @@ ProfileIOData::~ProfileIOData() { |
if (transport_security_state_) |
transport_security_state_->SetRequireCTDelegate(nullptr); |
+ // And the same for the ReportingService. |
+ main_request_context_storage()->set_reporting_service( |
+ std::unique_ptr<net::ReportingService>()); |
+ |
// TODO(ajwong): These AssertNoURLRequests() calls are unnecessary since they |
// are already done in the URLRequestContext destructor. |
if (main_request_context_) |