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

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

Issue 1905843003: Split out QuicAlarm creation from QuicConnectionHelper to new QuicAlarmFactory. No behavior change,… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119753783
Patch Set: 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
« no previous file with comments | « net/quic/quic_alarm_factory.h ('k') | net/quic/quic_chromium_alarm_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
7
8 #ifndef NET_QUIC_QUIC_CHROMIUM_ALARM_FACTORY_H_
9 #define NET_QUIC_QUIC_CHROMIUM_ALARM_FACTORY_H_
10
11 #include <set>
12
13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h"
15 #include "net/quic/quic_alarm_factory.h"
16 #include "net/quic/quic_clock.h"
17 #include "net/quic/quic_protocol.h"
18 #include "net/quic/quic_time.h"
19
20 namespace base {
21 class TaskRunner;
22 } // namespace base
23
24 namespace net {
25
26 class NET_EXPORT_PRIVATE QuicChromiumAlarmFactory
27 : public QuicAlarmFactory {
28 public:
29 QuicChromiumAlarmFactory(base::TaskRunner* task_runner,
30 const QuicClock* clock);
31 ~QuicChromiumAlarmFactory() override;
32
33 // QuicAlarmFactory
34 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
35 QuicArenaScopedPtr<QuicAlarm> CreateAlarm(
36 QuicArenaScopedPtr<QuicAlarm::Delegate> delegate,
37 QuicConnectionArena* arena) override;
38
39 private:
40 base::TaskRunner* task_runner_;
41 const QuicClock* clock_;
42 base::WeakPtrFactory<QuicChromiumAlarmFactory> weak_factory_;
43
44 DISALLOW_COPY_AND_ASSIGN(QuicChromiumAlarmFactory);
45 };
46
47 } // namespace net
48
49 #endif // NET_QUIC_QUIC_CHROMIUM_ALARM_FACTORY_H_
OLDNEW
« no previous file with comments | « net/quic/quic_alarm_factory.h ('k') | net/quic/quic_chromium_alarm_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698