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

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

Issue 2855693002: Reporting: Don't crash in ~ProfileIOData without URLRequestContextStorage (Closed)
Patch Set: 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 | « no previous file | no next file » | 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 2c31e7109c0f5de51f95ffe06721b42fbd0a4d3e..0de7c80f58a3409b640f046d17f81ac787bbb516 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -671,8 +671,10 @@ ProfileIOData::~ProfileIOData() {
transport_security_state_->SetRequireCTDelegate(nullptr);
// And the same for the ReportingService.
- main_request_context_storage()->set_reporting_service(
- std::unique_ptr<net::ReportingService>());
+ if (main_request_context_storage()) {
+ 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698