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

Unified Diff: components/cronet/android/cronet_url_request_context_adapter.h

Issue 2954753002: Add Cronet experimental option for host cache persistence (Closed)
Patch Set: address comments Created 3 years, 6 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
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 0a94920717ca976695f095a235357c15a818b80f..c02bad0d7c6331000f9677f8ecc789ecfd293f36 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.h
+++ b/components/cronet/android/cronet_url_request_context_adapter.h
@@ -42,6 +42,7 @@ class FileNetLogObserver;
} // namespace net
namespace cronet {
+class HostCachePersistenceManager;
class TestUtil;
struct URLRequestContextConfig;
@@ -220,7 +221,7 @@ class CronetURLRequestContextAdapter
std::unique_ptr<net::FileNetLogObserver> net_log_file_observer_;
// |pref_service_| should outlive the HttpServerPropertiesManager owned by
- // |context_|.
+ // |context_| and the HostCachePersistenceManager.
std::unique_ptr<PrefService> pref_service_;
std::unique_ptr<net::URLRequestContext> context_;
std::unique_ptr<net::ProxyConfigService> proxy_config_service_;
@@ -250,6 +251,11 @@ class CronetURLRequestContextAdapter
std::unique_ptr<net::NetworkQualitiesPrefsManager>
network_qualities_prefs_manager_;
+ // Manages reading and writing the HostCache pref when persistence is enabled.
+ // Must be destroyed before |context_| (because it owns the HostResolverImpl,
+ // which owns the HostCache) and |pref_service_|.
+ std::unique_ptr<HostCachePersistenceManager> host_cache_persistence_manager_;
+
// Java object that owns this CronetURLRequestContextAdapter.
base::android::ScopedJavaGlobalRef<jobject> jcronet_url_request_context_;

Powered by Google App Engine
This is Rietveld 408576698