Update V8 to version 4.6.61.
[chromium-blink-merge.git] / net / quic / quic_connection_helper.h
blob140bf9aac5c04a1f2f207dd18380a000720cc51a
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
3 // found in the LICENSE file.
4 //
5 // The Chrome-specific helper for QuicConnection which uses
6 // a TaskRunner for alarms, and uses a DatagramClientSocket for writing data.
8 #ifndef NET_QUIC_QUIC_CONNECTION_HELPER_H_
9 #define NET_QUIC_QUIC_CONNECTION_HELPER_H_
11 #include "net/quic/quic_connection.h"
13 #include <set>
15 #include "base/basictypes.h"
16 #include "base/memory/weak_ptr.h"
17 #include "net/base/ip_endpoint.h"
18 #include "net/quic/quic_protocol.h"
19 #include "net/quic/quic_time.h"
20 #include "net/udp/datagram_client_socket.h"
22 namespace base {
23 class TaskRunner;
24 } // namespace base
26 namespace net {
28 class QuicClock;
29 class QuicRandom;
31 class NET_EXPORT_PRIVATE QuicConnectionHelper
32 : public QuicConnectionHelperInterface {
33 public:
34 QuicConnectionHelper(base::TaskRunner* task_runner,
35 const QuicClock* clock,
36 QuicRandom* random_generator);
37 ~QuicConnectionHelper() override;
39 // QuicConnectionHelperInterface
40 const QuicClock* GetClock() const override;
41 QuicRandom* GetRandomGenerator() override;
42 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
44 private:
45 base::TaskRunner* task_runner_;
46 const QuicClock* clock_;
47 QuicRandom* random_generator_;
48 base::WeakPtrFactory<QuicConnectionHelper> weak_factory_;
50 DISALLOW_COPY_AND_ASSIGN(QuicConnectionHelper);
53 } // namespace net
55 #endif // NET_QUIC_QUIC_CONNECTION_HELPER_H_