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

Unified Diff: net/url_request/url_request_context.cc

Issue 998803003: Checks to enforce relative lifetimes for SdchManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated comments and fixed else clause. Created 5 years, 9 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 | « net/url_request/url_request_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context.cc
diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc
index aa3ec913f4a4b3030e6ae39038e8eae2c479bc87..5a9cf99c1cc8a98602847d6d05880b9f12de80ca 100644
--- a/net/url_request/url_request_context.cc
+++ b/net/url_request/url_request_context.cc
@@ -31,7 +31,9 @@ URLRequestContext::URLRequestContext()
http_transaction_factory_(NULL),
job_factory_(NULL),
throttler_manager_(NULL),
- sdch_manager_(NULL),
+ // For investigation of http://crbug.com/454198; restore when resolved.
+ // sdch_manager_(NULL),
+ have_sdch_manager_(false),
url_requests_(new std::set<const URLRequest*>) {
}
@@ -57,7 +59,9 @@ void URLRequestContext::CopyFrom(const URLRequestContext* other) {
set_http_transaction_factory(other->http_transaction_factory_);
set_job_factory(other->job_factory_);
set_throttler_manager(other->throttler_manager_);
- set_sdch_manager(other->sdch_manager_);
+ // For investigation of http://crbug.com/454198; remove when resolved.
+ CHECK(!other->have_sdch_manager_ || other->sdch_manager_.get());
+ set_sdch_manager(other->sdch_manager_.get());
set_http_user_agent_settings(other->http_user_agent_settings_);
}
« no previous file with comments | « net/url_request/url_request_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698