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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 2769083005: Reporting: Set up in ProfileImplIOData. (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | net/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #include "net/cookies/canonical_cookie.h" 89 #include "net/cookies/canonical_cookie.h"
90 #include "net/http/http_network_session.h" 90 #include "net/http/http_network_session.h"
91 #include "net/http/http_transaction_factory.h" 91 #include "net/http/http_transaction_factory.h"
92 #include "net/http/http_util.h" 92 #include "net/http/http_util.h"
93 #include "net/http/transport_security_persister.h" 93 #include "net/http/transport_security_persister.h"
94 #include "net/net_features.h" 94 #include "net/net_features.h"
95 #include "net/nqe/network_quality_estimator.h" 95 #include "net/nqe/network_quality_estimator.h"
96 #include "net/proxy/proxy_config_service_fixed.h" 96 #include "net/proxy/proxy_config_service_fixed.h"
97 #include "net/proxy/proxy_script_fetcher_impl.h" 97 #include "net/proxy/proxy_script_fetcher_impl.h"
98 #include "net/proxy/proxy_service.h" 98 #include "net/proxy/proxy_service.h"
99 #include "net/reporting/reporting_service.h"
99 #include "net/ssl/channel_id_service.h" 100 #include "net/ssl/channel_id_service.h"
100 #include "net/ssl/client_cert_store.h" 101 #include "net/ssl/client_cert_store.h"
101 #include "net/url_request/data_protocol_handler.h" 102 #include "net/url_request/data_protocol_handler.h"
102 #include "net/url_request/file_protocol_handler.h" 103 #include "net/url_request/file_protocol_handler.h"
103 #include "net/url_request/ftp_protocol_handler.h" 104 #include "net/url_request/ftp_protocol_handler.h"
104 #include "net/url_request/report_sender.h" 105 #include "net/url_request/report_sender.h"
105 #include "net/url_request/url_request.h" 106 #include "net/url_request/url_request.h"
106 #include "net/url_request/url_request_context.h" 107 #include "net/url_request/url_request_context.h"
107 #include "net/url_request/url_request_context_builder.h" 108 #include "net/url_request/url_request_context_builder.h"
108 #include "net/url_request/url_request_context_storage.h" 109 #include "net/url_request/url_request_context_storage.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 http_factory_ = std::move(http_factory); 572 http_factory_ = std::move(http_factory);
572 set_http_transaction_factory(http_factory_.get()); 573 set_http_transaction_factory(http_factory_.get());
573 } 574 }
574 575
575 void ProfileIOData::AppRequestContext::SetJobFactory( 576 void ProfileIOData::AppRequestContext::SetJobFactory(
576 std::unique_ptr<net::URLRequestJobFactory> job_factory) { 577 std::unique_ptr<net::URLRequestJobFactory> job_factory) {
577 job_factory_ = std::move(job_factory); 578 job_factory_ = std::move(job_factory);
578 set_job_factory(job_factory_.get()); 579 set_job_factory(job_factory_.get());
579 } 580 }
580 581
582 void ProfileIOData::AppRequestContext::SetReportingService(
583 std::unique_ptr<net::ReportingService> reporting_service) {
584 reporting_service_ = std::move(reporting_service);
585 set_reporting_service(reporting_service_.get());
586 }
587
581 ProfileIOData::AppRequestContext::~AppRequestContext() { 588 ProfileIOData::AppRequestContext::~AppRequestContext() {
589 SetReportingService(std::unique_ptr<net::ReportingService>());
582 AssertNoURLRequests(); 590 AssertNoURLRequests();
583 } 591 }
584 592
585 ProfileIOData::ProfileParams::ProfileParams() 593 ProfileIOData::ProfileParams::ProfileParams()
586 : io_thread(NULL), 594 : io_thread(NULL),
587 #if defined(OS_CHROMEOS) 595 #if defined(OS_CHROMEOS)
588 use_system_key_slot(false), 596 use_system_key_slot(false),
589 #endif 597 #endif
590 profile(NULL) { 598 profile(NULL) {
591 } 599 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 transport_security_state_->SetReportSender(nullptr); 663 transport_security_state_->SetReportSender(nullptr);
656 certificate_report_sender_.reset(); 664 certificate_report_sender_.reset();
657 665
658 if (transport_security_state_) 666 if (transport_security_state_)
659 transport_security_state_->SetExpectCTReporter(nullptr); 667 transport_security_state_->SetExpectCTReporter(nullptr);
660 expect_ct_reporter_.reset(); 668 expect_ct_reporter_.reset();
661 669
662 if (transport_security_state_) 670 if (transport_security_state_)
663 transport_security_state_->SetRequireCTDelegate(nullptr); 671 transport_security_state_->SetRequireCTDelegate(nullptr);
664 672
673 // And the same for the ReportingService.
674 main_request_context_storage()->set_reporting_service(
675 std::unique_ptr<net::ReportingService>());
676
665 // TODO(ajwong): These AssertNoURLRequests() calls are unnecessary since they 677 // TODO(ajwong): These AssertNoURLRequests() calls are unnecessary since they
666 // are already done in the URLRequestContext destructor. 678 // are already done in the URLRequestContext destructor.
667 if (main_request_context_) 679 if (main_request_context_)
668 main_request_context_->AssertNoURLRequests(); 680 main_request_context_->AssertNoURLRequests();
669 if (extensions_request_context_) 681 if (extensions_request_context_)
670 extensions_request_context_->AssertNoURLRequests(); 682 extensions_request_context_->AssertNoURLRequests();
671 683
672 current_context = 0; 684 current_context = 0;
673 for (URLRequestContextMap::iterator it = app_request_context_map_.begin(); 685 for (URLRequestContextMap::iterator it = app_request_context_map_.begin();
674 it != app_request_context_map_.end(); ++it) { 686 it != app_request_context_map_.end(); ++it) {
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 void ProfileIOData::SetCookieSettingsForTesting( 1313 void ProfileIOData::SetCookieSettingsForTesting(
1302 content_settings::CookieSettings* cookie_settings) { 1314 content_settings::CookieSettings* cookie_settings) {
1303 DCHECK(!cookie_settings_.get()); 1315 DCHECK(!cookie_settings_.get());
1304 cookie_settings_ = cookie_settings; 1316 cookie_settings_ = cookie_settings;
1305 } 1317 }
1306 1318
1307 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1319 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1308 const GURL& url) const { 1320 const GURL& url) const {
1309 return url_blacklist_manager_->GetURLBlacklistState(url); 1321 return url_blacklist_manager_->GetURLBlacklistState(url);
1310 } 1322 }
OLDNEW
« 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