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

Side by Side Diff: net/http/http_network_session_peer.h

Issue 1901533002: Implementation of network level throttler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated latest round of comments." . Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ 5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
6 #define NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ 6 #define NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "net/base/net_export.h" 12 #include "net/base/net_export.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 class ClientSocketPoolManager; 16 class ClientSocketPoolManager;
17 class HttpNetworkSession; 17 class HttpNetworkSession;
18 class HttpStreamFactory; 18 class HttpStreamFactory;
19 class NetworkStreamThrottler;
19 class ProxyService; 20 class ProxyService;
20 21
21 class NET_EXPORT_PRIVATE HttpNetworkSessionPeer { 22 class NET_EXPORT_PRIVATE HttpNetworkSessionPeer {
22 public: 23 public:
23 // |session| should outlive the HttpNetworkSessionPeer. 24 // |session| should outlive the HttpNetworkSessionPeer.
24 explicit HttpNetworkSessionPeer(HttpNetworkSession* session); 25 explicit HttpNetworkSessionPeer(HttpNetworkSession* session);
25 ~HttpNetworkSessionPeer(); 26 ~HttpNetworkSessionPeer();
26 27
27 void SetClientSocketPoolManager( 28 void SetClientSocketPoolManager(
28 std::unique_ptr<ClientSocketPoolManager> socket_pool_manager); 29 std::unique_ptr<ClientSocketPoolManager> socket_pool_manager);
29 30
30 void SetProxyService(ProxyService* proxy_service); 31 void SetProxyService(ProxyService* proxy_service);
31 32
32 void SetHttpStreamFactory( 33 void SetHttpStreamFactory(
33 std::unique_ptr<HttpStreamFactory> http_stream_factory); 34 std::unique_ptr<HttpStreamFactory> http_stream_factory);
34 void SetHttpStreamFactoryForWebSocket( 35 void SetHttpStreamFactoryForWebSocket(
35 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket); 36 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket);
36 37
38 void SetNetworkStreamThrottler(
39 std::unique_ptr<NetworkStreamThrottler> network_stream_throttler);
40
37 private: 41 private:
38 HttpNetworkSession* const session_; 42 HttpNetworkSession* const session_;
39 43
40 DISALLOW_COPY_AND_ASSIGN(HttpNetworkSessionPeer); 44 DISALLOW_COPY_AND_ASSIGN(HttpNetworkSessionPeer);
41 }; 45 };
42 46
43 } // namespace net 47 } // namespace net
44 48
45 #endif // NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ 49 #endif // NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698