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

Side by Side Diff: base/command_line.cc

Issue 4812002: Bring up IPC in NaCl.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | « no previous file | base/logging.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/command_line.h" 5 #include "base/command_line.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #elif defined(OS_POSIX) 10 #elif defined(OS_POSIX)
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 #elif defined(OS_POSIX) 217 #elif defined(OS_POSIX)
218 current_process_commandline_->InitFromArgv(argc, argv); 218 current_process_commandline_->InitFromArgv(argc, argv);
219 #endif 219 #endif
220 220
221 #if defined(OS_LINUX) 221 #if defined(OS_LINUX)
222 if (argv) 222 if (argv)
223 setproctitle_init(const_cast<char**>(argv)); 223 setproctitle_init(const_cast<char**>(argv));
224 #endif 224 #endif
225 } 225 }
226 226
227 #if defined(OS_POSIX) && !defined(OS_MACOSX) 227 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_NACL)
228 // static 228 // static
229 void CommandLine::SetProcTitle() { 229 void CommandLine::SetProcTitle() {
230 // Build a single string which consists of all the arguments separated 230 // Build a single string which consists of all the arguments separated
231 // by spaces. We can't actually keep them separate due to the way the 231 // by spaces. We can't actually keep them separate due to the way the
232 // setproctitle() function works. 232 // setproctitle() function works.
233 std::string title; 233 std::string title;
234 bool have_argv0 = false; 234 bool have_argv0 = false;
235 #if defined(OS_LINUX) 235 #if defined(OS_LINUX)
236 // In Linux we sometimes exec ourselves from /proc/self/exe, but this makes us 236 // In Linux we sometimes exec ourselves from /proc/self/exe, but this makes us
237 // show up as "exe" in process listings. Read the symlink /proc/self/exe and 237 // show up as "exe" in process listings. Read the symlink /proc/self/exe and
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 522
523 // private 523 // private
524 CommandLine::CommandLine() { 524 CommandLine::CommandLine() {
525 } 525 }
526 526
527 // static 527 // static
528 CommandLine* CommandLine::ForCurrentProcessMutable() { 528 CommandLine* CommandLine::ForCurrentProcessMutable() {
529 DCHECK(current_process_commandline_); 529 DCHECK(current_process_commandline_);
530 return current_process_commandline_; 530 return current_process_commandline_;
531 } 531 }
OLDNEW
« no previous file with comments | « no previous file | base/logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698