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

Side by Side Diff: base/process_util_mac.mm

Issue 10739: More Mac & Linux fixes for base namespaces. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | « base/process_util_linux.cc ('k') | no next file » | 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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 5
6 #include "base/process_util.h" 6 #include "base/process_util.h"
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <spawn.h> 9 #include <spawn.h>
10 #include <string> 10 #include <string>
11 #include <sys/types.h> 11 #include <sys/types.h>
12 #include <sys/wait.h> 12 #include <sys/wait.h>
13 13
14 namespace process_util { 14 namespace base {
15 15
16 bool LaunchApp(const std::vector<std::string>& argv, 16 bool LaunchApp(const std::vector<std::string>& argv,
17 bool wait, ProcessHandle* process_handle) { 17 bool wait, ProcessHandle* process_handle) {
18 bool retval = true; 18 bool retval = true;
19 19
20 char* argv_copy[argv.size() + 1]; 20 char* argv_copy[argv.size() + 1];
21 for (size_t i = 0; i < argv.size(); i++) { 21 for (size_t i = 0; i < argv.size(); i++) {
22 argv_copy[i] = const_cast<char*>(argv[i].c_str()); 22 argv_copy[i] = const_cast<char*>(argv[i].c_str());
23 } 23 }
24 argv_copy[argv.size()] = NULL; 24 argv_copy[argv.size()] = NULL;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int status; 56 int status;
57 waitpid(handle, &status, 0); 57 waitpid(handle, &status, 0);
58 return WIFEXITED(status); 58 return WIFEXITED(status);
59 } 59 }
60 60
61 bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) { 61 bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) {
62 // TODO(pinkerton): can we implement this? On linux it relies on /proc. 62 // TODO(pinkerton): can we implement this? On linux it relies on /proc.
63 return false; 63 return false;
64 } 64 }
65 65
66 } // namespace process_util 66 } // namespace base
OLDNEW
« no previous file with comments | « base/process_util_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698