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

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: 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
« no previous file with comments | « ipc/ipc_message_utils.h ('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 9ac89aabcc61bd4eda01396074e04d7b90b67424..c78cac0557760ac1a03be979aeaec6f1f0ace988 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -195,6 +195,12 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
virtual HttpCache* GetCache() OVERRIDE;
virtual HttpNetworkSession* GetSession() OVERRIDE;
+ // Reset the network layer to allow for browser tests that probe
rvargas (doing something else) 2014/01/15 03:26:29 nit: don't mention browser tests
Randy Smith (Not in Mondays) 2014/01/15 19:14:43 Done.
+ // network changes (e.g. host unreachable). The old network layer is
+ // returned. Note ownership exchange.
+ scoped_ptr<HttpTransactionFactory> SetNetworkLayerForTesting(
rvargas (doing something else) 2014/01/15 03:26:29 I'm wondering what do you envision for the returne
Randy Smith (Not in Mondays) 2014/01/15 19:14:43 So that would work for this instance, and I'm will
rvargas (doing something else) 2014/01/15 19:39:45 ah, ok. That works.
+ scoped_ptr<HttpTransactionFactory> new_network_layer);
+
protected:
// Disk cache entry data indices.
enum {
@@ -381,7 +387,7 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
Mode mode_;
- 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 | « ipc/ipc_message_utils.h ('k') | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698