| Index: chrome/browser/profiles/profile_impl_io_data.cc
|
| diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
|
| index 87e8b891f3f9c6252b21302b33ba8d8a1b357873..263c8ddd53153abd004d6190d1cd82dc1d05df2e 100644
|
| --- a/chrome/browser/profiles/profile_impl_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc
|
| @@ -67,6 +67,8 @@
|
| #include "net/http/http_cache.h"
|
| #include "net/http/http_network_session.h"
|
| #include "net/http/http_server_properties_manager.h"
|
| +#include "net/reporting/reporting_controls.h"
|
| +#include "net/reporting/reporting_service.h"
|
| #include "net/sdch/sdch_owner.h"
|
| #include "net/ssl/channel_id_service.h"
|
| #include "net/url_request/url_request_context_storage.h"
|
| @@ -431,6 +433,9 @@ ProfileImplIOData::ProfileImplIOData()
|
| }
|
|
|
| ProfileImplIOData::~ProfileImplIOData() {
|
| + if (main_request_context()->reporting_service())
|
| + main_request_context()->reporting_service()->set_uploader(nullptr);
|
| +
|
| DestroyResourceContext();
|
|
|
| if (media_request_context_)
|
| @@ -480,6 +485,15 @@ void ProfileImplIOData::InitializeInternal(
|
| main_context->set_ct_policy_enforcer(
|
| io_thread_globals->ct_policy_enforcer.get());
|
|
|
| + if (net::GetReportingEnabled(switches::kDisableReporting,
|
| + switches::kEnableReporting)) {
|
| + main_context_storage->set_reporting_service(
|
| + base::MakeUnique<net::ReportingService>(
|
| + net::ReportingService::Policy::GetDefault()));
|
| + main_context->reporting_service()->set_uploader(
|
| + net::ReportingUploader::Create(main_context));
|
| + }
|
| +
|
| main_context->set_net_log(io_thread->net_log());
|
|
|
| main_context_storage->set_network_delegate(
|
|
|