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

Side by Side Diff: media/cast/test/utility/udp_proxy.cc

Issue 780713002: Fix remaining WeakPtrFactory ordering problems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years 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 | « extensions/browser/api/serial/serial_connection.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <math.h> 5 #include <math.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <vector> 7 #include <vector>
8 8
9 #include "media/cast/test/utility/udp_proxy.h" 9 #include "media/cast/test/utility/udp_proxy.h"
10 10
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 weak_factory_.GetWeakPtr()), 276 weak_factory_.GetWeakPtr()),
277 next_send_ - now); 277 next_send_ - now);
278 } 278 }
279 } 279 }
280 280
281 base::TimeTicks block_until_; 281 base::TimeTicks block_until_;
282 std::deque<linked_ptr<Packet> > buffer_; 282 std::deque<linked_ptr<Packet> > buffer_;
283 double random_delay_; 283 double random_delay_;
284 double extra_delay_; 284 double extra_delay_;
285 double seconds_between_extra_delay_; 285 double seconds_between_extra_delay_;
286 base::TimeTicks next_send_;
286 base::WeakPtrFactory<RandomSortedDelay> weak_factory_; 287 base::WeakPtrFactory<RandomSortedDelay> weak_factory_;
287 base::TimeTicks next_send_;
288 }; 288 };
289 289
290 scoped_ptr<PacketPipe> NewRandomSortedDelay( 290 scoped_ptr<PacketPipe> NewRandomSortedDelay(
291 double random_delay, 291 double random_delay,
292 double extra_delay, 292 double extra_delay,
293 double seconds_between_extra_delay) { 293 double seconds_between_extra_delay) {
294 return scoped_ptr<PacketPipe>( 294 return scoped_ptr<PacketPipe>(
295 new RandomSortedDelay( 295 new RandomSortedDelay(
296 random_delay, extra_delay, seconds_between_extra_delay)) 296 random_delay, extra_delay, seconds_between_extra_delay))
297 .Pass(); 297 .Pass();
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 destination, 855 destination,
856 to_dest_pipe.Pass(), 856 to_dest_pipe.Pass(),
857 from_dest_pipe.Pass(), 857 from_dest_pipe.Pass(),
858 net_log)); 858 net_log));
859 return ret.Pass(); 859 return ret.Pass();
860 } 860 }
861 861
862 } // namespace test 862 } // namespace test
863 } // namespace cast 863 } // namespace cast
864 } // namespace media 864 } // namespace media
OLDNEW
« no previous file with comments | « extensions/browser/api/serial/serial_connection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698