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

Unified Diff: chrome/browser/chromeos/power/cpu_data_collector.cc

Issue 1547093002: Switch to standard integer types in chrome/browser/chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: chrome/browser/chromeos/power/cpu_data_collector.cc
diff --git a/chrome/browser/chromeos/power/cpu_data_collector.cc b/chrome/browser/chromeos/power/cpu_data_collector.cc
index 21c65fa4c2b6ab035d72c1facb14657ae10617b6..94fec319564e7a420dcfb979f806dc34616ffd32 100644
--- a/chrome/browser/chromeos/power/cpu_data_collector.cc
+++ b/chrome/browser/chromeos/power/cpu_data_collector.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/power/cpu_data_collector.h"
+#include <stddef.h>
+
#include <vector>
#include "base/bind.h"
@@ -146,7 +148,7 @@ void SampleCpuIdleData(
DCHECK(base::PathExists(base::FilePath(time_file_path)));
std::string state_name, occupancy_time_string;
- int64 occupancy_time_usec;
+ int64_t occupancy_time_usec;
if (!base::ReadFileToString(base::FilePath(name_file_path),
&state_name) ||
!base::ReadFileToString(base::FilePath(time_file_path),
@@ -165,7 +167,7 @@ void SampleCpuIdleData(
&occupancy_time_string);
if (base::StringToInt64(occupancy_time_string, &occupancy_time_usec)) {
// idle state occupancy time in sysfs is recorded in microseconds.
- int64 time_in_state_ms = occupancy_time_usec / 1000;
+ int64_t time_in_state_ms = occupancy_time_usec / 1000;
size_t index = IndexInVector(state_name, cpu_idle_state_names);
if (index >= idle_sample.time_in_state.size())
idle_sample.time_in_state.resize(index + 1);
@@ -184,7 +186,7 @@ void SampleCpuIdleData(
// If there was an interruption in sampling (like system suspended),
// discard the samples!
- int64 delay =
+ int64_t delay =
base::TimeDelta(base::Time::Now() - start_time).InMilliseconds();
if (delay > kSamplingDurationLimitMs) {
idle_samples->clear();
@@ -216,7 +218,7 @@ bool ReadCpuFreqFromOldFile(
state_count -= 1;
for (size_t state = 0; state < state_count; ++state) {
int freq_in_khz;
- int64 occupancy_time_centisecond;
+ int64_t occupancy_time_centisecond;
// Occupancy of each state is in the format "<state> <time>"
std::vector<base::StringPiece> pair = base::SplitStringPiece(
@@ -286,7 +288,7 @@ void SampleCpuFreqData(
// If there was an interruption in sampling (like system suspended),
// discard the samples!
- int64 delay =
+ int64_t delay =
base::TimeDelta(base::Time::Now() - start_time).InMilliseconds();
if (delay > kSamplingDurationLimitMs) {
freq_samples->clear();
« no previous file with comments | « chrome/browser/chromeos/power/cpu_data_collector.h ('k') | chrome/browser/chromeos/power/extension_event_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698