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_posix.cc

Issue 18722: Revert r8560 due to broken interactive_ui_tests (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 11 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
« no previous file with comments | « base/process_util.h ('k') | base/process_util_win.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 #include "base/process_util.h" 5 #include "base/process_util.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/resource.h> 9 #include <sys/resource.h>
10 #include <sys/time.h> 10 #include <sys/time.h>
(...skipping 12 matching lines...) Expand all
23 namespace base { 23 namespace base {
24 24
25 int GetCurrentProcId() { 25 int GetCurrentProcId() {
26 return getpid(); 26 return getpid();
27 } 27 }
28 28
29 ProcessHandle GetCurrentProcessHandle() { 29 ProcessHandle GetCurrentProcessHandle() {
30 return GetCurrentProcId(); 30 return GetCurrentProcId();
31 } 31 }
32 32
33 bool CloseProcessHandle(ProcessHandle process) {
34 return true;
35 }
36
37 int GetProcId(ProcessHandle process) { 33 int GetProcId(ProcessHandle process) {
38 return process; 34 return process;
39 } 35 }
40 36
41 // Attempts to kill the process identified by the given process 37 // Attempts to kill the process identified by the given process
42 // entry structure. Ignores specified exit_code; posix can't force that. 38 // entry structure. Ignores specified exit_code; posix can't force that.
43 // Returns true if this is successful, false otherwise. 39 // Returns true if this is successful, false otherwise.
44 bool KillProcess(int process_id, int exit_code, bool wait) { 40 bool KillProcess(int process_id, int exit_code, bool wait) {
45 bool result = false; 41 bool result = false;
46 42
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 int cpu = static_cast<int>((system_time_delta * 100 + time_delta / 2) / 235 int cpu = static_cast<int>((system_time_delta * 100 + time_delta / 2) /
240 time_delta); 236 time_delta);
241 237
242 last_system_time_ = system_time; 238 last_system_time_ = system_time;
243 last_time_ = time; 239 last_time_ = time;
244 240
245 return cpu; 241 return cpu;
246 } 242 }
247 243
248 } // namespace base 244 } // namespace base
OLDNEW
« no previous file with comments | « base/process_util.h ('k') | base/process_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698