summaryrefslogtreecommitdiffstats
path: root/device/nfc
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2015-12-22 11:26:52 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-22 19:28:03 +0000
commit176e2693216e9b05a2affea94fe72014c671d65f (patch)
treec4432cf70f12eccc3e20b5a0522ce51542c407d2 /device/nfc
parent5ba79938c50a93597768e9261ec7293618e759da (diff)
downloadchromium_src-176e2693216e9b05a2affea94fe72014c671d65f.zip
chromium_src-176e2693216e9b05a2affea94fe72014c671d65f.tar.gz
chromium_src-176e2693216e9b05a2affea94fe72014c671d65f.tar.bz2
Switch to standard integer types in device/.
BUG=138542 TBR=reillyg@chromium.org Review URL: https://codereview.chromium.org/1542163002 Cr-Commit-Position: refs/heads/master@{#366628}
Diffstat (limited to 'device/nfc')
-rw-r--r--device/nfc/nfc_adapter.h1
-rw-r--r--device/nfc/nfc_adapter_chromeos.h1
-rw-r--r--device/nfc/nfc_adapter_factory.cc1
-rw-r--r--device/nfc/nfc_chromeos_unittest.cc5
-rw-r--r--device/nfc/nfc_ndef_record.cc7
-rw-r--r--device/nfc/nfc_ndef_record.h1
-rw-r--r--device/nfc/nfc_ndef_record_unittest.cc9
-rw-r--r--device/nfc/nfc_peer.h1
-rw-r--r--device/nfc/nfc_peer_chromeos.h1
-rw-r--r--device/nfc/nfc_tag.h1
-rw-r--r--device/nfc/nfc_tag_chromeos.h1
-rw-r--r--device/nfc/nfc_tag_technology.h5
-rw-r--r--device/nfc/nfc_tag_technology_chromeos.h1
13 files changed, 28 insertions, 7 deletions
diff --git a/device/nfc/nfc_adapter.h b/device/nfc/nfc_adapter.h
index 455b142..d7ae094 100644
--- a/device/nfc/nfc_adapter.h
+++ b/device/nfc/nfc_adapter.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
namespace device {
diff --git a/device/nfc/nfc_adapter_chromeos.h b/device/nfc/nfc_adapter_chromeos.h
index 1a8c248..a35b76d 100644
--- a/device/nfc/nfc_adapter_chromeos.h
+++ b/device/nfc/nfc_adapter_chromeos.h
@@ -5,6 +5,7 @@
#ifndef DEVICE_NFC_NFC_ADAPTER_CHROMEOS_H_
#define DEVICE_NFC_NFC_ADAPTER_CHROMEOS_H_
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "chromeos/dbus/nfc_adapter_client.h"
diff --git a/device/nfc/nfc_adapter_factory.cc b/device/nfc/nfc_adapter_factory.cc
index 1ba533a..785925e 100644
--- a/device/nfc/nfc_adapter_factory.cc
+++ b/device/nfc/nfc_adapter_factory.cc
@@ -7,6 +7,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
#if defined(OS_CHROMEOS)
#include "device/nfc/nfc_adapter_chromeos.h"
diff --git a/device/nfc/nfc_chromeos_unittest.cc b/device/nfc/nfc_chromeos_unittest.cc
index 0cf3ad9..9002f1b 100644
--- a/device/nfc/nfc_chromeos_unittest.cc
+++ b/device/nfc/nfc_chromeos_unittest.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -756,7 +759,7 @@ TEST_F(NfcChromeOSTest, RecordPropertiesToNfcNdefRecord) {
const char kEncoding[] = "encoding";
const char kLanguageCode[] = "en";
const char kMimeType[] = "mime-type";
- const uint32 kSize = 5;
+ const uint32_t kSize = 5;
FakeNfcRecordClient::Properties record_properties(
base::Bind(&OnPropertyChangedCallback));
diff --git a/device/nfc/nfc_ndef_record.cc b/device/nfc/nfc_ndef_record.cc
index 5b8bb99..0914cea 100644
--- a/device/nfc/nfc_ndef_record.cc
+++ b/device/nfc/nfc_ndef_record.cc
@@ -4,6 +4,9 @@
#include "device/nfc/nfc_ndef_record.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include "base/logging.h"
@@ -117,8 +120,8 @@ bool HandleTypeSmartPoster(const DictionaryValue* data) {
optional_fields[NfcNdefRecord::kFieldAction] = base::Value::TYPE_STRING;
optional_fields[NfcNdefRecord::kFieldMimeType] = base::Value::TYPE_STRING;
// base::Value restricts the number types to BOOL, INTEGER, and DOUBLE only.
- // uint32 will automatically get converted to a double. "target size" is
- // really a uint32 but we define it as a double for this reason.
+ // uint32_t will automatically get converted to a double. "target size" is
+ // really a uint32_t but we define it as a double for this reason.
// (See dbus/values_util.h).
optional_fields[NfcNdefRecord::kFieldTargetSize] = base::Value::TYPE_DOUBLE;
optional_fields[NfcNdefRecord::kFieldTitles] = base::Value::TYPE_LIST;
diff --git a/device/nfc/nfc_ndef_record.h b/device/nfc/nfc_ndef_record.h
index 24cbc12..05c019c 100644
--- a/device/nfc/nfc_ndef_record.h
+++ b/device/nfc/nfc_ndef_record.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/macros.h"
#include "base/values.h"
namespace device {
diff --git a/device/nfc/nfc_ndef_record_unittest.cc b/device/nfc/nfc_ndef_record_unittest.cc
index 2b6ef48..38c19e5 100644
--- a/device/nfc/nfc_ndef_record_unittest.cc
+++ b/device/nfc/nfc_ndef_record_unittest.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "device/nfc/nfc_ndef_record.h"
@@ -19,7 +22,7 @@ const char kTestAction[] = "test-action";
const char kTestEncoding[] = "test-encoding";
const char kTestLanguageCode[] = "test-language-code";
const char kTestMimeType[] = "test-mime-type";
-const uint32 kTestTargetSize = 0;
+const uint32_t kTestTargetSize = 0;
const char kTestText[] = "test-text";
const char kTestURI[] = "test://uri";
@@ -135,7 +138,7 @@ TEST(NfcNdefRecordTest, PopulateUriRecord) {
EXPECT_EQ(kTestMimeType, string_value);
EXPECT_TRUE(record->data().GetDouble(
NfcNdefRecord::kFieldTargetSize, &double_value));
- EXPECT_EQ(kTestTargetSize, static_cast<uint32>(double_value));
+ EXPECT_EQ(kTestTargetSize, static_cast<uint32_t>(double_value));
}
TEST(NfcNdefRecordTest, PopulateSmartPoster) {
@@ -225,7 +228,7 @@ TEST(NfcNdefRecordTest, PopulateSmartPoster) {
EXPECT_EQ(kTestMimeType, string_value);
EXPECT_TRUE(record->data().GetDouble(
NfcNdefRecord::kFieldTargetSize, &double_value));
- EXPECT_EQ(kTestTargetSize, static_cast<uint32>(double_value));
+ EXPECT_EQ(kTestTargetSize, static_cast<uint32_t>(double_value));
EXPECT_TRUE(record->data().GetString(
NfcNdefRecord::kFieldAction, &string_value));
EXPECT_EQ(kTestAction, string_value);
diff --git a/device/nfc/nfc_peer.h b/device/nfc/nfc_peer.h
index a38192f..93392e5 100644
--- a/device/nfc/nfc_peer.h
+++ b/device/nfc/nfc_peer.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/callback.h"
+#include "base/macros.h"
#include "device/nfc/nfc_ndef_record.h"
namespace device {
diff --git a/device/nfc/nfc_peer_chromeos.h b/device/nfc/nfc_peer_chromeos.h
index 645c42e..6099067 100644
--- a/device/nfc/nfc_peer_chromeos.h
+++ b/device/nfc/nfc_peer_chromeos.h
@@ -7,6 +7,7 @@
#include <map>
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "chromeos/dbus/nfc_record_client.h"
diff --git a/device/nfc/nfc_tag.h b/device/nfc/nfc_tag.h
index 039fc78..83d4e7f 100644
--- a/device/nfc/nfc_tag.h
+++ b/device/nfc/nfc_tag.h
@@ -5,6 +5,7 @@
#ifndef DEVICE_NFC_NFC_TAG_H_
#define DEVICE_NFC_NFC_TAG_H_
+#include "base/macros.h"
#include "device/nfc/nfc_tag_technology.h"
namespace device {
diff --git a/device/nfc/nfc_tag_chromeos.h b/device/nfc/nfc_tag_chromeos.h
index d9a29d8..5903493 100644
--- a/device/nfc/nfc_tag_chromeos.h
+++ b/device/nfc/nfc_tag_chromeos.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "chromeos/dbus/nfc_tag_client.h"
diff --git a/device/nfc/nfc_tag_technology.h b/device/nfc/nfc_tag_technology.h
index 8ada39b..849bf27 100644
--- a/device/nfc/nfc_tag_technology.h
+++ b/device/nfc/nfc_tag_technology.h
@@ -5,7 +5,10 @@
#ifndef DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_
#define DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_
+#include <stdint.h>
+
#include "base/callback.h"
+#include "base/macros.h"
#include "device/nfc/nfc_ndef_record.h"
namespace device {
@@ -28,7 +31,7 @@ class NfcTagTechnology {
kTechnologyTypeIsoDep = 1 << 4,
kTechnologyTypeNdef = 1 << 5
};
- typedef uint32 TechnologyTypeMask;
+ typedef uint32_t TechnologyTypeMask;
virtual ~NfcTagTechnology();
diff --git a/device/nfc/nfc_tag_technology_chromeos.h b/device/nfc/nfc_tag_technology_chromeos.h
index 75f407c..3e49e9e 100644
--- a/device/nfc/nfc_tag_technology_chromeos.h
+++ b/device/nfc/nfc_tag_technology_chromeos.h
@@ -7,6 +7,7 @@
#include <map>
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "chromeos/dbus/nfc_record_client.h"