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

Side by Side Diff: base/process_util_mac.mm

Issue 126011: Update the comments on why these really can't be done, and remove the notimpl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « no previous file | 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 <crt_externs.h> 9 #include <crt_externs.h>
10 #include <spawn.h> 10 #include <spawn.h>
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 return false; 220 return false;
221 } 221 }
222 222
223 bool NamedProcessIterator::IncludeEntry() { 223 bool NamedProcessIterator::IncludeEntry() {
224 // Don't need to check the name, we did that w/in CheckForNextProcess. 224 // Don't need to check the name, we did that w/in CheckForNextProcess.
225 if (!filter_) 225 if (!filter_)
226 return true; 226 return true;
227 return filter_->Includes(entry_.pid, entry_.ppid); 227 return filter_->Includes(entry_.pid, entry_.ppid);
228 } 228 }
229 229
230
231 // ------------------------------------------------------------------------
232 // NOTE: about ProcessMetrics
233 //
234 // Mac doesn't have /proc, and getting a mach task from a pid for another
235 // process requires permissions, so there doesn't really seem to be a way
236 // to do these (and spinning up ps to fetch each stats seems dangerous to
237 // put in a base api for anyone to call.
238 //
230 bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { 239 bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
231 // TODO(pinkerton): can we implement this? On linux it relies on /proc.
232 NOTIMPLEMENTED();
233 return false; 240 return false;
234 } 241 }
235
236 size_t ProcessMetrics::GetPagefileUsage() const { 242 size_t ProcessMetrics::GetPagefileUsage() const {
237 NOTIMPLEMENTED(); 243 return 0;
244 }
245 size_t ProcessMetrics::GetPeakPagefileUsage() const {
246 return 0;
247 }
248 size_t ProcessMetrics::GetWorkingSetSize() const {
249 return 0;
250 }
251 size_t ProcessMetrics::GetPeakWorkingSetSize() const {
238 return 0; 252 return 0;
239 } 253 }
240 254
241 size_t ProcessMetrics::GetPeakPagefileUsage() const { 255 // ------------------------------------------------------------------------
242 NOTIMPLEMENTED();
243 return 0;
244 }
245
246 size_t ProcessMetrics::GetWorkingSetSize() const {
247 NOTIMPLEMENTED();
248 return 0;
249 }
250
251 size_t ProcessMetrics::GetPeakWorkingSetSize() const {
252 NOTIMPLEMENTED();
253 return 0;
254 }
255 256
256 } // namespace base 257 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698