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

Side by Side Diff: net/tools/flip_server/flip_in_mem_edsm_server.cc

Issue 296513013: Cleanup: Use base::CommandLine in net/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 6 years, 7 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 | « net/tools/dump_cache/dump_cache.cc ('k') | net/tools/gdig/gdig.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <errno.h> 5 #include <errno.h>
6 #include <signal.h> 6 #include <signal.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <sys/file.h> 8 #include <sys/file.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 10
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 int main(int argc, char** argv) { 154 int main(int argc, char** argv) {
155 unsigned int i = 0; 155 unsigned int i = 0;
156 bool wait_for_iface = false; 156 bool wait_for_iface = false;
157 int pidfile_fd; 157 int pidfile_fd;
158 158
159 signal(SIGPIPE, SIG_IGN); 159 signal(SIGPIPE, SIG_IGN);
160 signal(SIGTERM, SignalHandler); 160 signal(SIGTERM, SignalHandler);
161 signal(SIGINT, SignalHandler); 161 signal(SIGINT, SignalHandler);
162 signal(SIGHUP, SignalHandler); 162 signal(SIGHUP, SignalHandler);
163 163
164 CommandLine::Init(argc, argv); 164 base::CommandLine::Init(argc, argv);
165 CommandLine cl(argc, argv); 165 base::CommandLine cl(argc, argv);
166 166
167 if (cl.HasSwitch("help") || argc < 2) { 167 if (cl.HasSwitch("help") || argc < 2) {
168 printf("%s <options>\n", argv[0]); 168 printf("%s <options>\n", argv[0]);
169 printf(" Proxy options:\n"); 169 printf(" Proxy options:\n");
170 printf( 170 printf(
171 "\t--proxy<1..n>=\"<listen ip>,<listen port>," 171 "\t--proxy<1..n>=\"<listen ip>,<listen port>,"
172 "<ssl cert filename>,\n" 172 "<ssl cert filename>,\n"
173 "\t <ssl key filename>,<http server ip>," 173 "\t <ssl key filename>,<http server ip>,"
174 "<http server port>,\n" 174 "<http server port>,\n"
175 "\t [https server ip],[https server port]," 175 "\t [https server ip],[https server port],"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 413 }
414 break; 414 break;
415 } 415 }
416 usleep(1000 * 10); // 10 ms 416 usleep(1000 * 10); // 10 ms
417 } 417 }
418 418
419 unlink(PIDFILE); 419 unlink(PIDFILE);
420 close(pidfile_fd); 420 close(pidfile_fd);
421 return 0; 421 return 0;
422 } 422 }
OLDNEW
« no previous file with comments | « net/tools/dump_cache/dump_cache.cc ('k') | net/tools/gdig/gdig.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698