Index: components/cronet/android/cronet_url_request_context_adapter.h |
diff --git a/components/cronet/android/cronet_url_request_context_adapter.h b/components/cronet/android/cronet_url_request_context_adapter.h |
index 5b6cccda8945da28cb11305a6c2b0d3d51950290..6682c0a65390a1761c1b60cad4be992a71dc5405 100644 |
--- a/components/cronet/android/cronet_url_request_context_adapter.h |
+++ b/components/cronet/android/cronet_url_request_context_adapter.h |
@@ -18,15 +18,18 @@ |
#include "base/prefs/json_pref_store.h" |
#include "base/threading/thread.h" |
+class PrefService; |
+ |
namespace base { |
class SingleThreadTaskRunner; |
} // namespace base |
namespace net { |
-class WriteToFileNetLogObserver; |
-class URLRequestContext; |
+class HttpServerPropertiesManager; |
class ProxyConfigService; |
class SdchOwner; |
+class URLRequestContext; |
+class WriteToFileNetLogObserver; |
} // namespace net |
namespace cronet { |
@@ -79,6 +82,7 @@ class CronetURLRequestContextAdapter { |
void InitializeOnNetworkThread(scoped_ptr<URLRequestContextConfig> config, |
const base::android::ScopedJavaGlobalRef< |
jobject>& jcronet_url_request_context); |
+ void DestroyOnNetworkThread(); |
// Runs a task that might depend on the context being initialized. |
// This method should only be run on the network thread. |
@@ -104,13 +108,16 @@ class CronetURLRequestContextAdapter { |
// |write_to_file_observer_| and |context_| should only be accessed on |
// network thread. |
scoped_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_; |
+ // |pref_service_| should outlive |http_server_properties_manager_|. |
+ scoped_ptr<PrefService> pref_service_; |
scoped_ptr<net::URLRequestContext> context_; |
scoped_ptr<net::ProxyConfigService> proxy_config_service_; |
+ scoped_refptr<JsonPrefStore> json_pref_store_; |
+ scoped_ptr<net::HttpServerPropertiesManager> http_server_properties_manager_; |
// |sdch_owner_| should be destroyed before |json_pref_store_|, because |
// tearing down |sdch_owner_| forces |json_pref_store_| to flush pending |
// writes to the disk. |
- scoped_refptr<JsonPrefStore> json_pref_store_; |
scoped_ptr<net::SdchOwner> sdch_owner_; |
// Context config is only valid untng context is initialized. |