| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |