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

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

Issue 643093003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « media/base/pipeline_unittest.cc ('k') | media/filters/pipeline_integration_test_base.cc » ('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 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 clock_ = clock; 444 clock_ = clock;
445 UpdateRates(); 445 UpdateRates();
446 SwitchOn(); 446 SwitchOn();
447 SendPacket(); 447 SendPacket();
448 } 448 }
449 449
450 scoped_ptr<PacketPipe> InterruptedPoissonProcess::NewBuffer(size_t size) { 450 scoped_ptr<PacketPipe> InterruptedPoissonProcess::NewBuffer(size_t size) {
451 scoped_ptr<InternalBuffer> buffer( 451 scoped_ptr<InternalBuffer> buffer(
452 new InternalBuffer(weak_factory_.GetWeakPtr(), size)); 452 new InternalBuffer(weak_factory_.GetWeakPtr(), size));
453 send_buffers_.push_back(buffer->GetWeakPtr()); 453 send_buffers_.push_back(buffer->GetWeakPtr());
454 return buffer.PassAs<PacketPipe>(); 454 return buffer.Pass();
455 } 455 }
456 456
457 base::TimeDelta InterruptedPoissonProcess::NextEvent(double rate) { 457 base::TimeDelta InterruptedPoissonProcess::NextEvent(double rate) {
458 // Rate is per milliseconds. 458 // Rate is per milliseconds.
459 // The time until next event is exponentially distributed to the 459 // The time until next event is exponentially distributed to the
460 // inverse of |rate|. 460 // inverse of |rate|.
461 return base::TimeDelta::FromMillisecondsD( 461 return base::TimeDelta::FromMillisecondsD(
462 fabs(-log(1.0 - RandDouble()) / rate)); 462 fabs(-log(1.0 - RandDouble()) / rate));
463 } 463 }
464 464
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 destination, 830 destination,
831 to_dest_pipe.Pass(), 831 to_dest_pipe.Pass(),
832 from_dest_pipe.Pass(), 832 from_dest_pipe.Pass(),
833 net_log)); 833 net_log));
834 return ret.Pass(); 834 return ret.Pass();
835 } 835 }
836 836
837 } // namespace test 837 } // namespace test
838 } // namespace cast 838 } // namespace cast
839 } // namespace media 839 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/filters/pipeline_integration_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698