OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/quic_connection_helper.h" | 5 #include "net/quic/quic_connection_helper.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/sparse_histogram.h" | 9 #include "base/metrics/sparse_histogram.h" |
10 #include "base/task_runner.h" | 10 #include "base/task_runner.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // previously posted. | 87 // previously posted. |
88 QuicTime task_deadline_; | 88 QuicTime task_deadline_; |
89 base::WeakPtrFactory<QuicChromeAlarm> weak_factory_; | 89 base::WeakPtrFactory<QuicChromeAlarm> weak_factory_; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace | 92 } // namespace |
93 | 93 |
94 QuicConnectionHelper::QuicConnectionHelper(base::TaskRunner* task_runner, | 94 QuicConnectionHelper::QuicConnectionHelper(base::TaskRunner* task_runner, |
95 const QuicClock* clock, | 95 const QuicClock* clock, |
96 QuicRandom* random_generator) | 96 QuicRandom* random_generator) |
97 : weak_factory_(this), | 97 : task_runner_(task_runner), |
98 task_runner_(task_runner), | |
99 clock_(clock), | 98 clock_(clock), |
100 random_generator_(random_generator) { | 99 random_generator_(random_generator), |
| 100 weak_factory_(this) { |
101 } | 101 } |
102 | 102 |
103 QuicConnectionHelper::~QuicConnectionHelper() { | 103 QuicConnectionHelper::~QuicConnectionHelper() { |
104 } | 104 } |
105 | 105 |
106 const QuicClock* QuicConnectionHelper::GetClock() const { | 106 const QuicClock* QuicConnectionHelper::GetClock() const { |
107 return clock_; | 107 return clock_; |
108 } | 108 } |
109 | 109 |
110 QuicRandom* QuicConnectionHelper::GetRandomGenerator() { | 110 QuicRandom* QuicConnectionHelper::GetRandomGenerator() { |
111 return random_generator_; | 111 return random_generator_; |
112 } | 112 } |
113 | 113 |
114 QuicAlarm* QuicConnectionHelper::CreateAlarm(QuicAlarm::Delegate* delegate) { | 114 QuicAlarm* QuicConnectionHelper::CreateAlarm(QuicAlarm::Delegate* delegate) { |
115 return new QuicChromeAlarm(clock_, task_runner_, delegate); | 115 return new QuicChromeAlarm(clock_, task_runner_, delegate); |
116 } | 116 } |
117 | 117 |
118 } // namespace net | 118 } // namespace net |
OLD | NEW |