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

Side by Side Diff: net/tools/quic/quic_epoll_connection_helper.h

Issue 1898793003: Make QuicDispatcher's helper and alarm factory arguments unique_ptrs to make ownership clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119871679
Patch Set: fixing rebase Created 4 years, 8 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 // The Google-specific helper for QuicConnection which uses 5 // The Google-specific helper for QuicConnection which uses
6 // EpollAlarm for alarms, and used an int fd_ for writing data. 6 // EpollAlarm for alarms, and used an int fd_ for writing data.
7 7
8 #ifndef NET_TOOLS_QUIC_QUIC_EPOLL_CONNECTION_HELPER_H_ 8 #ifndef NET_TOOLS_QUIC_QUIC_EPOLL_CONNECTION_HELPER_H_
9 #define NET_TOOLS_QUIC_QUIC_EPOLL_CONNECTION_HELPER_H_ 9 #define NET_TOOLS_QUIC_QUIC_EPOLL_CONNECTION_HELPER_H_
10 10
(...skipping 25 matching lines...) Expand all
36 enum class QuicAllocator { SIMPLE, BUFFER_POOL }; 36 enum class QuicAllocator { SIMPLE, BUFFER_POOL };
37 37
38 class QuicEpollConnectionHelper : public QuicConnectionHelperInterface { 38 class QuicEpollConnectionHelper : public QuicConnectionHelperInterface {
39 public: 39 public:
40 QuicEpollConnectionHelper(EpollServer* eps, QuicAllocator allocator); 40 QuicEpollConnectionHelper(EpollServer* eps, QuicAllocator allocator);
41 ~QuicEpollConnectionHelper() override; 41 ~QuicEpollConnectionHelper() override;
42 42
43 // QuicEpollConnectionHelperInterface 43 // QuicEpollConnectionHelperInterface
44 const QuicClock* GetClock() const override; 44 const QuicClock* GetClock() const override;
45 QuicRandom* GetRandomGenerator() override; 45 QuicRandom* GetRandomGenerator() override;
46 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
47 QuicArenaScopedPtr<QuicAlarm> CreateAlarm(
48 QuicArenaScopedPtr<QuicAlarm::Delegate> delegate,
49 QuicConnectionArena* arena) override;
50
51 QuicBufferAllocator* GetBufferAllocator() override; 46 QuicBufferAllocator* GetBufferAllocator() override;
52 47
53 EpollServer* epoll_server() { return epoll_server_; } 48 EpollServer* epoll_server() { return epoll_server_; }
54 49
55 private: 50 private:
56 friend class QuicConnectionPeer; 51 friend class QuicConnectionPeer;
57 52
58 EpollServer* epoll_server_; // Not owned. 53 EpollServer* epoll_server_; // Not owned.
59
60 const QuicEpollClock clock_; 54 const QuicEpollClock clock_;
61 QuicRandom* random_generator_; 55 QuicRandom* random_generator_;
62 // Set up both allocators. They take up minimal memory before use. 56 // Set up both allocators. They take up minimal memory before use.
63 QuicStreamBufferAllocator buffer_allocator_; 57 QuicStreamBufferAllocator buffer_allocator_;
64 SimpleBufferAllocator simple_buffer_allocator_; 58 SimpleBufferAllocator simple_buffer_allocator_;
65 QuicAllocator allocator_type_; 59 QuicAllocator allocator_type_;
66 60
67 DISALLOW_COPY_AND_ASSIGN(QuicEpollConnectionHelper); 61 DISALLOW_COPY_AND_ASSIGN(QuicEpollConnectionHelper);
68 }; 62 };
69 63
70 } // namespace net 64 } // namespace net
71 65
72 #endif // NET_TOOLS_QUIC_QUIC_EPOLL_CONNECTION_HELPER_H_ 66 #endif // NET_TOOLS_QUIC_QUIC_EPOLL_CONNECTION_HELPER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_epoll_alarm_factory.cc ('k') | net/tools/quic/quic_epoll_connection_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698