Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7340)

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 2769083005: Reporting: Set up in ProfileImplIOData. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | net/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_)
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698