Chromium Code Reviews| Index: base/process/process_metrics_linux.cc |
| diff --git a/base/process/process_metrics_linux.cc b/base/process/process_metrics_linux.cc |
| index 89a26090da720ba41c9b8b2ba2e393580fc0c620..f1bfff6ea93182adb558831a8273c256e9f254c0 100644 |
| --- a/base/process/process_metrics_linux.cc |
| +++ b/base/process/process_metrics_linux.cc |
| @@ -676,12 +676,16 @@ bool ParseProcVmstat(const std::string& vmstat_data, |
| if (tokens.size() != 2) |
| continue; |
| + uint64_t val; |
| + if (!StringToUint64(tokens[1], &val)) |
| + continue; |
| + |
| if (tokens[0] == "pswpin") { |
| - StringToInt(tokens[1], &meminfo->pswpin); |
| + meminfo->pswpin = val; |
|
Lei Zhang
2016/07/28 18:38:05
Can we just make pswpin and friends uint64_t? Aren
|
| } else if (tokens[0] == "pswpout") { |
| - StringToInt(tokens[1], &meminfo->pswpout); |
| + meminfo->pswpout = val; |
| } else if (tokens[0] == "pgmajfault") { |
| - StringToInt(tokens[1], &meminfo->pgmajfault); |
| + meminfo->pgmajfault = val; |
| } |
| } |