| Index: net/url_request/url_request_context.h
|
| diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h
|
| index 992f985f0332b441af1c21614e27a5c48974cd4f..a0e15dc9910b21cca573d66181becf9cd51be026 100644
|
| --- a/net/url_request/url_request_context.h
|
| +++ b/net/url_request/url_request_context.h
|
| @@ -20,6 +20,7 @@
|
| #include "net/base/net_export.h"
|
| #include "net/base/net_log.h"
|
| #include "net/base/request_priority.h"
|
| +#include "net/base/sdch_manager.h"
|
| #include "net/http/http_network_session.h"
|
| #include "net/http/http_server_properties.h"
|
| #include "net/http/transport_security_state.h"
|
| @@ -186,10 +187,15 @@ class NET_EXPORT URLRequestContext
|
|
|
| // May be NULL.
|
| SdchManager* sdch_manager() const {
|
| - return sdch_manager_;
|
| + // For investigation of http://crbug.com/454198; remove ?: when resolved.
|
| + CHECK(!have_sdch_manager_ || sdch_manager_.get());
|
| + return have_sdch_manager_ ? sdch_manager_.get() : NULL;
|
| }
|
| void set_sdch_manager(SdchManager* sdch_manager) {
|
| - sdch_manager_ = sdch_manager;
|
| + // For investigation of http://crbug.com/454198; simplify when resolved.
|
| + have_sdch_manager_ = !!sdch_manager;
|
| + if (have_sdch_manager_)
|
| + sdch_manager_ = sdch_manager->GetWeakPtr();
|
| }
|
|
|
| // Gets the URLRequest objects that hold a reference to this
|
| @@ -238,7 +244,9 @@ class NET_EXPORT URLRequestContext
|
| HttpTransactionFactory* http_transaction_factory_;
|
| const URLRequestJobFactory* job_factory_;
|
| URLRequestThrottlerManager* throttler_manager_;
|
| - SdchManager* sdch_manager_;
|
| + // For investigation of http://crbug.com/454198; remove WeakPtr when resolved.
|
| + bool have_sdch_manager_;
|
| + base::WeakPtr<SdchManager> sdch_manager_;
|
|
|
| // ---------------------------------------------------------------------------
|
| // Important: When adding any new members below, consider whether they need to
|
|
|