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

Side by Side Diff: net/spdy/spdy_session.h

Issue 2565523002: Instrument SpdySessionPool using MemoryDumpProvider (Closed)
Patch Set: Address comments Created 4 years 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/socket/client_socket_handle.cc ('k') | net/spdy/spdy_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_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 28 matching lines...) Expand all
39 #include "net/spdy/spdy_framer.h" 39 #include "net/spdy/spdy_framer.h"
40 #include "net/spdy/spdy_header_block.h" 40 #include "net/spdy/spdy_header_block.h"
41 #include "net/spdy/spdy_protocol.h" 41 #include "net/spdy/spdy_protocol.h"
42 #include "net/spdy/spdy_session_pool.h" 42 #include "net/spdy/spdy_session_pool.h"
43 #include "net/spdy/spdy_stream.h" 43 #include "net/spdy/spdy_stream.h"
44 #include "net/spdy/spdy_write_queue.h" 44 #include "net/spdy/spdy_write_queue.h"
45 #include "net/ssl/ssl_config_service.h" 45 #include "net/ssl/ssl_config_service.h"
46 #include "url/gurl.h" 46 #include "url/gurl.h"
47 #include "url/scheme_host_port.h" 47 #include "url/scheme_host_port.h"
48 48
49 namespace base {
50 namespace trace_event {
51 class ProcessMemoryDump;
52 }
53 }
54
49 namespace net { 55 namespace net {
50 56
51 namespace test { 57 namespace test {
52 class SpdyStreamTest; 58 class SpdyStreamTest;
53 } 59 }
54 60
55 // This is somewhat arbitrary and not really fixed, but it will always work 61 // This is somewhat arbitrary and not really fixed, but it will always work
56 // reasonably with ethernet. Chop the world into 2-packet chunks. This is 62 // reasonably with ethernet. Chop the world into 2-packet chunks. This is
57 // somewhat arbitrary, but is reasonably small and ensures that we elicit 63 // somewhat arbitrary, but is reasonably small and ensures that we elicit
58 // ACKs quickly from TCP (because TCP tries to only ACK every other packet). 64 // ACKs quickly from TCP (because TCP tries to only ACK every other packet).
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 // https://http2.github.io/http2-spec/#TLSUsage mandates minimum security 564 // https://http2.github.io/http2-spec/#TLSUsage mandates minimum security
559 // standards for TLS. 565 // standards for TLS.
560 bool HasAcceptableTransportSecurity() const; 566 bool HasAcceptableTransportSecurity() const;
561 567
562 // Must be used only by |pool_|. 568 // Must be used only by |pool_|.
563 base::WeakPtr<SpdySession> GetWeakPtr(); 569 base::WeakPtr<SpdySession> GetWeakPtr();
564 570
565 // HigherLayeredPool implementation: 571 // HigherLayeredPool implementation:
566 bool CloseOneIdleConnection() override; 572 bool CloseOneIdleConnection() override;
567 573
574 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name
575 // used by the parent MemoryAllocatorDump in the memory dump hierarchy.
576 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd,
577 const std::string& parent_dump_absolute_name) const;
578
568 private: 579 private:
569 friend class test::SpdyStreamTest; 580 friend class test::SpdyStreamTest;
570 friend class base::RefCounted<SpdySession>; 581 friend class base::RefCounted<SpdySession>;
571 friend class HttpNetworkTransactionTest; 582 friend class HttpNetworkTransactionTest;
572 friend class HttpProxyClientSocketPoolTest; 583 friend class HttpProxyClientSocketPoolTest;
573 friend class SpdyHttpStreamTest; 584 friend class SpdyHttpStreamTest;
574 friend class SpdyNetworkTransactionTest; 585 friend class SpdyNetworkTransactionTest;
575 friend class SpdyProxyClientSocketTest; 586 friend class SpdyProxyClientSocketTest;
576 friend class SpdySessionTest; 587 friend class SpdySessionTest;
577 friend class SpdyStreamRequest; 588 friend class SpdyStreamRequest;
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 // Used for posting asynchronous IO tasks. We use this even though 1207 // Used for posting asynchronous IO tasks. We use this even though
1197 // SpdySession is refcounted because we don't need to keep the SpdySession 1208 // SpdySession is refcounted because we don't need to keep the SpdySession
1198 // alive if the last reference is within a RunnableMethod. Just revoke the 1209 // alive if the last reference is within a RunnableMethod. Just revoke the
1199 // method. 1210 // method.
1200 base::WeakPtrFactory<SpdySession> weak_factory_; 1211 base::WeakPtrFactory<SpdySession> weak_factory_;
1201 }; 1212 };
1202 1213
1203 } // namespace net 1214 } // namespace net
1204 1215
1205 #endif // NET_SPDY_SPDY_SESSION_H_ 1216 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « net/socket/client_socket_handle.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698