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

Side by Side Diff: net/quic/quic_connection_helper.cc

Issue 506523002: net : Declaring the weak_ptr_factory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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_connection_helper.h ('k') | net/quic/quic_default_packet_writer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/quic/quic_connection_helper.h ('k') | net/quic/quic_default_packet_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698