Chromium Code Reviews| Index: base/process/process_metrics.cc |
| diff --git a/base/process/process_metrics.cc b/base/process/process_metrics.cc |
| index e87a2bba737aab71237b6cdce4d42b3c0ecce263..54766876893e6da569aa6eb2fee8c16bf50bfaf6 100644 |
| --- a/base/process/process_metrics.cc |
| +++ b/base/process/process_metrics.cc |
| @@ -27,4 +27,19 @@ SystemMetrics SystemMetrics::Sample() { |
| return system_metrics; |
| } |
| +scoped_ptr<Value> SystemMetrics::ToValue() const { |
| + scoped_ptr<DictionaryValue> res(new DictionaryValue()); |
| + |
| + res->SetInteger("committed_memory", committed_memory_); |
| +#if defined(OS_LINUX) || defined(OS_ANDROID) |
| + res->Set("meminfo", memory_info_.ToValue().release()); |
|
darin (slow to review)
2013/09/05 07:32:10
I see. DictionaryValue::Set should probably take s
|
| + res->Set("diskinfo", disk_info_.ToValue().release()); |
| +#endif |
| +#if defined(OS_CHROMEOS) |
| + res->Set("swapinfo", swap_info_.ToValue().release()); |
| +#endif |
| + |
| + return res.PassAs<Value>(); |
| +} |
| + |
| } // namespace base |