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

Unified Diff: net/http/http_network_layer.h

Issue 1298253002: Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed two comments, fix some tests 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
Index: net/http/http_network_layer.h
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h
index 23b4e1eb2dba45c065fed2f38d9c6f9784c88f60..44b21c61d595e41e5c0f71ba75a7be302f1399de 100644
--- a/net/http/http_network_layer.h
+++ b/net/http/http_network_layer.h
@@ -26,18 +26,11 @@ class NET_EXPORT HttpNetworkLayer
NON_EXPORTED_BASE(public base::NonThreadSafe) {
public:
// Construct a HttpNetworkLayer with an existing HttpNetworkSession which
- // contains a valid ProxyService.
+ // contains a valid ProxyService. The HttpTransactionFactory must be destroyed
pauljensen 2015/09/11 13:05:25 "HttpTransactionFactory" is a bit confusing in thi
mmenke 2015/09/11 14:46:49 Done.
+ // before the HttpNetworkSession.
pauljensen 2015/09/11 13:05:25 maybe replace "the HttpNetworkSession" with "|sess
mmenke 2015/09/11 14:46:49 Done.
explicit HttpNetworkLayer(HttpNetworkSession* session);
~HttpNetworkLayer() override;
- // Create a transaction factory that instantiate a network layer over an
- // existing network session. Network session contains some valuable
- // information (e.g. authentication data) that we want to share across
- // multiple network layers. This method exposes the implementation details
- // of a network layer, use this method with an existing network layer only
- // when network session is shared.
- static HttpTransactionFactory* CreateFactory(HttpNetworkSession* session);
-
// HttpTransactionFactory methods:
int CreateTransaction(RequestPriority priority,
scoped_ptr<HttpTransaction>* trans) override;
@@ -49,7 +42,7 @@ class NET_EXPORT HttpNetworkLayer
void OnResume() override;
private:
- const scoped_refptr<HttpNetworkSession> session_;
+ HttpNetworkSession* const session_;
bool suspended_;
DISALLOW_COPY_AND_ASSIGN(HttpNetworkLayer);

Powered by Google App Engine
This is Rietveld 408576698