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

Side by Side Diff: net/quic/quartc/quartc_alarm_factory.h

Issue 2324833004: Define Stable API for WebRTC/Quartc (Closed)
Patch Set: Fix the issues when testing with WebRTC. Created 4 years, 2 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
(Empty)
1 // Copyright (c) 2016 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 #ifndef NET_QUIC_QUARTC_QUARTC_ALARM_FACTORY_H_
6 #define NET_QUIC_QUARTC_QUARTC_ALARM_FACTORY_H_
7
8 #include <utility>
9
10 #include "net/quic/core/quic_alarm_factory.h"
11 #include "net/quic/core/quic_clock.h"
12
13 namespace base {
14 class TaskRunner;
15 } // namespace base
16
17 namespace net {
18
19 // Creates Chromium based QuartcAlarms used throughout QUIC. The alarm posts
pthatcher1 2016/10/14 18:58:59 "Chromium based" => "Chromium-based"
zhihuang1 2016/10/16 00:45:27 Done.
20 // messages to Chromium message queue for tasks such as retransmission.
pthatcher1 2016/10/14 18:58:59 "to Chromium message queue" => "to the Chromium me
zhihuang1 2016/10/16 00:45:27 Done.
21 // Used for the tests inside Chromium.
22 class NET_EXPORT_PRIVATE QuartcAlarmFactory : public QuicAlarmFactory {
23 public:
24 QuartcAlarmFactory(base::TaskRunner* task_runner, const QuicClock* clock);
25 ~QuartcAlarmFactory() override;
26
27 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
28
29 QuicArenaScopedPtr<QuicAlarm> CreateAlarm(
30 QuicArenaScopedPtr<QuicAlarm::Delegate> delegate,
31 QuicConnectionArena* arena) override;
32
33 private:
34 base::TaskRunner* task_runner_ = nullptr;
35 // Not owned by QuartcAlarmFactory. The implementation of
36 // QuicConnectionHelperInterface owns it.
37 const QuicClock* clock_;
pthatcher1 2016/10/14 18:58:59 If the task_runner_ has "= nullptr", shouldn't the
zhihuang1 2016/10/16 00:45:27 I'll remove this since it will be set in the const
38
39 DISALLOW_COPY_AND_ASSIGN(QuartcAlarmFactory);
40 };
41
42 } // namespace net
43
44 #endif // NET_QUIC_QUARTC_QUARTC_ALARM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698