| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "net/quic/core/quic_alarm.h" | 5 #include "net/quic/core/quic_alarm.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | |
| 8 | |
| 9 namespace net { | 7 namespace net { |
| 10 | 8 |
| 11 QuicAlarm::QuicAlarm(QuicArenaScopedPtr<Delegate> delegate) | 9 QuicAlarm::QuicAlarm(QuicArenaScopedPtr<Delegate> delegate) |
| 12 : delegate_(std::move(delegate)), deadline_(QuicTime::Zero()) {} | 10 : delegate_(std::move(delegate)), deadline_(QuicTime::Zero()) {} |
| 13 | 11 |
| 14 QuicAlarm::~QuicAlarm() {} | 12 QuicAlarm::~QuicAlarm() {} |
| 15 | 13 |
| 16 void QuicAlarm::Set(QuicTime new_deadline) { | 14 void QuicAlarm::Set(QuicTime new_deadline) { |
| 17 DCHECK(!IsSet()); | 15 DCHECK(!IsSet()); |
| 18 DCHECK(new_deadline.IsInitialized()); | 16 DCHECK(new_deadline.IsInitialized()); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const QuicTime new_deadline = deadline_; | 64 const QuicTime new_deadline = deadline_; |
| 67 | 65 |
| 68 deadline_ = QuicTime::Zero(); | 66 deadline_ = QuicTime::Zero(); |
| 69 CancelImpl(); | 67 CancelImpl(); |
| 70 | 68 |
| 71 deadline_ = new_deadline; | 69 deadline_ = new_deadline; |
| 72 SetImpl(); | 70 SetImpl(); |
| 73 } | 71 } |
| 74 | 72 |
| 75 } // namespace net | 73 } // namespace net |
| OLD | NEW |