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

Side by Side Diff: net/quic/quic_chromium_connection_helper.h

Issue 1908103002: Landing Recent QUIC changes until 4/15/2016 17:20 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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 Chrome-specific helper for QuicConnection which uses 5 // The Chrome-specific helper for QuicConnection which uses
6 // a TaskRunner for alarms, and uses a DatagramClientSocket for writing data. 6 // a TaskRunner for alarms, and uses a DatagramClientSocket for writing data.
7 7
8 #ifndef NET_QUIC_QUIC_CONNECTION_HELPER_H_ 8 #ifndef NET_QUIC_QUIC_CONNECTION_HELPER_H_
9 #define NET_QUIC_QUIC_CONNECTION_HELPER_H_ 9 #define NET_QUIC_QUIC_CONNECTION_HELPER_H_
10 10
11 #include <set>
12
13 #include "base/macros.h" 11 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h"
15 #include "net/base/ip_endpoint.h" 12 #include "net/base/ip_endpoint.h"
16 #include "net/quic/quic_connection.h" 13 #include "net/quic/quic_connection.h"
17 #include "net/quic/quic_protocol.h" 14 #include "net/quic/quic_protocol.h"
18 #include "net/quic/quic_simple_buffer_allocator.h" 15 #include "net/quic/quic_simple_buffer_allocator.h"
19 #include "net/quic/quic_time.h" 16 #include "net/quic/quic_time.h"
20 #include "net/udp/datagram_client_socket.h" 17 #include "net/udp/datagram_client_socket.h"
21 18
22 namespace base { 19 namespace base {
23 class TaskRunner; 20 class TaskRunner;
24 } // namespace base 21 } // namespace base
25 22
26 namespace net { 23 namespace net {
27 24
28 class QuicClock; 25 class QuicClock;
29 class QuicRandom; 26 class QuicRandom;
30 27
31 class NET_EXPORT_PRIVATE QuicChromiumConnectionHelper 28 class NET_EXPORT_PRIVATE QuicChromiumConnectionHelper
32 : public QuicConnectionHelperInterface { 29 : public QuicConnectionHelperInterface {
33 public: 30 public:
34 QuicChromiumConnectionHelper(base::TaskRunner* task_runner, 31 QuicChromiumConnectionHelper(const QuicClock* clock,
35 const QuicClock* clock,
36 QuicRandom* random_generator); 32 QuicRandom* random_generator);
37 ~QuicChromiumConnectionHelper() override; 33 ~QuicChromiumConnectionHelper() override;
38 34
39 // QuicConnectionHelperInterface 35 // QuicConnectionHelperInterface
40 const QuicClock* GetClock() const override; 36 const QuicClock* GetClock() const override;
41 QuicRandom* GetRandomGenerator() override; 37 QuicRandom* GetRandomGenerator() override;
42 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
43 QuicArenaScopedPtr<QuicAlarm> CreateAlarm(
44 QuicArenaScopedPtr<QuicAlarm::Delegate> delegate,
45 QuicConnectionArena* arena) override;
46 QuicBufferAllocator* GetBufferAllocator() override; 38 QuicBufferAllocator* GetBufferAllocator() override;
47 39
48 private: 40 private:
49 base::TaskRunner* task_runner_;
50 const QuicClock* clock_; 41 const QuicClock* clock_;
51 QuicRandom* random_generator_; 42 QuicRandom* random_generator_;
52 SimpleBufferAllocator buffer_allocator_; 43 SimpleBufferAllocator buffer_allocator_;
53 base::WeakPtrFactory<QuicChromiumConnectionHelper> weak_factory_;
54 44
55 DISALLOW_COPY_AND_ASSIGN(QuicChromiumConnectionHelper); 45 DISALLOW_COPY_AND_ASSIGN(QuicChromiumConnectionHelper);
56 }; 46 };
57 47
58 } // namespace net 48 } // namespace net
59 49
60 #endif // NET_QUIC_QUIC_CONNECTION_HELPER_H_ 50 #endif // NET_QUIC_QUIC_CONNECTION_HELPER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_chromium_client_stream_test.cc ('k') | net/quic/quic_chromium_connection_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698