| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/process_info_snapshot.h" | 5 #include "chrome/browser/process_info_snapshot.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/thread.h" | 13 #include "base/threading/thread.h" |
| 14 | 14 |
| 15 // Implementation for the Mac; calls '/bin/ps' for information when | 15 // Implementation for the Mac; calls '/bin/ps' for information when |
| 16 // |Sample()| is called. | 16 // |Sample()| is called. |
| 17 | 17 |
| 18 // Default constructor. | 18 // Default constructor. |
| 19 ProcessInfoSnapshot::ProcessInfoSnapshot() { } | 19 ProcessInfoSnapshot::ProcessInfoSnapshot() { } |
| 20 | 20 |
| 21 // Destructor: just call |Reset()| to release everything. | 21 // Destructor: just call |Reset()| to release everything. |
| 22 ProcessInfoSnapshot::~ProcessInfoSnapshot() { | 22 ProcessInfoSnapshot::~ProcessInfoSnapshot() { |
| 23 Reset(); | 23 Reset(); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 ws_usage->shareable = 0; | 161 ws_usage->shareable = 0; |
| 162 ws_usage->shared = 0; | 162 ws_usage->shared = 0; |
| 163 return false; | 163 return false; |
| 164 } | 164 } |
| 165 | 165 |
| 166 ws_usage->priv = 0; | 166 ws_usage->priv = 0; |
| 167 ws_usage->shareable = proc_info.rss; | 167 ws_usage->shareable = proc_info.rss; |
| 168 ws_usage->shared = 0; | 168 ws_usage->shared = 0; |
| 169 return true; | 169 return true; |
| 170 } | 170 } |
| OLD | NEW |