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

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

Issue 819203002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « media/cast/test/utility/input_builder.cc ('k') | media/cast/test/utility/udp_proxy_main.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 <fcntl.h> 5 #include <fcntl.h>
6 #include <linux/if_tun.h> 6 #include <linux/if_tun.h>
7 #include <linux/types.h> 7 #include <linux/types.h>
8 #include <math.h> 8 #include <math.h>
9 #include <net/if.h> 9 #include <net/if.h>
10 #include <netinet/in.h> 10 #include <netinet/in.h>
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 259 }
260 260
261 /* this is the special file descriptor that the caller will use to talk 261 /* this is the special file descriptor that the caller will use to talk
262 * with the virtual interface */ 262 * with the virtual interface */
263 return fd; 263 return fd;
264 } 264 }
265 265
266 266
267 int main(int argc, char **argv) { 267 int main(int argc, char **argv) {
268 base::AtExitManager exit_manager; 268 base::AtExitManager exit_manager;
269 CommandLine::Init(argc, argv); 269 base::CommandLine::Init(argc, argv);
270 InitLogging(logging::LoggingSettings()); 270 InitLogging(logging::LoggingSettings());
271 271
272 if (argc < 4) { 272 if (argc < 4) {
273 fprintf(stderr, "Usage: tap_proxy tap1 tap2 type\n"); 273 fprintf(stderr, "Usage: tap_proxy tap1 tap2 type\n");
274 fprintf(stderr, 274 fprintf(stderr,
275 "Where 'type' is one of perfect, good, wifi, bad or evil\n"); 275 "Where 'type' is one of perfect, good, wifi, bad or evil\n");
276 exit(1); 276 exit(1);
277 } 277 }
278 278
279 scoped_ptr<media::cast::test::PacketPipe> in_pipe, out_pipe; 279 scoped_ptr<media::cast::test::PacketPipe> in_pipe, out_pipe;
(...skipping 25 matching lines...) Expand all
305 int fd2 = tun_alloc(argv[2], IFF_TAP); 305 int fd2 = tun_alloc(argv[2], IFF_TAP);
306 306
307 base::MessageLoopForIO message_loop; 307 base::MessageLoopForIO message_loop;
308 last_printout = base::TimeTicks::Now(); 308 last_printout = base::TimeTicks::Now();
309 media::cast::test::QueueManager qm1(fd1, fd2, in_pipe.Pass()); 309 media::cast::test::QueueManager qm1(fd1, fd2, in_pipe.Pass());
310 media::cast::test::QueueManager qm2(fd2, fd1, out_pipe.Pass()); 310 media::cast::test::QueueManager qm2(fd2, fd1, out_pipe.Pass());
311 CheckByteCounters(); 311 CheckByteCounters();
312 printf("Press Ctrl-C when done.\n"); 312 printf("Press Ctrl-C when done.\n");
313 message_loop.Run(); 313 message_loop.Run();
314 } 314 }
OLDNEW
« no previous file with comments | « media/cast/test/utility/input_builder.cc ('k') | media/cast/test/utility/udp_proxy_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698