| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 void QuicAlarm::SetImpl() { | 54 void QuicAlarm::SetImpl() { |
| 55 DCHECK(deadline().IsInitialized()); | 55 DCHECK(deadline().IsInitialized()); |
| 56 CancelImpl(); // Unregister if already posted. | 56 CancelImpl(); // Unregister if already posted. |
| 57 | 57 |
| 58 int64_t delay_ms = GetDelay(); | 58 int64_t delay_ms = GetDelay(); |
| 59 if (delay_ms < 0) { | 59 if (delay_ms < 0) { |
| 60 delay_ms = 0; | 60 delay_ms = 0; |
| 61 } | 61 } |
| 62 thread_->PostDelayed(delay_ms, this); | 62 thread_->PostDelayed(RTC_FROM_HERE, delay_ms, this); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void QuicAlarm::CancelImpl() { | 65 void QuicAlarm::CancelImpl() { |
| 66 thread_->Clear(this); | 66 thread_->Clear(this); |
| 67 } | 67 } |
| 68 | 68 |
| 69 QuicConnectionHelper::QuicConnectionHelper(rtc::Thread* thread) | 69 QuicConnectionHelper::QuicConnectionHelper(rtc::Thread* thread) |
| 70 : thread_(thread) {} | 70 : thread_(thread) {} |
| 71 | 71 |
| 72 QuicConnectionHelper::~QuicConnectionHelper() {} | 72 QuicConnectionHelper::~QuicConnectionHelper() {} |
| 73 | 73 |
| 74 const net::QuicClock* QuicConnectionHelper::GetClock() const { | 74 const net::QuicClock* QuicConnectionHelper::GetClock() const { |
| 75 return &clock_; | 75 return &clock_; |
| 76 } | 76 } |
| 77 | 77 |
| 78 net::QuicRandom* QuicConnectionHelper::GetRandomGenerator() { | 78 net::QuicRandom* QuicConnectionHelper::GetRandomGenerator() { |
| 79 return net::QuicRandom::GetInstance(); | 79 return net::QuicRandom::GetInstance(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 net::QuicBufferAllocator* QuicConnectionHelper::GetBufferAllocator() { | 82 net::QuicBufferAllocator* QuicConnectionHelper::GetBufferAllocator() { |
| 83 return &buffer_allocator_; | 83 return &buffer_allocator_; |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace cricket | 86 } // namespace cricket |
| OLD | NEW |