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

Unified Diff: net/http/http_cache.h

Issue 8526006: Close idle sockets next time we are about to send data. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: code conventions Created 9 years, 1 month 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 df4643371edbf910b2fbb3bd2e814e4e8db06f55..294a0e417e5d0b2f1bf745e075f43931a40c0224 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -77,6 +77,14 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
DISABLE
};
+ // The idle socket cleanup mode of operation.
+ enum IdleSocketCleanupMode {
+ // Cleanup idle sockets using a timer.
+ USE_CLEANUP_TIMER = 0,
+ // Defer cleaning up idle sockets until next request.
+ DEFER_IDLE_CLEANUP
+ };
+
// A BackendFactory creates a backend object to be used by the HttpCache.
class NET_EXPORT BackendFactory {
public:
@@ -131,7 +139,8 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
NetworkDelegate* network_delegate,
HttpServerProperties* http_server_properties,
NetLog* net_log,
- BackendFactory* backend_factory);
+ BackendFactory* backend_factory,
+ IdleSocketCleanupMode cleanup_mode = USE_CLEANUP_TIMER);
willchan no longer on Chromium 2011/11/15 20:35:29 default args are not allowed by the style guide
// The disk cache is initialized lazily (by CreateTransaction) in this case.
// Provide an existing HttpNetworkSession, the cache can construct a

Powered by Google App Engine
This is Rietveld 408576698