OLD | NEW |
---|---|
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_SPDY_SPDY_SESSION_H_ | 5 #ifndef NET_SPDY_SPDY_SESSION_H_ |
6 #define NET_SPDY_SPDY_SESSION_H_ | 6 #define NET_SPDY_SPDY_SESSION_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... | |
40 #include "net/spdy/spdy_framer.h" | 40 #include "net/spdy/spdy_framer.h" |
41 #include "net/spdy/spdy_header_block.h" | 41 #include "net/spdy/spdy_header_block.h" |
42 #include "net/spdy/spdy_protocol.h" | 42 #include "net/spdy/spdy_protocol.h" |
43 #include "net/spdy/spdy_session_pool.h" | 43 #include "net/spdy/spdy_session_pool.h" |
44 #include "net/spdy/spdy_stream.h" | 44 #include "net/spdy/spdy_stream.h" |
45 #include "net/spdy/spdy_write_queue.h" | 45 #include "net/spdy/spdy_write_queue.h" |
46 #include "net/ssl/ssl_config_service.h" | 46 #include "net/ssl/ssl_config_service.h" |
47 #include "url/gurl.h" | 47 #include "url/gurl.h" |
48 #include "url/scheme_host_port.h" | 48 #include "url/scheme_host_port.h" |
49 | 49 |
50 namespace base { | |
51 namespace trace_event { | |
52 class ProcessMemoryDump; | |
53 } | |
54 } | |
55 | |
56 namespace net { | 50 namespace net { |
57 | 51 |
58 namespace test { | 52 namespace test { |
59 class SpdyStreamTest; | 53 class SpdyStreamTest; |
60 } | 54 } |
61 | 55 |
62 // This is somewhat arbitrary and not really fixed, but it will always work | 56 // This is somewhat arbitrary and not really fixed, but it will always work |
63 // reasonably with ethernet. Chop the world into 2-packet chunks. This is | 57 // reasonably with ethernet. Chop the world into 2-packet chunks. This is |
64 // somewhat arbitrary, but is reasonably small and ensures that we elicit | 58 // somewhat arbitrary, but is reasonably small and ensures that we elicit |
65 // ACKs quickly from TCP (because TCP tries to only ACK every other packet). | 59 // ACKs quickly from TCP (because TCP tries to only ACK every other packet). |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
553 // https://http2.github.io/http2-spec/#TLSUsage mandates minimum security | 547 // https://http2.github.io/http2-spec/#TLSUsage mandates minimum security |
554 // standards for TLS. | 548 // standards for TLS. |
555 bool HasAcceptableTransportSecurity() const; | 549 bool HasAcceptableTransportSecurity() const; |
556 | 550 |
557 // Must be used only by |pool_|. | 551 // Must be used only by |pool_|. |
558 base::WeakPtr<SpdySession> GetWeakPtr(); | 552 base::WeakPtr<SpdySession> GetWeakPtr(); |
559 | 553 |
560 // HigherLayeredPool implementation: | 554 // HigherLayeredPool implementation: |
561 bool CloseOneIdleConnection() override; | 555 bool CloseOneIdleConnection() override; |
562 | 556 |
563 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name | 557 // Dumps memory allocation stats to |stats|. Set |*is_session_active| to |
ssid
2017/01/10 23:48:13
Set/Sets. consistent with Dumps
xunjieli
2017/01/11 20:05:07
Done.
| |
564 // used by the parent MemoryAllocatorDump in the memory dump hierarchy. | 558 // indicate whether session is active. |
565 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, | 559 void DumpMemoryStats(StreamSocket::SocketMemoryStats* stats, |
566 const std::string& parent_dump_absolute_name) const; | 560 bool* is_session_active) const; |
567 | 561 |
568 private: | 562 private: |
569 friend class test::SpdyStreamTest; | 563 friend class test::SpdyStreamTest; |
570 friend class base::RefCounted<SpdySession>; | 564 friend class base::RefCounted<SpdySession>; |
571 friend class HttpNetworkTransactionTest; | 565 friend class HttpNetworkTransactionTest; |
572 friend class HttpProxyClientSocketPoolTest; | 566 friend class HttpProxyClientSocketPoolTest; |
573 friend class SpdyHttpStreamTest; | 567 friend class SpdyHttpStreamTest; |
574 friend class SpdyNetworkTransactionTest; | 568 friend class SpdyNetworkTransactionTest; |
575 friend class SpdyProxyClientSocketTest; | 569 friend class SpdyProxyClientSocketTest; |
576 friend class SpdySessionTest; | 570 friend class SpdySessionTest; |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1205 // Used for posting asynchronous IO tasks. We use this even though | 1199 // Used for posting asynchronous IO tasks. We use this even though |
1206 // SpdySession is refcounted because we don't need to keep the SpdySession | 1200 // SpdySession is refcounted because we don't need to keep the SpdySession |
1207 // alive if the last reference is within a RunnableMethod. Just revoke the | 1201 // alive if the last reference is within a RunnableMethod. Just revoke the |
1208 // method. | 1202 // method. |
1209 base::WeakPtrFactory<SpdySession> weak_factory_; | 1203 base::WeakPtrFactory<SpdySession> weak_factory_; |
1210 }; | 1204 }; |
1211 | 1205 |
1212 } // namespace net | 1206 } // namespace net |
1213 | 1207 |
1214 #endif // NET_SPDY_SPDY_SESSION_H_ | 1208 #endif // NET_SPDY_SPDY_SESSION_H_ |
OLD | NEW |