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

Unified Diff: net/http/http_cache.h

Issue 138513002: Plumb network stack information about existence of cached copy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comments from Matt & Ricardo. Created 6 years, 11 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: net/http/http_cache.h
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 2b04e8112dbdeda53e7e2cbef8d7a4569bb8e808..95daf191af1a6f989fcb9f5ae971a3bc86bebc12 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -195,6 +195,14 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
virtual HttpCache* GetCache() OVERRIDE;
virtual HttpNetworkSession* GetSession() OVERRIDE;
+ // Resets the network layer to allow for tests that probe
+ // network changes (e.g. host unreachable). The old network layer is
+ // returned to allow for filter patterns that only intercept
+ // some creation requests. Note ownership exchange.
+ scoped_ptr<HttpTransactionFactory>
+ SetHttpNetworkTransactionFactoryForTesting(
+ scoped_ptr<HttpTransactionFactory> new_network_layer);
+
protected:
// Disk cache entry data indices.
enum {
@@ -384,7 +392,8 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
const scoped_ptr<SSLHostInfoFactoryAdaptor> ssl_host_info_factory_;
- const scoped_ptr<HttpTransactionFactory> network_layer_;
+ scoped_ptr<HttpTransactionFactory> network_layer_;
+
scoped_ptr<disk_cache::Backend> disk_cache_;
// The set of active entries indexed by cache key.

Powered by Google App Engine
This is Rietveld 408576698