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

Unified Diff: device/battery/battery_status_manager_linux.cc

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win 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 | « device/battery/battery_status_manager_default.cc ('k') | device/battery/battery_status_manager_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/battery/battery_status_manager_linux.cc
diff --git a/device/battery/battery_status_manager_linux.cc b/device/battery/battery_status_manager_linux.cc
index 0b2da63d0f1c1f769ef0c45288a0a6112525ea94..cf07f78192364ac59f16e559f97884c3e3662f6e 100644
--- a/device/battery/battery_status_manager_linux.cc
+++ b/device/battery/battery_status_manager_linux.cc
@@ -4,6 +4,9 @@
#include "device/battery/battery_status_manager_linux.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/threading/thread.h"
@@ -147,7 +150,7 @@ class BatteryStatusNotificationThread : public base::Thread {
continue;
bool is_present = GetPropertyAsBoolean(*dictionary, "IsPresent", false);
- uint32 type = static_cast<uint32>(
+ uint32_t type = static_cast<uint32_t>(
GetPropertyAsDouble(*dictionary, "Type", UPOWER_DEVICE_TYPE_UNKNOWN));
if (!is_present || type != UPOWER_DEVICE_TYPE_BATTERY) {
@@ -324,7 +327,7 @@ BatteryStatus ComputeWebBatteryStatus(const base::DictionaryValue& dictionary) {
if (!dictionary.HasKey("State"))
return status;
- uint32 state = static_cast<uint32>(
+ uint32_t state = static_cast<uint32_t>(
GetPropertyAsDouble(dictionary, "State", UPOWER_DEVICE_STATE_UNKNOWN));
status.charging = state != UPOWER_DEVICE_STATE_DISCHARGING &&
state != UPOWER_DEVICE_STATE_EMPTY;
« no previous file with comments | « device/battery/battery_status_manager_default.cc ('k') | device/battery/battery_status_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698