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

Side by Side Diff: jingle/glue/pseudotcp_adapter_unittest.cc

Issue 24579003: Clean up remaining unused globals (on mac). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: staticmedia Created 7 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 | Annotate | Revision Log
« no previous file with comments | « gpu/config/gpu_driver_bug_list_unittest.cc ('k') | media/audio/audio_output_device_unittest.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 (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 "jingle/glue/pseudotcp_adapter.h" 5 #include "jingle/glue/pseudotcp_adapter.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 10 matching lines...) Expand all
21 namespace jingle_glue { 21 namespace jingle_glue {
22 namespace { 22 namespace {
23 class FakeSocket; 23 class FakeSocket;
24 } // namespace 24 } // namespace
25 } // namespace jingle_glue 25 } // namespace jingle_glue
26 26
27 namespace jingle_glue { 27 namespace jingle_glue {
28 28
29 namespace { 29 namespace {
30 30
31 // The range is chosen arbitrarily. It must be big enough so that we
32 // always have at least two UDP ports available.
33 const int kMinPort = 32000;
34 const int kMaxPort = 33000;
35
36 const int kMessageSize = 1024; 31 const int kMessageSize = 1024;
37 const int kMessages = 100; 32 const int kMessages = 100;
38 const int kTestDataSize = kMessages * kMessageSize; 33 const int kTestDataSize = kMessages * kMessageSize;
39 34
40 class RateLimiter { 35 class RateLimiter {
41 public: 36 public:
42 virtual ~RateLimiter() { }; 37 virtual ~RateLimiter() { };
43 // Returns true if the new packet needs to be dropped, false otherwise. 38 // Returns true if the new packet needs to be dropped, false otherwise.
44 virtual bool DropNextPacket() = 0; 39 virtual bool DropNextPacket() = 0;
45 }; 40 };
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 client_pseudotcp_.get()); 433 client_pseudotcp_.get());
439 434
440 tester->Start(); 435 tester->Start();
441 message_loop_.Run(); 436 message_loop_.Run();
442 tester->CheckResults(); 437 tester->CheckResults();
443 } 438 }
444 439
445 } // namespace 440 } // namespace
446 441
447 } // namespace jingle_glue 442 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « gpu/config/gpu_driver_bug_list_unittest.cc ('k') | media/audio/audio_output_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698