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

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

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: rebase on r476634 Created 3 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
« no previous file with comments | « net/http/http_network_layer.cc ('k') | net/http/http_network_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_H_
6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_ 6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <set> 13 #include <set>
14 #include <string> 14 #include <string>
15 #include <unordered_set> 15 #include <unordered_set>
16 #include <vector> 16 #include <vector>
17 17
18 #include "base/bind.h" 18 #include "base/bind.h"
19 #include "base/memory/memory_coordinator_client.h" 19 #include "base/memory/memory_coordinator_client.h"
20 #include "base/memory/memory_pressure_monitor.h" 20 #include "base/memory/memory_pressure_monitor.h"
21 #include "base/memory/ref_counted.h" 21 #include "base/memory/ref_counted.h"
22 #include "base/memory/weak_ptr.h" 22 #include "base/memory/weak_ptr.h"
23 #include "base/threading/non_thread_safe.h" 23 #include "base/threading/thread_checker.h"
24 #include "net/base/host_mapping_rules.h" 24 #include "net/base/host_mapping_rules.h"
25 #include "net/base/host_port_pair.h" 25 #include "net/base/host_port_pair.h"
26 #include "net/base/net_export.h" 26 #include "net/base/net_export.h"
27 #include "net/dns/host_resolver.h" 27 #include "net/dns/host_resolver.h"
28 #include "net/http/http_auth_cache.h" 28 #include "net/http/http_auth_cache.h"
29 #include "net/http/http_stream_factory.h" 29 #include "net/http/http_stream_factory.h"
30 #include "net/quic/chromium/quic_stream_factory.h" 30 #include "net/quic/chromium/quic_stream_factory.h"
31 #include "net/socket/next_proto.h" 31 #include "net/socket/next_proto.h"
32 #include "net/spdy/chromium/spdy_session_pool.h" 32 #include "net/spdy/chromium/spdy_session_pool.h"
33 #include "net/spdy/core/spdy_protocol.h" 33 #include "net/spdy/core/spdy_protocol.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class TransportClientSocketPool; 67 class TransportClientSocketPool;
68 class TransportSecurityState; 68 class TransportSecurityState;
69 69
70 // Specifies the maximum HPACK dynamic table size the server is allowed to set. 70 // Specifies the maximum HPACK dynamic table size the server is allowed to set.
71 const uint32_t kSpdyMaxHeaderTableSize = 64 * 1024; 71 const uint32_t kSpdyMaxHeaderTableSize = 64 * 1024;
72 72
73 // Specifies the maximum concurrent streams server could send (via push). 73 // Specifies the maximum concurrent streams server could send (via push).
74 const uint32_t kSpdyMaxConcurrentPushedStreams = 1000; 74 const uint32_t kSpdyMaxConcurrentPushedStreams = 1000;
75 75
76 // This class holds session objects used by HttpNetworkTransaction objects. 76 // This class holds session objects used by HttpNetworkTransaction objects.
77 class NET_EXPORT HttpNetworkSession 77 class NET_EXPORT HttpNetworkSession : public base::MemoryCoordinatorClient {
78 : NON_EXPORTED_BASE(public base::NonThreadSafe),
79 public base::MemoryCoordinatorClient {
80 public: 78 public:
81 // Self-contained structure with all the simple configuration options 79 // Self-contained structure with all the simple configuration options
82 // supported by the HttpNetworkSession. 80 // supported by the HttpNetworkSession.
83 struct NET_EXPORT Params { 81 struct NET_EXPORT Params {
84 Params(); 82 Params();
85 Params(const Params& other); 83 Params(const Params& other);
86 ~Params(); 84 ~Params();
87 85
88 bool enable_server_push_cancellation; 86 bool enable_server_push_cancellation;
89 HostMappingRules host_mapping_rules; 87 HostMappingRules host_mapping_rules;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 std::map<HttpResponseBodyDrainer*, std::unique_ptr<HttpResponseBodyDrainer>> 329 std::map<HttpResponseBodyDrainer*, std::unique_ptr<HttpResponseBodyDrainer>>
332 response_drainers_; 330 response_drainers_;
333 std::unique_ptr<NetworkThrottleManager> network_stream_throttler_; 331 std::unique_ptr<NetworkThrottleManager> network_stream_throttler_;
334 332
335 NextProtoVector next_protos_; 333 NextProtoVector next_protos_;
336 334
337 Params params_; 335 Params params_;
338 Context context_; 336 Context context_;
339 337
340 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; 338 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
339
340 THREAD_CHECKER(thread_checker_);
341 }; 341 };
342 342
343 } // namespace net 343 } // namespace net
344 344
345 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ 345 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_
OLDNEW
« no previous file with comments | « net/http/http_network_layer.cc ('k') | net/http/http_network_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698