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

Unified Diff: net/http/http_cache.cc

Issue 1342613002: Revert of Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/http_cache.h ('k') | net/http/http_network_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.cc
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 23065258dce0c452d7ce7dfa6157d503c5c0c718..796aeea501414bdacb9efa9aecd625a6702a85aa 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -294,20 +294,39 @@
};
//-----------------------------------------------------------------------------
+HttpCache::HttpCache(const HttpNetworkSession::Params& params,
+ BackendFactory* backend_factory)
+ : net_log_(params.net_log),
+ backend_factory_(backend_factory),
+ building_backend_(false),
+ bypass_lock_for_test_(false),
+ fail_conditionalization_for_test_(false),
+ mode_(NORMAL),
+ network_layer_(new HttpNetworkLayer(new HttpNetworkSession(params))),
+ clock_(new base::DefaultClock()),
+ weak_factory_(this) {
+ SetupQuicServerInfoFactory(network_layer_->GetSession());
+}
+
+
// This call doesn't change the shared |session|'s QuicServerInfoFactory because
// |session| is shared.
HttpCache::HttpCache(HttpNetworkSession* session,
- BackendFactory* backend_factory,
- bool set_up_quic_server_info)
- : HttpCache(new HttpNetworkLayer(session),
- session->net_log(),
- backend_factory,
- set_up_quic_server_info) {}
+ BackendFactory* backend_factory)
+ : net_log_(session->net_log()),
+ backend_factory_(backend_factory),
+ building_backend_(false),
+ bypass_lock_for_test_(false),
+ fail_conditionalization_for_test_(false),
+ mode_(NORMAL),
+ network_layer_(new HttpNetworkLayer(session)),
+ clock_(new base::DefaultClock()),
+ weak_factory_(this) {
+}
HttpCache::HttpCache(HttpTransactionFactory* network_layer,
NetLog* net_log,
- BackendFactory* backend_factory,
- bool set_up_quic_server_info)
+ BackendFactory* backend_factory)
: net_log_(net_log),
backend_factory_(backend_factory),
building_backend_(false),
@@ -317,8 +336,7 @@
network_layer_(network_layer),
clock_(new base::DefaultClock()),
weak_factory_(this) {
- if (set_up_quic_server_info)
- SetupQuicServerInfoFactory(network_layer_->GetSession());
+ SetupQuicServerInfoFactory(network_layer_->GetSession());
}
HttpCache::~HttpCache() {
« no previous file with comments | « net/http/http_cache.h ('k') | net/http/http_network_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698