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

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: Sync'd to r248769. Created 6 years, 10 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/http/failing_http_transaction_factory.cc ('k') | net/http/http_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.h
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 1b89d46ae490b76ecadbf08569d64d69fa1008a7..4daaf50e584c71db56b85e9ee104fd751bab2fbb 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<QuicServerInfoFactoryAdaptor> quic_server_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.
« no previous file with comments | « net/http/failing_http_transaction_factory.cc ('k') | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698