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

Unified Diff: base/process/process_metrics.h

Issue 1543293004: Switch to standard integer types in base/process/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ssize_t Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/process_linux.cc ('k') | base/process/process_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_metrics.h
diff --git a/base/process/process_metrics.h b/base/process/process_metrics.h
index eda199010b13f3f4261fd6e007add9631f14e856..8d8f7fc4ea509e849be809c9083edb2efad730e0 100644
--- a/base/process/process_metrics.h
+++ b/base/process/process_metrics.h
@@ -8,14 +8,18 @@
#ifndef BASE_PROCESS_PROCESS_METRICS_H_
#define BASE_PROCESS_PROCESS_METRICS_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/base_export.h"
-#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/process/process_handle.h"
#include "base/time/time.h"
#include "base/values.h"
+#include "build/build_config.h"
#if defined(OS_MACOSX)
#include <mach/mach.h>
@@ -87,7 +91,7 @@ struct CommittedKBytes {
};
// Convert a POSIX timeval to microseconds.
-BASE_EXPORT int64 TimeValToMicroseconds(const struct timeval& tv);
+BASE_EXPORT int64_t TimeValToMicroseconds(const struct timeval& tv);
// Provides performance metrics for a specified process (CPU usage, memory and
// IO counters). Use CreateCurrentProcessMetrics() to get an instance for the
@@ -195,7 +199,7 @@ class BASE_EXPORT ProcessMetrics {
#endif
#if defined(OS_MACOSX) || defined(OS_LINUX)
- int CalculateIdleWakeupsPerSecond(uint64 absolute_idle_wakeups);
+ int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups);
#endif
ProcessHandle process_;
@@ -205,12 +209,12 @@ class BASE_EXPORT ProcessMetrics {
// Used to store the previous times and CPU usage counts so we can
// compute the CPU usage between calls.
TimeTicks last_cpu_time_;
- int64 last_system_time_;
+ int64_t last_system_time_;
#if defined(OS_MACOSX) || defined(OS_LINUX)
// Same thing for idle wakeups.
TimeTicks last_idle_wakeups_time_;
- uint64 last_absolute_idle_wakeups_;
+ uint64_t last_absolute_idle_wakeups_;
#endif
#if !defined(OS_IOS)
@@ -336,17 +340,17 @@ struct BASE_EXPORT SystemDiskInfo {
// Serializes the platform specific fields to value.
scoped_ptr<Value> ToValue() const;
- uint64 reads;
- uint64 reads_merged;
- uint64 sectors_read;
- uint64 read_time;
- uint64 writes;
- uint64 writes_merged;
- uint64 sectors_written;
- uint64 write_time;
- uint64 io;
- uint64 io_time;
- uint64 weighted_io_time;
+ uint64_t reads;
+ uint64_t reads_merged;
+ uint64_t sectors_read;
+ uint64_t read_time;
+ uint64_t writes;
+ uint64_t writes_merged;
+ uint64_t sectors_written;
+ uint64_t write_time;
+ uint64_t io;
+ uint64_t io_time;
+ uint64_t weighted_io_time;
};
// Checks whether the candidate string is a valid disk name, [hsv]d[a-z]+
@@ -373,11 +377,11 @@ struct BASE_EXPORT SwapInfo {
// Serializes the platform specific fields to value.
scoped_ptr<Value> ToValue() const;
- uint64 num_reads;
- uint64 num_writes;
- uint64 compr_data_size;
- uint64 orig_data_size;
- uint64 mem_used_total;
+ uint64_t num_reads;
+ uint64_t num_writes;
+ uint64_t compr_data_size;
+ uint64_t orig_data_size;
+ uint64_t mem_used_total;
};
// In ChromeOS, reads files from /sys/block/zram0 that contain ZRAM usage data.
« no previous file with comments | « base/process/process_linux.cc ('k') | base/process/process_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698