diff options
317 files changed, 927 insertions, 519 deletions
diff --git a/chromeos/accelerometer/accelerometer_reader.cc b/chromeos/accelerometer/accelerometer_reader.cc index 4fad1de..38d683d 100644 --- a/chromeos/accelerometer/accelerometer_reader.cc +++ b/chromeos/accelerometer/accelerometer_reader.cc @@ -4,6 +4,9 @@ #include "chromeos/accelerometer/accelerometer_reader.h" +#include <stddef.h> +#include <stdint.h> + #include <string> #include <vector> @@ -11,6 +14,7 @@ #include "base/files/file_enumerator.h" #include "base/files/file_util.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/singleton.h" #include "base/single_thread_task_runner.h" #include "base/strings/string_number_conversions.h" @@ -444,7 +448,7 @@ void AccelerometerFileReader::ReadFileAndNotify() { } for (AccelerometerSource source : reading_data.sources) { DCHECK(configuration_.has[source]); - int16* values = reinterpret_cast<int16*>(reading); + int16_t* values = reinterpret_cast<int16_t*>(reading); update_->Set(source, values[configuration_.index[source][0]] * configuration_.scale[source][0], values[configuration_.index[source][1]] * diff --git a/chromeos/accelerometer/accelerometer_reader.h b/chromeos/accelerometer/accelerometer_reader.h index 15732c4..5c3a881 100644 --- a/chromeos/accelerometer/accelerometer_reader.h +++ b/chromeos/accelerometer/accelerometer_reader.h @@ -5,6 +5,7 @@ #ifndef CHROMEOS_ACCELEROMETER_ACCELEROMETER_READER_H_ #define CHROMEOS_ACCELEROMETER_ACCELEROMETER_READER_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/observer_list_threadsafe.h" #include "chromeos/accelerometer/accelerometer_types.h" diff --git a/chromeos/app_mode/kiosk_oem_manifest_parser.h b/chromeos/app_mode/kiosk_oem_manifest_parser.h index 05b7e0a..92998c6 100644 --- a/chromeos/app_mode/kiosk_oem_manifest_parser.h +++ b/chromeos/app_mode/kiosk_oem_manifest_parser.h @@ -8,6 +8,7 @@ #include <string> #include "base/files/file_path.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" namespace chromeos { diff --git a/chromeos/attestation/attestation_flow.h b/chromeos/attestation/attestation_flow.h index a6c6cd2..a5ced3c 100644 --- a/chromeos/attestation/attestation_flow.h +++ b/chromeos/attestation/attestation_flow.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chromeos/attestation/attestation_constants.h" diff --git a/chromeos/attestation/mock_attestation_flow.h b/chromeos/attestation/mock_attestation_flow.h index efefd94..fad04f0 100644 --- a/chromeos/attestation/mock_attestation_flow.h +++ b/chromeos/attestation/mock_attestation_flow.h @@ -7,8 +7,8 @@ #include "chromeos/attestation/attestation_flow.h" -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc index 27109ed..5374194 100644 --- a/chromeos/audio/audio_device.cc +++ b/chromeos/audio/audio_device.cc @@ -4,6 +4,8 @@ #include "chromeos/audio/audio_device.h" +#include <stdint.h> + #include "base/format_macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" @@ -15,7 +17,7 @@ namespace { // Get the priority for a particular device type. The priority returned // will be between 0 to 3, the higher number meaning a higher priority. -uint8 GetDevicePriority(AudioDeviceType type, bool is_input) { +uint8_t GetDevicePriority(AudioDeviceType type, bool is_input) { // Lower the priority of bluetooth mic to prevent unexpected bad eperience // to user because of bluetooth audio profile switching. Make priority to // zero so this mic will never be automatically chosen. diff --git a/chromeos/audio/audio_device.h b/chromeos/audio/audio_device.h index 240f892b1..ee47ee5 100644 --- a/chromeos/audio/audio_device.h +++ b/chromeos/audio/audio_device.h @@ -5,11 +5,12 @@ #ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_ #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_ +#include <stdint.h> + #include <map> #include <string> #include <vector> -#include "base/basictypes.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/audio_node.h" @@ -56,18 +57,18 @@ struct CHROMEOS_EXPORT AudioDevice { } bool is_input; - uint64 id; + uint64_t id; std::string display_name; std::string device_name; std::string mic_positions; AudioDeviceType type; - uint8 priority; + uint8_t priority; bool active; - uint64 plugged_time; + uint64_t plugged_time; }; typedef std::vector<AudioDevice> AudioDeviceList; -typedef std::map<uint64, AudioDevice> AudioDeviceMap; +typedef std::map<uint64_t, AudioDevice> AudioDeviceMap; struct AudioDeviceCompare { // Rules used to discern which device is higher, diff --git a/chromeos/audio/audio_devices_pref_handler.h b/chromeos/audio/audio_devices_pref_handler.h index dfa582e..2347aad 100644 --- a/chromeos/audio/audio_devices_pref_handler.h +++ b/chromeos/audio/audio_devices_pref_handler.h @@ -5,7 +5,6 @@ #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_H_ #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_H_ -#include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "chromeos/audio/audio_pref_observer.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/audio/audio_devices_pref_handler_impl.cc b/chromeos/audio/audio_devices_pref_handler_impl.cc index 17b5681..45aa433 100644 --- a/chromeos/audio/audio_devices_pref_handler_impl.cc +++ b/chromeos/audio/audio_devices_pref_handler_impl.cc @@ -4,6 +4,8 @@ #include "chromeos/audio/audio_devices_pref_handler_impl.h" +#include <stdint.h> + #include <algorithm> #include "base/bind.h" @@ -32,7 +34,7 @@ const int kPrefMuteOn = 1; std::string GetDeviceIdString(const chromeos::AudioDevice& device) { std::string device_id_string = device.device_name + " : " + - base::Uint64ToString(device.id & static_cast<uint64>(0xffffffff)) + + base::Uint64ToString(device.id & static_cast<uint64_t>(0xffffffff)) + " : " + (device.is_input ? "1" : "0"); // Replace any periods from the device id string with a space, since setting // names cannot contain periods. diff --git a/chromeos/audio/audio_devices_pref_handler_impl.h b/chromeos/audio/audio_devices_pref_handler_impl.h index 72dc335..7d30552 100644 --- a/chromeos/audio/audio_devices_pref_handler_impl.h +++ b/chromeos/audio/audio_devices_pref_handler_impl.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/observer_list.h" #include "base/prefs/pref_change_registrar.h" #include "base/values.h" diff --git a/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc b/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc index ba87132..a4a97da 100644 --- a/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc +++ b/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc @@ -4,6 +4,9 @@ #include "chromeos/audio/audio_devices_pref_handler_impl.h" +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/prefs/testing_pref_service.h" #include "chromeos/audio/audio_device.h" @@ -14,11 +17,11 @@ namespace chromeos { -const uint64 kInternalMicId = 10003; -const uint64 kHeadphoneId = 10002; -const uint64 kHDMIOutputId = 10006; -const uint64 kOtherTypeOutputId = 90001; -const uint64 kOtherTypeInputId = 90002; +const uint64_t kInternalMicId = 10003; +const uint64_t kHeadphoneId = 10002; +const uint64_t kHDMIOutputId = 10006; +const uint64_t kOtherTypeOutputId = 90001; +const uint64_t kOtherTypeInputId = 90002; const AudioDevice kInternalMic(AudioNode(true, kInternalMicId, diff --git a/chromeos/audio/audio_devices_pref_handler_stub.h b/chromeos/audio/audio_devices_pref_handler_stub.h index 4cb5d5f..6efe238 100644 --- a/chromeos/audio/audio_devices_pref_handler_stub.h +++ b/chromeos/audio/audio_devices_pref_handler_stub.h @@ -5,6 +5,8 @@ #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_ #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_ +#include <stdint.h> + #include <map> #include "base/macros.h" diff --git a/chromeos/audio/audio_pref_observer.h b/chromeos/audio/audio_pref_observer.h index 52393d4..b183ebfe 100644 --- a/chromeos/audio/audio_pref_observer.h +++ b/chromeos/audio/audio_pref_observer.h @@ -5,7 +5,6 @@ #ifndef CHROMEOS_AUDIO_AUDIO_PREF_OBSERVER_H_ #define CHROMEOS_AUDIO_AUDIO_PREF_OBSERVER_H_ -#include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc index 8ee6009..970c78c 100644 --- a/chromeos/audio/cras_audio_handler.cc +++ b/chromeos/audio/cras_audio_handler.cc @@ -4,6 +4,9 @@ #include "chromeos/audio/cras_audio_handler.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include <cmath> diff --git a/chromeos/audio/cras_audio_handler.h b/chromeos/audio/cras_audio_handler.h index a12e5ae4..39e4ac8 100644 --- a/chromeos/audio/cras_audio_handler.h +++ b/chromeos/audio/cras_audio_handler.h @@ -5,9 +5,11 @@ #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ +#include <stddef.h> #include <stdint.h> #include <queue> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/chromeos/audio/cras_audio_handler_unittest.cc b/chromeos/audio/cras_audio_handler_unittest.cc index 4633d87..46e7d3e 100644 --- a/chromeos/audio/cras_audio_handler_unittest.cc +++ b/chromeos/audio/cras_audio_handler_unittest.cc @@ -4,7 +4,11 @@ #include "chromeos/audio/cras_audio_handler.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" @@ -20,23 +24,23 @@ namespace chromeos { namespace { -const uint64 kInternalSpeakerId = 10001; -const uint64 kHeadphoneId = 10002; -const uint64 kInternalMicId = 10003; -const uint64 kUSBMicId = 10004; -const uint64 kBluetoothHeadsetId = 10005; -const uint64 kHDMIOutputId = 10006; -const uint64 kUSBHeadphoneId1 = 10007; -const uint64 kUSBHeadphoneId2 = 10008; -const uint64 kMicJackId = 10009; -const uint64 kKeyboardMicId = 10010; -const uint64 kOtherTypeOutputId = 90001; -const uint64 kOtherTypeInputId = 90002; -const uint64 kUSBJabraSpeakerOutputId1 = 90003; -const uint64 kUSBJabraSpeakerOutputId2 = 90004; -const uint64 kUSBJabraSpeakerInputId1 = 90005; -const uint64 kUSBJabraSpeakerInputId2 = 90006; -const uint64 kUSBCameraInputId = 90007; +const uint64_t kInternalSpeakerId = 10001; +const uint64_t kHeadphoneId = 10002; +const uint64_t kInternalMicId = 10003; +const uint64_t kUSBMicId = 10004; +const uint64_t kBluetoothHeadsetId = 10005; +const uint64_t kHDMIOutputId = 10006; +const uint64_t kUSBHeadphoneId1 = 10007; +const uint64_t kUSBHeadphoneId2 = 10008; +const uint64_t kMicJackId = 10009; +const uint64_t kKeyboardMicId = 10010; +const uint64_t kOtherTypeOutputId = 90001; +const uint64_t kOtherTypeInputId = 90002; +const uint64_t kUSBJabraSpeakerOutputId1 = 90003; +const uint64_t kUSBJabraSpeakerOutputId2 = 90004; +const uint64_t kUSBJabraSpeakerInputId1 = 90005; +const uint64_t kUSBJabraSpeakerInputId2 = 90006; +const uint64_t kUSBCameraInputId = 90007; const AudioNode kInternalSpeaker( false, @@ -265,12 +269,12 @@ class TestObserver : public chromeos::CrasAudioHandler::AudioObserver { ++input_mute_changed_count_; } - void OnOutputNodeVolumeChanged(uint64 /* node_id */, + void OnOutputNodeVolumeChanged(uint64_t /* node_id */, int /* volume */) override { ++output_volume_changed_count_; } - void OnInputNodeGainChanged(uint64 /* node_id */, int /* gain */) override { + void OnInputNodeGainChanged(uint64_t /* node_id */, int /* gain */) override { ++input_gain_changed_count_; } @@ -341,7 +345,7 @@ class CrasAudioHandlerTest : public testing::Test { message_loop_.RunUntilIdle(); } - const AudioDevice* GetDeviceFromId(uint64 id) { + const AudioDevice* GetDeviceFromId(uint64_t id) { return cras_audio_handler_->GetDeviceFromId(id); } diff --git a/chromeos/binder/buffer_reader.h b/chromeos/binder/buffer_reader.h index 0de70c1..12a26f3 100644 --- a/chromeos/binder/buffer_reader.h +++ b/chromeos/binder/buffer_reader.h @@ -5,6 +5,8 @@ #ifndef CHROMEOS_BINDER_BUFFER_READER_H_ #define CHROMEOS_BINDER_BUFFER_READER_H_ +#include <stddef.h> + #include "base/macros.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/binder/buffer_reader_unittest.cc b/chromeos/binder/buffer_reader_unittest.cc index 7e5c3c7..487855d 100644 --- a/chromeos/binder/buffer_reader_unittest.cc +++ b/chromeos/binder/buffer_reader_unittest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "chromeos/binder/buffer_reader.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chromeos/binder/command_broker.cc b/chromeos/binder/command_broker.cc index ada6c8e..0a5393f 100644 --- a/chromeos/binder/command_broker.cc +++ b/chromeos/binder/command_broker.cc @@ -5,6 +5,8 @@ #include "chromeos/binder/command_broker.h" #include <linux/android/binder.h> +#include <stddef.h> +#include <stdint.h> #include "base/logging.h" #include "chromeos/binder/driver.h" @@ -42,7 +44,7 @@ CommandBroker::~CommandBroker() { DCHECK(thread_checker_.CalledOnValidThread()); } -bool CommandBroker::Transact(int32 handle, +bool CommandBroker::Transact(int32_t handle, const TransactionData& request, scoped_ptr<TransactionData>* reply) { DCHECK(thread_checker_.CalledOnValidThread()); diff --git a/chromeos/binder/command_broker.h b/chromeos/binder/command_broker.h index 86e0324..4f3ae2d 100644 --- a/chromeos/binder/command_broker.h +++ b/chromeos/binder/command_broker.h @@ -5,9 +5,10 @@ #ifndef CHROMEOS_BINDER_COMMAND_BROKER_H_ #define CHROMEOS_BINDER_COMMAND_BROKER_H_ +#include <stdint.h> + #include <utility> -#include "base/basictypes.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" @@ -32,7 +33,7 @@ class CHROMEOS_EXPORT CommandBroker // Performs transaction with the remote object specified by the handle. // Returns true on success. If not one-way transaction, this method blocks // until the target object sends a reply. - bool Transact(int32 handle, + bool Transact(int32_t handle, const TransactionData& request, scoped_ptr<TransactionData>* reply); diff --git a/chromeos/binder/command_stream.cc b/chromeos/binder/command_stream.cc index 3a0d00c..e80c346 100644 --- a/chromeos/binder/command_stream.cc +++ b/chromeos/binder/command_stream.cc @@ -5,6 +5,8 @@ #include "chromeos/binder/command_stream.h" #include <linux/android/binder.h> +#include <stddef.h> +#include <stdint.h> #include "base/bind.h" #include "chromeos/binder/buffer_reader.h" @@ -52,7 +54,7 @@ bool CommandStream::CanProcessIncomingCommand() { bool CommandStream::ProcessIncomingCommand() { DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(CanProcessIncomingCommand()); - uint32 command = 0; + uint32_t command = 0; if (!incoming_data_reader_->Read(&command, sizeof(command)) || !OnIncomingCommand(command, incoming_data_reader_.get())) { LOG(ERROR) << "Error while handling command: " << command; @@ -61,7 +63,7 @@ bool CommandStream::ProcessIncomingCommand() { return true; } -void CommandStream::AppendOutgoingCommand(uint32 command, +void CommandStream::AppendOutgoingCommand(uint32_t command, const void* data, size_t size) { DCHECK(thread_checker_.CalledOnValidThread()); @@ -93,14 +95,14 @@ bool CommandStream::Flush() { return true; } -bool CommandStream::OnIncomingCommand(uint32 command, BufferReader* reader) { +bool CommandStream::OnIncomingCommand(uint32_t command, BufferReader* reader) { DCHECK(thread_checker_.CalledOnValidThread()); // TODO(hashimoto): Replace all NOTIMPLEMENTED with logic to handle incoming // commands. VLOG(1) << "Processing " << CommandToString(command) << ", this = " << this; switch (command) { case BR_ERROR: { - int32 error = 0; + int32_t error = 0; if (!reader->Read(&error, sizeof(error))) { LOG(ERROR) << "Failed to read error code."; return false; diff --git a/chromeos/binder/command_stream.h b/chromeos/binder/command_stream.h index 3ce431a..cd85343 100644 --- a/chromeos/binder/command_stream.h +++ b/chromeos/binder/command_stream.h @@ -5,9 +5,11 @@ #ifndef CHROMEOS_BINDER_COMMAND_STREAM_H_ #define CHROMEOS_BINDER_COMMAND_STREAM_H_ +#include <stddef.h> +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" @@ -59,7 +61,7 @@ class CHROMEOS_EXPORT CommandStream { bool ProcessIncomingCommand(); // Appends a command to the outgoing command buffer. - void AppendOutgoingCommand(uint32 command, const void* data, size_t size); + void AppendOutgoingCommand(uint32_t command, const void* data, size_t size); // Writes buffered outgoing commands to the driver, and returns true on // success. @@ -67,7 +69,7 @@ class CHROMEOS_EXPORT CommandStream { private: // Calls the appropriate delegate method to handle the incoming command. - bool OnIncomingCommand(uint32 command, BufferReader* reader); + bool OnIncomingCommand(uint32_t command, BufferReader* reader); // Frees the buffer used by the driver to pass transaction data payload. void FreeTransactionBuffer(const void* ptr); diff --git a/chromeos/binder/constants.h b/chromeos/binder/constants.h index d039b18..531021d 100644 --- a/chromeos/binder/constants.h +++ b/chromeos/binder/constants.h @@ -11,12 +11,12 @@ namespace binder { // Context manager's handle is always 0. -const uint32 kContextManagerHandle = 0; +const uint32_t kContextManagerHandle = 0; // Transaction code constants. -const uint32 kFirstTransactionCode = 0x00000001; -const uint32 kLastTransactionCode = 0x00ffffff; -const uint32 kPingTransactionCode = BINDER_PACK_CHARS('_', 'P', 'N', 'G'); +const uint32_t kFirstTransactionCode = 0x00000001; +const uint32_t kLastTransactionCode = 0x00ffffff; +const uint32_t kPingTransactionCode = BINDER_PACK_CHARS('_', 'P', 'N', 'G'); } // namespace binder diff --git a/chromeos/binder/driver.cc b/chromeos/binder/driver.cc index f82470c..be917db 100644 --- a/chromeos/binder/driver.cc +++ b/chromeos/binder/driver.cc @@ -7,6 +7,7 @@ #include <errno.h> #include <fcntl.h> #include <linux/android/binder.h> +#include <stddef.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/user.h> diff --git a/chromeos/binder/driver.h b/chromeos/binder/driver.h index da7479e..ccc6e2e 100644 --- a/chromeos/binder/driver.h +++ b/chromeos/binder/driver.h @@ -5,6 +5,8 @@ #ifndef CHROMEOS_BINDER_DRIVER_H_ #define CHROMEOS_BINDER_DRIVER_H_ +#include <stddef.h> + #include "base/files/scoped_file.h" #include "base/macros.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/binder/status.h b/chromeos/binder/status.h index 0bcf4fa..346211e 100644 --- a/chromeos/binder/status.h +++ b/chromeos/binder/status.h @@ -6,14 +6,13 @@ #define CHROMEOS_BINDER_STATUS_H_ #include <errno.h> - -#include "base/basictypes.h" +#include <stdint.h> namespace binder { // Status code. // Using the same values as used by libbinder. -enum class Status : int32 { +enum class Status : int32_t { OK = 0, UNKNOWN_ERROR = INT32_MIN, diff --git a/chromeos/binder/transaction_data.h b/chromeos/binder/transaction_data.h index c7602c0..d43fc69 100644 --- a/chromeos/binder/transaction_data.h +++ b/chromeos/binder/transaction_data.h @@ -5,7 +5,6 @@ #ifndef CHROMEOS_BINDER_TRANSACTION_DATA_H_ #define CHROMEOS_BINDER_TRANSACTION_DATA_H_ -#include "base/basictypes.h" #include "chromeos/binder/status.h" namespace binder { @@ -19,7 +18,7 @@ class TransactionData { virtual uintptr_t GetCookie() const = 0; // Returns the transaction code. - virtual uint32 GetCode() const = 0; + virtual uint32_t GetCode() const = 0; // Returns the PID of the sender. virtual pid_t GetSenderPID() const = 0; diff --git a/chromeos/binder/transaction_data_from_driver.cc b/chromeos/binder/transaction_data_from_driver.cc index 9b76ebf..b14c324 100644 --- a/chromeos/binder/transaction_data_from_driver.cc +++ b/chromeos/binder/transaction_data_from_driver.cc @@ -4,6 +4,9 @@ #include "chromeos/binder/transaction_data_from_driver.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" #include "base/logging.h" @@ -44,7 +47,7 @@ uintptr_t TransactionDataFromDriver::GetCookie() const { return data_.cookie; } -uint32 TransactionDataFromDriver::GetCode() const { +uint32_t TransactionDataFromDriver::GetCode() const { return data_.code; } diff --git a/chromeos/binder/transaction_data_from_driver.h b/chromeos/binder/transaction_data_from_driver.h index 96aee9a..cf7837c 100644 --- a/chromeos/binder/transaction_data_from_driver.h +++ b/chromeos/binder/transaction_data_from_driver.h @@ -5,8 +5,10 @@ #ifndef CHROMEOS_BINDER_TRANSACTION_DATA_FROM_DRIVER_H_ #define CHROMEOS_BINDER_TRANSACTION_DATA_FROM_DRIVER_H_ -#include <unistd.h> #include <linux/android/binder.h> +#include <stddef.h> +#include <stdint.h> +#include <unistd.h> #include "base/callback.h" #include "base/macros.h" @@ -33,7 +35,7 @@ class CHROMEOS_EXPORT TransactionDataFromDriver : public TransactionData { // TransactionData override: uintptr_t GetCookie() const override; - uint32 GetCode() const override; + uint32_t GetCode() const override; pid_t GetSenderPID() const override; uid_t GetSenderEUID() const override; bool IsOneWay() const override; diff --git a/chromeos/binder/transaction_data_reader.cc b/chromeos/binder/transaction_data_reader.cc index cf206ae..4505911 100644 --- a/chromeos/binder/transaction_data_reader.cc +++ b/chromeos/binder/transaction_data_reader.cc @@ -4,6 +4,9 @@ #include "chromeos/binder/transaction_data_reader.h" +#include <stddef.h> +#include <stdint.h> + #include "chromeos/binder/transaction_data.h" namespace binder { @@ -32,19 +35,19 @@ bool TransactionDataReader::ReadData(void* buf, size_t n) { return reader_.Read(buf, n) && reader_.Skip(AddPadding(n) - n); } -bool TransactionDataReader::ReadInt32(int32* value) { +bool TransactionDataReader::ReadInt32(int32_t* value) { return ReadData(value, sizeof(*value)); } -bool TransactionDataReader::ReadUint32(uint32* value) { +bool TransactionDataReader::ReadUint32(uint32_t* value) { return ReadData(value, sizeof(*value)); } -bool TransactionDataReader::ReadInt64(int64* value) { +bool TransactionDataReader::ReadInt64(int64_t* value) { return ReadData(value, sizeof(*value)); } -bool TransactionDataReader::ReadUint64(uint64* value) { +bool TransactionDataReader::ReadUint64(uint64_t* value) { return ReadData(value, sizeof(*value)); } diff --git a/chromeos/binder/transaction_data_reader.h b/chromeos/binder/transaction_data_reader.h index 22dddef..26cb916 100644 --- a/chromeos/binder/transaction_data_reader.h +++ b/chromeos/binder/transaction_data_reader.h @@ -5,7 +5,9 @@ #ifndef CHROMEOS_BINDER_TRANSACTION_DATA_READER_H_ #define CHROMEOS_BINDER_TRANSACTION_DATA_READER_H_ -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + #include "base/macros.h" #include "chromeos/binder/buffer_reader.h" #include "chromeos/chromeos_export.h" @@ -28,17 +30,17 @@ class CHROMEOS_EXPORT TransactionDataReader { // Reads the specified number of bytes with appropriate padding. bool ReadData(void* buf, size_t n); - // Reads an int32 value. - bool ReadInt32(int32* value); + // Reads an int32_t value. + bool ReadInt32(int32_t* value); - // Reads an uint32 value. - bool ReadUint32(uint32* value); + // Reads an uint32_t value. + bool ReadUint32(uint32_t* value); - // Reads an int64 value. - bool ReadInt64(int64* value); + // Reads an int64_t value. + bool ReadInt64(int64_t* value); - // Reads an uint64 value. - bool ReadUint64(uint64* value); + // Reads an uint64_t value. + bool ReadUint64(uint64_t* value); // Reads a float value. bool ReadFloat(float* value); diff --git a/chromeos/binder/transaction_data_reader_unittest.cc b/chromeos/binder/transaction_data_reader_unittest.cc index 21c90ec..8bed9ea 100644 --- a/chromeos/binder/transaction_data_reader_unittest.cc +++ b/chromeos/binder/transaction_data_reader_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 <vector> #include "chromeos/binder/transaction_data_reader.h" @@ -31,10 +34,10 @@ TEST(BinderTransactionDataReaderTest, ReadData) { } TEST(BinderTransactionDataReaderTest, ReadScalarValues) { - const int32 kInt32Value = -1; - const uint32 kUint32Value = 2; - const int64 kInt64Value = -3; - const uint64 kUint64Value = 4; + const int32_t kInt32Value = -1; + const uint32_t kUint32Value = 2; + const int64_t kInt64Value = -3; + const uint64_t kUint64Value = 4; const float kFloatValue = 5.55; const double kDoubleValue = 6.66; @@ -49,22 +52,22 @@ TEST(BinderTransactionDataReaderTest, ReadScalarValues) { TransactionDataReader reader(data); EXPECT_TRUE(reader.HasMoreData()); { - int32 result = 0; + int32_t result = 0; EXPECT_TRUE(reader.ReadInt32(&result)); EXPECT_EQ(kInt32Value, result); } { - uint32 result = 0; + uint32_t result = 0; EXPECT_TRUE(reader.ReadUint32(&result)); EXPECT_EQ(kUint32Value, result); } { - int64 result = 0; + int64_t result = 0; EXPECT_TRUE(reader.ReadInt64(&result)); EXPECT_EQ(kInt64Value, result); } { - uint64 result = 0; + uint64_t result = 0; EXPECT_TRUE(reader.ReadUint64(&result)); EXPECT_EQ(kUint64Value, result); } diff --git a/chromeos/binder/transaction_status.cc b/chromeos/binder/transaction_status.cc index cdf0d39..20f997c 100644 --- a/chromeos/binder/transaction_status.cc +++ b/chromeos/binder/transaction_status.cc @@ -14,7 +14,7 @@ uintptr_t TransactionStatus::GetCookie() const { return 0; } -uint32 TransactionStatus::GetCode() const { +uint32_t TransactionStatus::GetCode() const { return 0; } diff --git a/chromeos/binder/transaction_status.h b/chromeos/binder/transaction_status.h index c239e73..088d173 100644 --- a/chromeos/binder/transaction_status.h +++ b/chromeos/binder/transaction_status.h @@ -5,7 +5,9 @@ #ifndef CHROMEOS_BINDER_TRANSACTION_STATUS_H_ #define CHROMEOS_BINDER_TRANSACTION_STATUS_H_ -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + #include "base/macros.h" #include "chromeos/binder/status.h" #include "chromeos/binder/transaction_data.h" @@ -23,7 +25,7 @@ class CHROMEOS_EXPORT TransactionStatus : public TransactionData { // TransactionData override: uintptr_t GetCookie() const override; - uint32 GetCode() const override; + uint32_t GetCode() const override; pid_t GetSenderPID() const override; uid_t GetSenderEUID() const override; bool IsOneWay() const override; diff --git a/chromeos/binder/util.cc b/chromeos/binder/util.cc index e5788a3..cd9802d 100644 --- a/chromeos/binder/util.cc +++ b/chromeos/binder/util.cc @@ -5,12 +5,13 @@ #include "chromeos/binder/util.h" #include <linux/android/binder.h> +#include <stdint.h> #include "base/logging.h" namespace binder { -const char* CommandToString(uint32 command) { +const char* CommandToString(uint32_t command) { switch (command) { case BR_ERROR: return "BR_ERROR"; diff --git a/chromeos/binder/util.h b/chromeos/binder/util.h index 6801d24..461d4e0 100644 --- a/chromeos/binder/util.h +++ b/chromeos/binder/util.h @@ -5,14 +5,13 @@ #ifndef CHROMEOS_BINDER_UTIL_H_ #define CHROMEOS_BINDER_UTIL_H_ -#include "base/basictypes.h" #include "chromeos/chromeos_export.h" namespace binder { // Returns the string representation of the given binder command or "UNKNOWN" // if command is unknown, never returns null. -CHROMEOS_EXPORT const char* CommandToString(uint32 command); +CHROMEOS_EXPORT const char* CommandToString(uint32_t command); } // namespace binder diff --git a/chromeos/binder/writable_transaction_data.cc b/chromeos/binder/writable_transaction_data.cc index 07c4bd6..1afbdc0 100644 --- a/chromeos/binder/writable_transaction_data.cc +++ b/chromeos/binder/writable_transaction_data.cc @@ -14,7 +14,7 @@ uintptr_t WritableTransactionData::GetCookie() const { return 0; } -uint32 WritableTransactionData::GetCode() const { +uint32_t WritableTransactionData::GetCode() const { return code_; } @@ -66,21 +66,21 @@ void WritableTransactionData::WriteData(const void* data, size_t n) { } } -void WritableTransactionData::WriteInt32(int32 value) { +void WritableTransactionData::WriteInt32(int32_t value) { // Binder is not used for inter-device communication, so no endian conversion. // The same applies to other Write() methods. WriteData(&value, sizeof(value)); } -void WritableTransactionData::WriteUint32(uint32 value) { +void WritableTransactionData::WriteUint32(uint32_t value) { WriteData(&value, sizeof(value)); } -void WritableTransactionData::WriteInt64(int64 value) { +void WritableTransactionData::WriteInt64(int64_t value) { WriteData(&value, sizeof(value)); } -void WritableTransactionData::WriteUint64(uint64 value) { +void WritableTransactionData::WriteUint64(uint64_t value) { WriteData(&value, sizeof(value)); } diff --git a/chromeos/binder/writable_transaction_data.h b/chromeos/binder/writable_transaction_data.h index f32eff8..9001ad3 100644 --- a/chromeos/binder/writable_transaction_data.h +++ b/chromeos/binder/writable_transaction_data.h @@ -5,9 +5,11 @@ #ifndef CHROMEOS_BINDER_WRITABLE_TRANSACTION_DATA_H_ #define CHROMEOS_BINDER_WRITABLE_TRANSACTION_DATA_H_ +#include <stddef.h> +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/macros.h" #include "chromeos/binder/transaction_data.h" #include "chromeos/chromeos_export.h" @@ -24,7 +26,7 @@ class CHROMEOS_EXPORT WritableTransactionData : public TransactionData { // TransactionData override: uintptr_t GetCookie() const override; - uint32 GetCode() const override; + uint32_t GetCode() const override; pid_t GetSenderPID() const override; uid_t GetSenderEUID() const override; bool IsOneWay() const override; @@ -39,7 +41,7 @@ class CHROMEOS_EXPORT WritableTransactionData : public TransactionData { void Reserve(size_t n); // Sets the transaction code returned by GetCode(). - void SetCode(uint32 code) { code_ = code; } + void SetCode(uint32_t code) { code_ = code; } // Sets the value returned by IsOneWay(). void SetIsOneWay(bool is_one_way) { is_one_way_ = is_one_way; } @@ -47,17 +49,17 @@ class CHROMEOS_EXPORT WritableTransactionData : public TransactionData { // Appends the specified data with appropriate padding. void WriteData(const void* data, size_t n); - // Appends an int32 value. - void WriteInt32(int32 value); + // Appends an int32_t value. + void WriteInt32(int32_t value); - // Appends a uint32 value. - void WriteUint32(uint32 value); + // Appends a uint32_t value. + void WriteUint32(uint32_t value); - // Appends an int64 vlaue. - void WriteInt64(int64 value); + // Appends an int64_t vlaue. + void WriteInt64(int64_t value); - // Appends a uint64 value. - void WriteUint64(uint64 value); + // Appends a uint64_t value. + void WriteUint64(uint64_t value); // Appends a float value. void WriteFloat(float value); @@ -67,7 +69,7 @@ class CHROMEOS_EXPORT WritableTransactionData : public TransactionData { // TODO(hashimoto): Support more types (i.e. strings, FDs, objects). private: - uint32 code_ = 0; + uint32_t code_ = 0; bool is_one_way_ = false; std::vector<char> data_; std::vector<uintptr_t> object_offsets_; diff --git a/chromeos/binder/writable_transaction_data_unittest.cc b/chromeos/binder/writable_transaction_data_unittest.cc index a77a947..07d1d31 100644 --- a/chromeos/binder/writable_transaction_data_unittest.cc +++ b/chromeos/binder/writable_transaction_data_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 "chromeos/binder/buffer_reader.h" #include "chromeos/binder/writable_transaction_data.h" #include "testing/gtest/include/gtest/gtest.h" @@ -25,52 +28,52 @@ TEST(BinderWritableTransactionDataTest, WriteData) { } TEST(BinderWritableTransactionDataTest, WriteInt32) { - const int32 kValue = -1234; + const int32_t kValue = -1234; WritableTransactionData data; data.WriteInt32(kValue); EXPECT_EQ(sizeof(kValue), data.GetDataSize()); BufferReader reader(reinterpret_cast<const char*>(data.GetData()), data.GetDataSize()); - int32 result = 0; + int32_t result = 0; EXPECT_TRUE(reader.Read(&result, sizeof(result))); EXPECT_EQ(kValue, result); EXPECT_FALSE(reader.HasMoreData()); } TEST(BinderWritableTransactionDataTest, WriteUint32) { - const uint32 kValue = 1234; + const uint32_t kValue = 1234; WritableTransactionData data; data.WriteUint32(kValue); EXPECT_EQ(sizeof(kValue), data.GetDataSize()); BufferReader reader(reinterpret_cast<const char*>(data.GetData()), data.GetDataSize()); - uint32 result = 0; + uint32_t result = 0; EXPECT_TRUE(reader.Read(&result, sizeof(result))); EXPECT_EQ(kValue, result); EXPECT_FALSE(reader.HasMoreData()); } TEST(BinderWritableTransactionDataTest, WriteInt64) { - const int64 kValue = -1234; + const int64_t kValue = -1234; WritableTransactionData data; data.WriteInt64(kValue); EXPECT_EQ(sizeof(kValue), data.GetDataSize()); BufferReader reader(reinterpret_cast<const char*>(data.GetData()), data.GetDataSize()); - int64 result = 0; + int64_t result = 0; EXPECT_TRUE(reader.Read(&result, sizeof(result))); EXPECT_EQ(kValue, result); EXPECT_FALSE(reader.HasMoreData()); } TEST(BinderWritableTransactionDataTest, WriteUint64) { - const uint64 kValue = 1234; + const uint64_t kValue = 1234; WritableTransactionData data; data.WriteUint64(kValue); EXPECT_EQ(sizeof(kValue), data.GetDataSize()); BufferReader reader(reinterpret_cast<const char*>(data.GetData()), data.GetDataSize()); - uint64 result = 0; + uint64_t result = 0; EXPECT_TRUE(reader.Read(&result, sizeof(result))); EXPECT_EQ(kValue, result); EXPECT_FALSE(reader.HasMoreData()); diff --git a/chromeos/cert_loader.h b/chromeos/cert_loader.h index 694ea31..a837e4d 100644 --- a/chromeos/cert_loader.h +++ b/chromeos/cert_loader.h @@ -8,8 +8,8 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/chromeos/cert_loader_unittest.cc b/chromeos/cert_loader_unittest.cc index 8c397bd..f594f93 100644 --- a/chromeos/cert_loader_unittest.cc +++ b/chromeos/cert_loader_unittest.cc @@ -4,6 +4,8 @@ #include "chromeos/cert_loader.h" +#include <stddef.h> + #include "base/bind.h" #include "base/files/file_util.h" #include "base/memory/scoped_ptr.h" diff --git a/chromeos/cryptohome/async_method_caller.cc b/chromeos/cryptohome/async_method_caller.cc index eab0bd5..b95966f 100644 --- a/chromeos/cryptohome/async_method_caller.cc +++ b/chromeos/cryptohome/async_method_caller.cc @@ -7,6 +7,7 @@ #include "base/bind.h" #include "base/containers/hash_tables.h" #include "base/location.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" #include "chromeos/dbus/dbus_thread_manager.h" diff --git a/chromeos/cryptohome/async_method_caller.h b/chromeos/cryptohome/async_method_caller.h index 7f1660e..374da45 100644 --- a/chromeos/cryptohome/async_method_caller.h +++ b/chromeos/cryptohome/async_method_caller.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/callback_forward.h" #include "chromeos/attestation/attestation_constants.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/cryptohome/cryptohome_parameters.cc b/chromeos/cryptohome/cryptohome_parameters.cc index 5b3ac4d..8b65a71 100644 --- a/chromeos/cryptohome/cryptohome_parameters.cc +++ b/chromeos/cryptohome/cryptohome_parameters.cc @@ -4,6 +4,9 @@ #include "chromeos/cryptohome/cryptohome_parameters.h" +#include <stddef.h> +#include <stdint.h> + #include "chromeos/dbus/cryptohome/key.pb.h" namespace cryptohome { @@ -81,15 +84,14 @@ KeyDefinition::ProviderData::ProviderData(const std::string& name) KeyDefinition::ProviderData::ProviderData(const ProviderData& other) : name(other.name) { if (other.number) - number.reset(new int64(*other.number)); + number.reset(new int64_t(*other.number)); if (other.bytes) bytes.reset(new std::string(*other.bytes)); } -KeyDefinition::ProviderData::ProviderData(const std::string& name, int64 number) - : name(name), - number(new int64(number)) { -} +KeyDefinition::ProviderData::ProviderData(const std::string& name, + int64_t number) + : name(name), number(new int64_t(number)) {} KeyDefinition::ProviderData::ProviderData(const std::string& name, const std::string& bytes) @@ -99,7 +101,7 @@ KeyDefinition::ProviderData::ProviderData(const std::string& name, void KeyDefinition::ProviderData::operator=(const ProviderData& other) { name = other.name; - number.reset(other.number ? new int64(*other.number) : NULL); + number.reset(other.number ? new int64_t(*other.number) : NULL); bytes.reset(other.bytes ? new std::string(*other.bytes) : NULL); } diff --git a/chromeos/cryptohome/cryptohome_parameters.h b/chromeos/cryptohome/cryptohome_parameters.h index 0b744a4..3738b56 100644 --- a/chromeos/cryptohome/cryptohome_parameters.h +++ b/chromeos/cryptohome/cryptohome_parameters.h @@ -5,10 +5,11 @@ #ifndef CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ #define CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" @@ -85,7 +86,7 @@ struct CHROMEOS_EXPORT KeyDefinition { ProviderData(); explicit ProviderData(const std::string& name); explicit ProviderData(const ProviderData& other); - ProviderData(const std::string& name, int64 number); + ProviderData(const std::string& name, int64_t number); ProviderData(const std::string& name, const std::string& bytes); void operator=(const ProviderData& other); ~ProviderData(); @@ -93,7 +94,7 @@ struct CHROMEOS_EXPORT KeyDefinition { bool operator==(const ProviderData& other) const; std::string name; - scoped_ptr<int64> number; + scoped_ptr<int64_t> number; scoped_ptr<std::string> bytes; }; diff --git a/chromeos/cryptohome/cryptohome_util.cc b/chromeos/cryptohome/cryptohome_util.cc index 5e2b310..7d057b1 100644 --- a/chromeos/cryptohome/cryptohome_util.cc +++ b/chromeos/cryptohome/cryptohome_util.cc @@ -4,6 +4,8 @@ #include "chromeos/cryptohome/cryptohome_util.h" +#include <stdint.h> + #include "base/logging.h" #include "chromeos/dbus/cryptohome_client.h" #include "chromeos/dbus/dbus_thread_manager.h" @@ -34,7 +36,7 @@ bool TpmIsBeingOwned() { bool InstallAttributesGet( const std::string& name, std::string* value) { - std::vector<uint8> buf; + std::vector<uint8_t> buf; bool success = false; DBusThreadManager::Get()->GetCryptohomeClient()-> InstallAttributesGet(name, &buf, &success); @@ -49,7 +51,7 @@ bool InstallAttributesGet( bool InstallAttributesSet( const std::string& name, const std::string& value) { - std::vector<uint8> buf(value.c_str(), value.c_str() + value.size() + 1); + std::vector<uint8_t> buf(value.c_str(), value.c_str() + value.size() + 1); bool success = false; DBusThreadManager::Get()->GetCryptohomeClient()-> InstallAttributesSet(name, buf, &success); diff --git a/chromeos/cryptohome/homedir_methods.cc b/chromeos/cryptohome/homedir_methods.cc index 0407e3c..8413c72 100644 --- a/chromeos/cryptohome/homedir_methods.cc +++ b/chromeos/cryptohome/homedir_methods.cc @@ -4,8 +4,12 @@ #include "chromeos/cryptohome/homedir_methods.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/logging.h" +#include "base/macros.h" #include "chromeos/dbus/cryptohome/key.pb.h" #include "chromeos/dbus/cryptohome/rpc.pb.h" #include "chromeos/dbus/dbus_thread_manager.h" @@ -387,7 +391,7 @@ class HomedirMethodsImpl : public HomedirMethods { // Extract |number|. if (provider_data_it->has_number()) { - provider_data.number.reset(new int64(provider_data_it->number())); + provider_data.number.reset(new int64_t(provider_data_it->number())); ++data_items; } diff --git a/chromeos/cryptohome/homedir_methods.h b/chromeos/cryptohome/homedir_methods.h index cabfded..17f0f55 100644 --- a/chromeos/cryptohome/homedir_methods.h +++ b/chromeos/cryptohome/homedir_methods.h @@ -8,7 +8,6 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" #include "chromeos/chromeos_export.h" #include "chromeos/cryptohome/cryptohome_parameters.h" diff --git a/chromeos/cryptohome/homedir_methods_unittest.cc b/chromeos/cryptohome/homedir_methods_unittest.cc index 9edd7b0..f6174add 100644 --- a/chromeos/cryptohome/homedir_methods_unittest.cc +++ b/chromeos/cryptohome/homedir_methods_unittest.cc @@ -4,9 +4,12 @@ #include "chromeos/cryptohome/homedir_methods.h" +#include <stdint.h> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chromeos/dbus/cryptohome/rpc.pb.h" #include "chromeos/dbus/cryptohome_client.h" @@ -37,9 +40,9 @@ MATCHER_P(EqualsProto, expected_proto, "") { const char kUserID[] = "user@example.com"; const char kKeyLabel[] = "key_label"; -const int64 kKeyRevision = 123; +const int64_t kKeyRevision = 123; const char kProviderData1Name[] = "data_1"; -const int64 kProviderData1Number = 12345; +const int64_t kProviderData1Number = 12345; const char kProviderData2Name[] = "data_2"; const char kProviderData2Bytes[] = "data_2 bytes"; diff --git a/chromeos/cryptohome/mock_async_method_caller.h b/chromeos/cryptohome/mock_async_method_caller.h index 515ec78..97ead2f 100644 --- a/chromeos/cryptohome/mock_async_method_caller.h +++ b/chromeos/cryptohome/mock_async_method_caller.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/cryptohome/async_method_caller.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/chromeos/cryptohome/mock_homedir_methods.h b/chromeos/cryptohome/mock_homedir_methods.h index 8647744..81a82a2 100644 --- a/chromeos/cryptohome/mock_homedir_methods.h +++ b/chromeos/cryptohome/mock_homedir_methods.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/cryptohome/homedir_methods.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/chromeos/cryptohome/system_salt_getter.cc b/chromeos/cryptohome/system_salt_getter.cc index b0bbc9e..0e79fc1 100644 --- a/chromeos/cryptohome/system_salt_getter.cc +++ b/chromeos/cryptohome/system_salt_getter.cc @@ -4,6 +4,8 @@ #include "chromeos/cryptohome/system_salt_getter.h" +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" #include "base/single_thread_task_runner.h" @@ -54,9 +56,10 @@ void SystemSaltGetter::DidWaitForServiceToBeAvailable( callback)); } -void SystemSaltGetter::DidGetSystemSalt(const GetSystemSaltCallback& callback, - DBusMethodCallStatus call_status, - const std::vector<uint8>& system_salt) { +void SystemSaltGetter::DidGetSystemSalt( + const GetSystemSaltCallback& callback, + DBusMethodCallStatus call_status, + const std::vector<uint8_t>& system_salt) { if (call_status == DBUS_METHOD_CALL_SUCCESS && !system_salt.empty() && system_salt.size() % 2 == 0U) @@ -94,7 +97,7 @@ SystemSaltGetter* SystemSaltGetter::Get() { // static std::string SystemSaltGetter::ConvertRawSaltToHexString( - const std::vector<uint8>& salt) { + const std::vector<uint8_t>& salt) { return base::ToLowerASCII( base::HexEncode(reinterpret_cast<const void*>(salt.data()), salt.size())); } diff --git a/chromeos/cryptohome/system_salt_getter.h b/chromeos/cryptohome/system_salt_getter.h index ee33133..8654e50 100644 --- a/chromeos/cryptohome/system_salt_getter.h +++ b/chromeos/cryptohome/system_salt_getter.h @@ -5,11 +5,13 @@ #ifndef CHROMEOS_CRYPTOHOME_SYSTEM_SALT_GETTER_H_ #define CHROMEOS_CRYPTOHOME_SYSTEM_SALT_GETTER_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_method_call_status.h" @@ -29,7 +31,8 @@ class CHROMEOS_EXPORT SystemSaltGetter { static SystemSaltGetter* Get(); // Converts |salt| to a hex encoded string. - static std::string ConvertRawSaltToHexString(const std::vector<uint8>& salt); + static std::string ConvertRawSaltToHexString( + const std::vector<uint8_t>& salt); // Returns system hash in hex encoded ascii format. Note: this may return // an empty string (e.g. errors in D-Bus layer) @@ -45,7 +48,7 @@ class CHROMEOS_EXPORT SystemSaltGetter { bool service_is_available); void DidGetSystemSalt(const GetSystemSaltCallback& callback, DBusMethodCallStatus call_status, - const std::vector<uint8>& system_salt); + const std::vector<uint8_t>& system_salt); std::string system_salt_; diff --git a/chromeos/dbus/amplifier_client.cc b/chromeos/dbus/amplifier_client.cc index 5a3ffa6..6f8cd2b 100644 --- a/chromeos/dbus/amplifier_client.cc +++ b/chromeos/dbus/amplifier_client.cc @@ -4,7 +4,10 @@ #include "chromeos/dbus/amplifier_client.h" +#include <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" #include "base/observer_list.h" @@ -154,7 +157,7 @@ void AmplifierClientImpl::SetVolume(double db_spl, void AmplifierClientImpl::OnError(dbus::Signal* signal) { dbus::MessageReader reader(signal); - int32 error_code = 0; + int32_t error_code = 0; if (!reader.PopInt32(&error_code)) { LOG(ERROR) << "Invalid signal: " << signal->ToString(); return; diff --git a/chromeos/dbus/amplifier_client.h b/chromeos/dbus/amplifier_client.h index c63a286..4ff3ab1 100644 --- a/chromeos/dbus/amplifier_client.h +++ b/chromeos/dbus/amplifier_client.h @@ -5,7 +5,9 @@ #ifndef CHROMEOS_DBUS_AMPLIFIER_CLIENT_H_ #define CHROMEOS_DBUS_AMPLIFIER_CLIENT_H_ -#include "base/basictypes.h" +#include <stdint.h> + +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/dbus_method_call_status.h" @@ -20,7 +22,7 @@ class CHROMEOS_EXPORT AmplifierClient : public DBusClient { public: virtual ~Observer() {} // Called when the Error signal is received. - virtual void OnError(int32 error_code) = 0; + virtual void OnError(int32_t error_code) = 0; }; ~AmplifierClient() override; diff --git a/chromeos/dbus/ap_manager_client.cc b/chromeos/dbus/ap_manager_client.cc index 1a191c7..8b31e96 100644 --- a/chromeos/dbus/ap_manager_client.cc +++ b/chromeos/dbus/ap_manager_client.cc @@ -7,6 +7,7 @@ #include "base/bind.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/single_thread_task_runner.h" diff --git a/chromeos/dbus/ap_manager_client.h b/chromeos/dbus/ap_manager_client.h index f160b03..9f98f30 100644 --- a/chromeos/dbus/ap_manager_client.h +++ b/chromeos/dbus/ap_manager_client.h @@ -4,6 +4,8 @@ #ifndef CHROMEOS_DBUS_AP_MANAGER_CLIENT_H_ #define CHROMEOS_DBUS_AP_MANAGER_CLIENT_H_ +#include <stdint.h> + #include <map> #include <string> #include <vector> diff --git a/chromeos/dbus/audio_dsp_client.cc b/chromeos/dbus/audio_dsp_client.cc index 74a8dcd..94b3992 100644 --- a/chromeos/dbus/audio_dsp_client.cc +++ b/chromeos/dbus/audio_dsp_client.cc @@ -4,7 +4,10 @@ #include "chromeos/dbus/audio_dsp_client.h" +#include <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" #include "base/observer_list.h" @@ -131,16 +134,16 @@ class AudioDspClientImpl : public AudioDspClient { void GetBass(const DoubleDBusMethodCallback& callback) override; void GetCapabilitiesOEM( const ThreeStringDBusMethodCallback& callback) override; - void SetCapabilitiesOEM(uint32 speaker_id, + void SetCapabilitiesOEM(uint32_t speaker_id, const std::string& speaker_capabilities, const std::string& driver_capabilities, const VoidDBusMethodCallback& callback) override; - void GetFilterConfigOEM(uint32 speaker_id, + void GetFilterConfigOEM(uint32_t speaker_id, const TwoStringDBusMethodCallback& callback) override; void SetFilterConfigOEM(const std::string& speaker_config, const std::string& driver_config, const VoidDBusMethodCallback& callback) override; - void SetSourceType(uint16 source_type, + void SetSourceType(uint16_t source_type, const VoidDBusMethodCallback& callback) override; void AmplifierVolumeChanged(double db_spl, const VoidDBusMethodCallback& callback) override; @@ -287,7 +290,7 @@ void AudioDspClientImpl::GetCapabilitiesOEM( } void AudioDspClientImpl::SetCapabilitiesOEM( - uint32 speaker_id, + uint32_t speaker_id, const std::string& speaker_capabilities, const std::string& driver_capabilities, const VoidDBusMethodCallback& callback) { @@ -303,7 +306,7 @@ void AudioDspClientImpl::SetCapabilitiesOEM( } void AudioDspClientImpl::GetFilterConfigOEM( - uint32 speaker_id, + uint32_t speaker_id, const TwoStringDBusMethodCallback& callback) { dbus::MethodCall method_call(audio_dsp::kAudioDspInterface, audio_dsp::kGetFilterConfigOEMMethod); @@ -328,7 +331,7 @@ void AudioDspClientImpl::SetFilterConfigOEM( base::Bind(&OnVoidDBusMethod, callback)); } -void AudioDspClientImpl::SetSourceType(uint16 source_type, +void AudioDspClientImpl::SetSourceType(uint16_t source_type, const VoidDBusMethodCallback& callback) { dbus::MethodCall method_call(audio_dsp::kAudioDspInterface, audio_dsp::kSetSourceTypeMethod); @@ -353,7 +356,7 @@ void AudioDspClientImpl::AmplifierVolumeChanged( void AudioDspClientImpl::OnError(dbus::Signal* signal) { dbus::MessageReader reader(signal); - int32 error_code = 0; + int32_t error_code = 0; if (!reader.PopInt32(&error_code)) { LOG(ERROR) << "Invalid signal: " << signal->ToString(); return; diff --git a/chromeos/dbus/audio_dsp_client.h b/chromeos/dbus/audio_dsp_client.h index a1aa2c4..5db7880 100644 --- a/chromeos/dbus/audio_dsp_client.h +++ b/chromeos/dbus/audio_dsp_client.h @@ -5,7 +5,9 @@ #ifndef CHROMEOS_DBUS_AUDIO_DSP_CLIENT_H_ #define CHROMEOS_DBUS_AUDIO_DSP_CLIENT_H_ -#include "base/basictypes.h" +#include <stdint.h> + +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/dbus_method_call_status.h" @@ -38,7 +40,7 @@ class CHROMEOS_EXPORT AudioDspClient : public DBusClient { virtual ~Observer() {} // Called when the Error signal is received. - virtual void OnError(int32 error_code) = 0; + virtual void OnError(int32_t error_code) = 0; }; ~AudioDspClient() override; @@ -109,7 +111,7 @@ class CHROMEOS_EXPORT AudioDspClient : public DBusClient { // Calls SetCapabilitiesOEM method. // |callback| will be called with a DBusMethodCallStatus indicating whether // the DBus method call succeeded. - virtual void SetCapabilitiesOEM(uint32 speaker_id, + virtual void SetCapabilitiesOEM(uint32_t speaker_id, const std::string& speaker_capabilities, const std::string& driver_capabilities, const VoidDBusMethodCallback& callback) = 0; @@ -119,7 +121,7 @@ class CHROMEOS_EXPORT AudioDspClient : public DBusClient { // the DBus method call succeeded, and two std::strings that constitute // the return value from the DBus method. virtual void GetFilterConfigOEM( - uint32 speaker_id, + uint32_t speaker_id, const TwoStringDBusMethodCallback& callback) = 0; // Calls SetFilterConfigOEM method. @@ -132,7 +134,7 @@ class CHROMEOS_EXPORT AudioDspClient : public DBusClient { // Calls SetSourceType method. // |callback| will be called with a DBusMethodCallStatus indicating whether // the DBus method call succeeded. - virtual void SetSourceType(uint16 source_type, + virtual void SetSourceType(uint16_t source_type, const VoidDBusMethodCallback& callback) = 0; // Calls AmplifierVolumeChanged method. diff --git a/chromeos/dbus/audio_node.cc b/chromeos/dbus/audio_node.cc index c29ffb8..17dd697 100644 --- a/chromeos/dbus/audio_node.cc +++ b/chromeos/dbus/audio_node.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/audio_node.h" +#include <stdint.h> + #include "base/format_macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" @@ -18,20 +20,19 @@ AudioNode::AudioNode() } AudioNode::AudioNode(bool is_input, - uint64 id, + uint64_t id, std::string device_name, std::string type, std::string name, bool active, - uint64 plugged_time) + uint64_t plugged_time) : is_input(is_input), id(id), device_name(device_name), type(type), name(name), active(active), - plugged_time(plugged_time) { -} + plugged_time(plugged_time) {} AudioNode::~AudioNode() {} diff --git a/chromeos/dbus/audio_node.h b/chromeos/dbus/audio_node.h index ea48c00..5bc9fcf 100644 --- a/chromeos/dbus/audio_node.h +++ b/chromeos/dbus/audio_node.h @@ -5,10 +5,11 @@ #ifndef CHROMEOS_DBUS_AUDIO_NODE_H_ #define CHROMEOS_DBUS_AUDIO_NODE_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "chromeos/chromeos_export.h" namespace chromeos { @@ -16,23 +17,23 @@ namespace chromeos { // Structure to hold AudioNode data received from cras. struct CHROMEOS_EXPORT AudioNode { bool is_input; - uint64 id; + uint64_t id; std::string device_name; std::string type; std::string name; std::string mic_positions; bool active; // Time that the node was plugged in. - uint64 plugged_time; + uint64_t plugged_time; AudioNode(); AudioNode(bool is_input, - uint64 id, + uint64_t id, std::string device_name, std::string type, std::string name, bool active, - uint64 plugged_time); + uint64_t plugged_time); ~AudioNode(); std::string ToString() const; }; diff --git a/chromeos/dbus/blocking_method_caller.h b/chromeos/dbus/blocking_method_caller.h index 6291f47..5d7db29 100644 --- a/chromeos/dbus/blocking_method_caller.h +++ b/chromeos/dbus/blocking_method_caller.h @@ -6,6 +6,7 @@ #define CHROMEOS_DBUS_BLOCKING_METHOD_CALLER_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/synchronization/waitable_event.h" #include "chromeos/chromeos_export.h" #include "dbus/message.h" diff --git a/chromeos/dbus/cras_audio_client.cc b/chromeos/dbus/cras_audio_client.cc index e8c3a8b..651ba44 100644 --- a/chromeos/dbus/cras_audio_client.cc +++ b/chromeos/dbus/cras_audio_client.cc @@ -4,8 +4,11 @@ #include "chromeos/dbus/cras_audio_client.h" +#include <stdint.h> + #include "base/bind.h" #include "base/format_macros.h" +#include "base/macros.h" #include "base/strings/stringprintf.h" #include "dbus/bus.h" #include "dbus/message.h" @@ -62,7 +65,7 @@ class CrasAudioClientImpl : public CrasAudioClient { weak_ptr_factory_.GetWeakPtr(), error_callback)); } - void SetOutputNodeVolume(uint64 node_id, int32 volume) override { + void SetOutputNodeVolume(uint64_t node_id, int32_t volume) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetOutputNodeVolume); dbus::MessageWriter writer(&method_call); @@ -85,7 +88,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - void SetInputNodeGain(uint64 node_id, int32 input_gain) override { + void SetInputNodeGain(uint64_t node_id, int32_t input_gain) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetInputNodeGain); dbus::MessageWriter writer(&method_call); @@ -108,7 +111,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - void SetActiveOutputNode(uint64 node_id) override { + void SetActiveOutputNode(uint64_t node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetActiveOutputNode); dbus::MessageWriter writer(&method_call); @@ -119,7 +122,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - void SetActiveInputNode(uint64 node_id) override { + void SetActiveInputNode(uint64_t node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetActiveInputNode); dbus::MessageWriter writer(&method_call); @@ -130,7 +133,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - void AddActiveInputNode(uint64 node_id) override { + void AddActiveInputNode(uint64_t node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kAddActiveInputNode); dbus::MessageWriter writer(&method_call); @@ -141,7 +144,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - void RemoveActiveInputNode(uint64 node_id) override { + void RemoveActiveInputNode(uint64_t node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kRemoveActiveInputNode); dbus::MessageWriter writer(&method_call); @@ -152,7 +155,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - void AddActiveOutputNode(uint64 node_id) override { + void AddActiveOutputNode(uint64_t node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kAddActiveOutputNode); dbus::MessageWriter writer(&method_call); @@ -162,7 +165,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - void RemoveActiveOutputNode(uint64 node_id) override { + void RemoveActiveOutputNode(uint64_t node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kRemoveActiveOutputNode); dbus::MessageWriter writer(&method_call); @@ -172,7 +175,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - void SwapLeftRight(uint64 node_id, bool swap) override { + void SwapLeftRight(uint64_t node_id, bool swap) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSwapLeftRight); dbus::MessageWriter writer(&method_call); @@ -283,7 +286,7 @@ class CrasAudioClientImpl : public CrasAudioClient { void ActiveOutputNodeChangedReceived(dbus::Signal* signal) { dbus::MessageReader reader(signal); - uint64 node_id; + uint64_t node_id; if (!reader.PopUint64(&node_id)) { LOG(ERROR) << "Error reading signal from cras:" << signal->ToString(); @@ -293,7 +296,7 @@ class CrasAudioClientImpl : public CrasAudioClient { void ActiveInputNodeChangedReceived(dbus::Signal* signal) { dbus::MessageReader reader(signal); - uint64 node_id; + uint64_t node_id; if (!reader.PopUint64(&node_id)) { LOG(ERROR) << "Error reading signal from cras:" << signal->ToString(); @@ -442,11 +445,9 @@ void CrasAudioClient::Observer::InputMuteChanged(bool mute_on) { void CrasAudioClient::Observer::NodesChanged() { } -void CrasAudioClient::Observer::ActiveOutputNodeChanged(uint64 node_id){ -} +void CrasAudioClient::Observer::ActiveOutputNodeChanged(uint64_t node_id) {} -void CrasAudioClient::Observer::ActiveInputNodeChanged(uint64 node_id) { -} +void CrasAudioClient::Observer::ActiveInputNodeChanged(uint64_t node_id) {} CrasAudioClient::CrasAudioClient() { } diff --git a/chromeos/dbus/cras_audio_client.h b/chromeos/dbus/cras_audio_client.h index 4b2d7eb..0eff85d 100644 --- a/chromeos/dbus/cras_audio_client.h +++ b/chromeos/dbus/cras_audio_client.h @@ -5,7 +5,10 @@ #ifndef CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ #define CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ +#include <stdint.h> + #include "base/callback.h" +#include "base/macros.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/audio_node.h" @@ -34,10 +37,10 @@ class CHROMEOS_EXPORT CrasAudioClient : public DBusClient { virtual void NodesChanged(); // Called when active audio output node changed to new node with |node_id|. - virtual void ActiveOutputNodeChanged(uint64 node_id); + virtual void ActiveOutputNodeChanged(uint64_t node_id); // Called when active audio input node changed to new node with |node_id|. - virtual void ActiveInputNodeChanged(uint64 node_id); + virtual void ActiveInputNodeChanged(uint64_t node_id); protected: virtual ~Observer(); @@ -77,50 +80,50 @@ class CHROMEOS_EXPORT CrasAudioClient : public DBusClient { // Sets output volume of the given |node_id| to |volume|, in the rage of // [0, 100]. - virtual void SetOutputNodeVolume(uint64 node_id, int32 volume) = 0; + virtual void SetOutputNodeVolume(uint64_t node_id, int32_t volume) = 0; // Sets output mute from user action. virtual void SetOutputUserMute(bool mute_on) = 0; // Sets input gain of the given |node_id| to |gain|, in the range of // [0, 100]. - virtual void SetInputNodeGain(uint64 node_id, int32 gain) = 0; + virtual void SetInputNodeGain(uint64_t node_id, int32_t gain) = 0; // Sets input mute state to |mute_on| value. virtual void SetInputMute(bool mute_on) = 0; // Sets the active output node to |node_id|. - virtual void SetActiveOutputNode(uint64 node_id) = 0; + virtual void SetActiveOutputNode(uint64_t node_id) = 0; // Sets the primary active input node to |node_id|. - virtual void SetActiveInputNode(uint64 node_id) = 0; + virtual void SetActiveInputNode(uint64_t node_id) = 0; // Adds input node |node_id| to the active input list. This is used to add // an additional active input node besides the one set by SetActiveInputNode. // Note that this action will not trigger an ActiveInputNodeChanged event and // nothing will happen if the |node_id| has already been set as active. - virtual void AddActiveInputNode(uint64 node_id) = 0; + virtual void AddActiveInputNode(uint64_t node_id) = 0; // Removes input node |node_id| from the active input list. This is used for // removing an active input node added by AddActiveInputNode. - virtual void RemoveActiveInputNode(uint64 node_id) = 0; + virtual void RemoveActiveInputNode(uint64_t node_id) = 0; // Adds input node |node_id| to the active outputs list. This is used to add // an additional active output node besides the one set by SetActiveInputNode. // Note that this action will not trigger an ActiveOutputNodeChanged event // and nothing will happen if the |node_id| has already been set as active. - virtual void AddActiveOutputNode(uint64 node_id) = 0; + virtual void AddActiveOutputNode(uint64_t node_id) = 0; // Removes output node |node_id| from the active output list. This is used for // removing an active output node added by AddActiveOutputNode. - virtual void RemoveActiveOutputNode(uint64 node_id) = 0; + virtual void RemoveActiveOutputNode(uint64_t node_id) = 0; // Swaps the left and right channel of the primary active output device. // Swap the left and right channel if |swap| is true; otherwise, swap the left // and right channel back to the normal mode. // The dbus message will be dropped if this feature is not supported on the // |node_id|. - virtual void SwapLeftRight(uint64 node_id, bool swap) = 0; + virtual void SwapLeftRight(uint64_t node_id, bool swap) = 0; // Creates the instance. static CrasAudioClient* Create(); diff --git a/chromeos/dbus/cros_disks_client.cc b/chromeos/dbus/cros_disks_client.cc index fafbdec..eee2f72 100644 --- a/chromeos/dbus/cros_disks_client.cc +++ b/chromeos/dbus/cros_disks_client.cc @@ -4,12 +4,16 @@ #include "chromeos/dbus/cros_disks_client.h" +#include <stddef.h> +#include <stdint.h> + #include <map> #include "base/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/location.h" +#include "base/macros.h" #include "base/stl_util.h" #include "base/strings/stringprintf.h" #include "base/sys_info.h" @@ -44,14 +48,14 @@ const char kLazyUnmountOption[] = "lazy"; const char kMountLabelOption[] = "mountlabel"; // Checks if retrieved media type is in boundaries of DeviceMediaType. -bool IsValidMediaType(uint32 type) { - return type < static_cast<uint32>(cros_disks::DEVICE_MEDIA_NUM_VALUES); +bool IsValidMediaType(uint32_t type) { + return type < static_cast<uint32_t>(cros_disks::DEVICE_MEDIA_NUM_VALUES); } // Translates enum used in cros-disks to enum used in Chrome. // Note that we could just do static_cast, but this is less sensitive to // changes in cros-disks. -DeviceType DeviceMediaTypeToDeviceType(uint32 media_type_uint32) { +DeviceType DeviceMediaTypeToDeviceType(uint32_t media_type_uint32) { if (!IsValidMediaType(media_type_uint32)) return DEVICE_TYPE_UNKNOWN; @@ -77,9 +81,9 @@ DeviceType DeviceMediaTypeToDeviceType(uint32 media_type_uint32) { } bool ReadMountEntryFromDbus(dbus::MessageReader* reader, MountEntry* entry) { - uint32 error_code = 0; + uint32_t error_code = 0; std::string source_path; - uint32 mount_type = 0; + uint32_t mount_type = 0; std::string mount_path; if (!reader->PopUint32(&error_code) || !reader->PopString(&source_path) || @@ -310,7 +314,7 @@ class CrosDisksClientImpl : public CrosDisksClient { // make this fail if reader is not able to read the error code value from // the response. dbus::MessageReader reader(response); - uint32 error_code = 0; + uint32_t error_code = 0; if (reader.PopUint32(&error_code) && static_cast<MountError>(error_code) != MOUNT_ERROR_NONE) { error_callback.Run(); @@ -426,7 +430,7 @@ class CrosDisksClientImpl : public CrosDisksClient { // Handles FormatCompleted signal and calls |handler|. void OnFormatCompleted(FormatCompletedHandler handler, dbus::Signal* signal) { dbus::MessageReader reader(signal); - uint32 error_code = 0; + uint32_t error_code = 0; std::string device_path; if (!reader.PopUint32(&error_code) || !reader.PopString(&device_path)) { LOG(ERROR) << "Invalid signal: " << signal->ToString(); @@ -519,7 +523,7 @@ DiskInfo::~DiskInfo() { // } // dict entry { // string "DeviceMediaType" -// variant uint32 1 +// variant uint32_t 1 // } // dict entry { // string "DeviceMountPaths" @@ -532,7 +536,7 @@ DiskInfo::~DiskInfo() { // } // dict entry { // string "DeviceSize" -// variant uint64 7998537728 +// variant uint64_t 7998537728 // } // dict entry { // string "DriveIsRotational" @@ -606,15 +610,16 @@ void DiskInfo::InitializeFromResponse(dbus::Response* response) { properties->GetStringWithoutPathExpansion(cros_disks::kIdLabel, &label_); properties->GetStringWithoutPathExpansion(cros_disks::kIdUuid, &uuid_); - // dbus::PopDataAsValue() pops uint64 as double. - // The top 11 bits of uint64 are dropped by the use of double. But, this works + // dbus::PopDataAsValue() pops uint64_t as double. + // The top 11 bits of uint64_t are dropped by the use of double. But, this + // works // unless the size exceeds 8 PB. double device_size_double = 0; if (properties->GetDoubleWithoutPathExpansion(cros_disks::kDeviceSize, &device_size_double)) total_size_in_bytes_ = device_size_double; - // dbus::PopDataAsValue() pops uint32 as double. + // dbus::PopDataAsValue() pops uint32_t as double. double media_type_double = 0; if (properties->GetDoubleWithoutPathExpansion(cros_disks::kDeviceMediaType, &media_type_double)) diff --git a/chromeos/dbus/cros_disks_client.h b/chromeos/dbus/cros_disks_client.h index 840b295..f5d01084 100644 --- a/chromeos/dbus/cros_disks_client.h +++ b/chromeos/dbus/cros_disks_client.h @@ -5,11 +5,13 @@ #ifndef CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_ #define CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/dbus_client_implementation_type.h" @@ -153,7 +155,7 @@ class CHROMEOS_EXPORT DiskInfo { DeviceType device_type() const { return device_type_; } // Total size of the disk in bytes. - uint64 total_size_in_bytes() const { return total_size_in_bytes_; } + uint64_t total_size_in_bytes() const { return total_size_in_bytes_; } // Is the device read-only. bool is_read_only() const { return is_read_only_; } @@ -183,7 +185,7 @@ class CHROMEOS_EXPORT DiskInfo { std::string product_name_; std::string drive_model_; DeviceType device_type_; - uint64 total_size_in_bytes_; + uint64_t total_size_in_bytes_; bool is_read_only_; bool is_hidden_; std::string uuid_; diff --git a/chromeos/dbus/cros_disks_client_unittest.cc b/chromeos/dbus/cros_disks_client_unittest.cc index fc4c23f..82dbf33 100644 --- a/chromeos/dbus/cros_disks_client_unittest.cc +++ b/chromeos/dbus/cros_disks_client_unittest.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/cros_disks_client.h" +#include <stdint.h> + #include "base/memory/scoped_ptr.h" #include "dbus/message.h" #include "testing/gtest/include/gtest/gtest.h" @@ -45,10 +47,10 @@ TEST(CrosDisksClientTest, DiskInfo) { const bool kDeviceIsOnBootDevice = true; const bool kDeviceIsOnRemovableDevice = true; const bool kDeviceIsReadOnly = true; - const uint32 kDeviceMediaType = cros_disks::DEVICE_MEDIA_SD; + const uint32_t kDeviceMediaType = cros_disks::DEVICE_MEDIA_SD; const std::string kMountPath = "/media/removable/UNTITLED"; const bool kDevicePresentationHide = false; - const uint64 kDeviceSize = 16005464064; + const uint64_t kDeviceSize = 16005464064; const std::string kDriveModel = "DriveModel"; const std::string kIdLabel = "UNTITLED"; const std::string kIdUuid = "XXXX-YYYY"; diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc index e816b91..c2b3e82 100644 --- a/chromeos/dbus/cryptohome_client.cc +++ b/chromeos/dbus/cryptohome_client.cc @@ -4,8 +4,12 @@ #include "chromeos/dbus/cryptohome_client.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" #include "chromeos/cryptohome/async_method_caller.h" @@ -349,7 +353,7 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. bool InstallAttributesGet(const std::string& name, - std::vector<uint8>* value, + std::vector<uint8_t>* value, bool* successful) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeInstallAttributesGet); @@ -360,7 +364,7 @@ class CryptohomeClientImpl : public CryptohomeClient { if (!response.get()) return false; dbus::MessageReader reader(response.get()); - const uint8* bytes = NULL; + const uint8_t* bytes = NULL; size_t length = 0; if (!reader.PopArrayOfBytes(&bytes, &length) || !reader.PopBool(successful)) @@ -371,7 +375,7 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. bool InstallAttributesSet(const std::string& name, - const std::vector<uint8>& value, + const std::vector<uint8_t>& value, bool* successful) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeInstallAttributesSet); @@ -457,7 +461,7 @@ class CryptohomeClientImpl : public CryptohomeClient { dbus::MessageWriter writer(&method_call); writer.AppendInt32(pca_type); writer.AppendArrayOfBytes( - reinterpret_cast<const uint8*>(pca_response.data()), + reinterpret_cast<const uint8_t*>(pca_response.data()), pca_response.size()); proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs , base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall, @@ -498,7 +502,7 @@ class CryptohomeClientImpl : public CryptohomeClient { cryptohome::kCryptohomeAsyncTpmAttestationFinishCertRequest); dbus::MessageWriter writer(&method_call); writer.AppendArrayOfBytes( - reinterpret_cast<const uint8*>(pca_response.data()), + reinterpret_cast<const uint8_t*>(pca_response.data()), pca_response.size()); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); @@ -604,13 +608,13 @@ class CryptohomeClientImpl : public CryptohomeClient { writer.AppendString(user_id); writer.AppendString(key_name); writer.AppendString(domain); - writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(device_id.data()), - device_id.size()); + writer.AppendArrayOfBytes( + reinterpret_cast<const uint8_t*>(device_id.data()), device_id.size()); bool include_signed_public_key = (options & attestation::CHALLENGE_INCLUDE_SIGNED_PUBLIC_KEY); writer.AppendBool(include_signed_public_key); - writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(challenge.data()), - challenge.size()); + writer.AppendArrayOfBytes( + reinterpret_cast<const uint8_t*>(challenge.data()), challenge.size()); proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs , base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall, weak_ptr_factory_.GetWeakPtr(), @@ -632,8 +636,8 @@ class CryptohomeClientImpl : public CryptohomeClient { writer.AppendBool(is_user_specific); writer.AppendString(user_id); writer.AppendString(key_name); - writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(challenge.data()), - challenge.size()); + writer.AppendArrayOfBytes( + reinterpret_cast<const uint8_t*>(challenge.data()), challenge.size()); proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs , base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall, weak_ptr_factory_.GetWeakPtr(), @@ -675,7 +679,7 @@ class CryptohomeClientImpl : public CryptohomeClient { writer.AppendBool(is_user_specific); writer.AppendString(user_id); writer.AppendString(key_name); - writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(payload.data()), + writer.AppendArrayOfBytes(reinterpret_cast<const uint8_t*>(payload.data()), payload.size()); CallBoolMethod(&method_call, callback); } @@ -901,18 +905,18 @@ class CryptohomeClientImpl : public CryptohomeClient { void OnGetSystemSalt(const GetSystemSaltCallback& callback, dbus::Response* response) { if (!response) { - callback.Run(DBUS_METHOD_CALL_FAILURE, std::vector<uint8>()); + callback.Run(DBUS_METHOD_CALL_FAILURE, std::vector<uint8_t>()); return; } dbus::MessageReader reader(response); - const uint8* bytes = NULL; + const uint8_t* bytes = NULL; size_t length = 0; if (!reader.PopArrayOfBytes(&bytes, &length)) { - callback.Run(DBUS_METHOD_CALL_FAILURE, std::vector<uint8>()); + callback.Run(DBUS_METHOD_CALL_FAILURE, std::vector<uint8_t>()); return; } callback.Run(DBUS_METHOD_CALL_SUCCESS, - std::vector<uint8>(bytes, bytes + length)); + std::vector<uint8_t>(bytes, bytes + length)); } // Calls a method without result values. @@ -995,7 +999,7 @@ class CryptohomeClientImpl : public CryptohomeClient { return; } dbus::MessageReader reader(response); - const uint8* data_buffer = NULL; + const uint8_t* data_buffer = NULL; size_t data_length = 0; bool result = false; if (!reader.PopArrayOfBytes(&data_buffer, &data_length) || @@ -1084,7 +1088,7 @@ class CryptohomeClientImpl : public CryptohomeClient { dbus::MessageReader reader(signal); int async_id = 0; bool return_status = false; - const uint8* return_data_buffer = NULL; + const uint8_t* return_data_buffer = NULL; size_t return_data_length = 0; if (!reader.PopInt32(&async_id) || !reader.PopBool(&return_status) || diff --git a/chromeos/dbus/cryptohome_client.h b/chromeos/dbus/cryptohome_client.h index 8f9a5dc..09116e3 100644 --- a/chromeos/dbus/cryptohome_client.h +++ b/chromeos/dbus/cryptohome_client.h @@ -5,11 +5,13 @@ #ifndef CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/attestation/attestation_constants.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" @@ -56,9 +58,9 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { // A callback to handle responses of AsyncXXX methods. typedef base::Callback<void(int async_id)> AsyncMethodCallback; // A callback for GetSystemSalt(). - typedef base::Callback<void( - DBusMethodCallStatus call_status, - const std::vector<uint8>& system_salt)> GetSystemSaltCallback; + typedef base::Callback<void(DBusMethodCallStatus call_status, + const std::vector<uint8_t>& system_salt)> + GetSystemSaltCallback; // A callback for WaitForServiceToBeAvailable(). typedef base::Callback<void(bool service_is_ready)> WaitForServiceToBeAvailableCallback; @@ -250,13 +252,13 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { // This method blocks until the call returns. // The original content of |value| is lost. virtual bool InstallAttributesGet(const std::string& name, - std::vector<uint8>* value, + std::vector<uint8_t>* value, bool* successful) = 0; // Calls InstallAttributesSet method and returns true when the call succeeds. // This method blocks until the call returns. virtual bool InstallAttributesSet(const std::string& name, - const std::vector<uint8>& value, + const std::vector<uint8_t>& value, bool* successful) = 0; // Calls InstallAttributesFinalize method and returns true when the call diff --git a/chromeos/dbus/dbus_client.h b/chromeos/dbus/dbus_client.h index d52de3e..07e6914 100644 --- a/chromeos/dbus/dbus_client.h +++ b/chromeos/dbus/dbus_client.h @@ -5,7 +5,6 @@ #ifndef CHROMEOS_DBUS_DBUS_CLIENT_H_ #define CHROMEOS_DBUS_DBUS_CLIENT_H_ -#include "base/basictypes.h" namespace dbus { class Bus; diff --git a/chromeos/dbus/dbus_client_bundle.cc b/chromeos/dbus/dbus_client_bundle.cc index 87e6598..dbd2b27 100644 --- a/chromeos/dbus/dbus_client_bundle.cc +++ b/chromeos/dbus/dbus_client_bundle.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/dbus_client_bundle.h" +#include <stddef.h> + #include <vector> #include "base/command_line.h" diff --git a/chromeos/dbus/dbus_client_bundle.h b/chromeos/dbus/dbus_client_bundle.h index ea39ad9..478a5d5 100644 --- a/chromeos/dbus/dbus_client_bundle.h +++ b/chromeos/dbus/dbus_client_bundle.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/dbus/dbus_client_bundle_unittest.cc b/chromeos/dbus/dbus_client_bundle_unittest.cc index e7f63bd..bfc439b 100644 --- a/chromeos/dbus/dbus_client_bundle_unittest.cc +++ b/chromeos/dbus/dbus_client_bundle_unittest.cc @@ -4,7 +4,6 @@ #include "chromeos/dbus/dbus_client_bundle.h" -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h index 83f3c26..4566083 100644 --- a/chromeos/dbus/dbus_thread_manager.h +++ b/chromeos/dbus/dbus_thread_manager.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc index b2f4acc..c0f05ff 100644 --- a/chromeos/dbus/debug_daemon_client.cc +++ b/chromeos/dbus/debug_daemon_client.cc @@ -5,6 +5,8 @@ #include "chromeos/dbus/debug_daemon_client.h" #include <fcntl.h> +#include <stddef.h> +#include <stdint.h> #include <unistd.h> #include <string> #include <vector> @@ -13,6 +15,7 @@ #include "base/bind_helpers.h" #include "base/files/file_path.h" #include "base/location.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/posix/eintr_wrapper.h" #include "base/strings/string_util.h" @@ -464,18 +467,18 @@ class DebugDaemonClientImpl : public DebugDaemonClient { if (!reader.PopInt32(&status)) return; - const uint8* buffer = nullptr; + const uint8_t* buffer = nullptr; size_t buf_size = 0; if (!reader.PopArrayOfBytes(&buffer, &buf_size)) return; - std::vector<uint8> perf_data; + std::vector<uint8_t> perf_data; if (buf_size > 0) perf_data.insert(perf_data.end(), buffer, buffer + buf_size); if (!reader.PopArrayOfBytes(&buffer, &buf_size)) return; - std::vector<uint8> perf_stat; + std::vector<uint8_t> perf_stat; if (buf_size > 0) perf_stat.insert(perf_stat.end(), buffer, buffer + buf_size); @@ -533,7 +536,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { if (callback.is_null()) return; - int32 feature_mask = DEV_FEATURE_NONE; + int32_t feature_mask = DEV_FEATURE_NONE; if (!response || !dbus::MessageReader(response).PopInt32(&feature_mask)) { callback.Run(false, debugd::DevFeatureFlag::DEV_FEATURES_DISABLED); return; diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h index a11d6ec..51d5331 100644 --- a/chromeos/dbus/debug_daemon_client.h +++ b/chromeos/dbus/debug_daemon_client.h @@ -5,10 +5,13 @@ #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ +#include <stdint.h> + #include <map> #include "base/callback.h" #include "base/files/file.h" +#include "base/macros.h" #include "base/memory/ref_counted_memory.h" #include "base/task_runner.h" #include "base/trace_event/tracing_agent.h" @@ -94,8 +97,8 @@ class CHROMEOS_EXPORT DebugDaemonClient // - Output from "perf stat", in PerfStatProto format. using GetPerfOutputCallback = base::Callback<void(int status, - const std::vector<uint8>& perf_data, - const std::vector<uint8>& perf_stat)>; + const std::vector<uint8_t>& perf_data, + const std::vector<uint8_t>& perf_stat)>; // Runs perf with arguments for |duration| seconds and returns data collected. virtual void GetPerfOutput(uint32_t duration, diff --git a/chromeos/dbus/easy_unlock_client.cc b/chromeos/dbus/easy_unlock_client.cc index c05b257..df0a510 100644 --- a/chromeos/dbus/easy_unlock_client.cc +++ b/chromeos/dbus/easy_unlock_client.cc @@ -4,10 +4,14 @@ #include "chromeos/dbus/easy_unlock_client.h" +#include <stddef.h> +#include <stdint.h> + #include <vector> #include "base/bind.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "dbus/bus.h" #include "dbus/message.h" #include "dbus/object_path.h" @@ -20,7 +24,7 @@ namespace { // Reads array of bytes from a dbus message reader and converts it to string. std::string PopResponseData(dbus::MessageReader* reader) { - const uint8* bytes = NULL; + const uint8_t* bytes = NULL; size_t length = 0; if (!reader->PopArrayOfBytes(&bytes, &length)) return ""; @@ -31,7 +35,7 @@ std::string PopResponseData(dbus::MessageReader* reader) { // Converts string to array of bytes and writes it using dbus meddage writer. void AppendStringAsByteArray(const std::string& data, dbus::MessageWriter* writer) { - writer->AppendArrayOfBytes(reinterpret_cast<const uint8*>(data.data()), + writer->AppendArrayOfBytes(reinterpret_cast<const uint8_t*>(data.data()), data.length()); } diff --git a/chromeos/dbus/easy_unlock_client.h b/chromeos/dbus/easy_unlock_client.h index 56307318..9f233a3 100644 --- a/chromeos/dbus/easy_unlock_client.h +++ b/chromeos/dbus/easy_unlock_client.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" diff --git a/chromeos/dbus/fake_amplifier_client.h b/chromeos/dbus/fake_amplifier_client.h index 48d1bb6..f5b44fd 100644 --- a/chromeos/dbus/fake_amplifier_client.h +++ b/chromeos/dbus/fake_amplifier_client.h @@ -5,7 +5,7 @@ #ifndef CHROMEOS_DBUS_FAKE_AMPLIFIER_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_AMPLIFIER_CLIENT_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/amplifier_client.h" #include "chromeos/dbus/dbus_client.h" diff --git a/chromeos/dbus/fake_ap_manager_client.h b/chromeos/dbus/fake_ap_manager_client.h index 24b8cc6..4998167 100644 --- a/chromeos/dbus/fake_ap_manager_client.h +++ b/chromeos/dbus/fake_ap_manager_client.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "chromeos/dbus/ap_manager_client.h" namespace chromeos { diff --git a/chromeos/dbus/fake_audio_dsp_client.cc b/chromeos/dbus/fake_audio_dsp_client.cc index f58b9f7..55e9fda 100644 --- a/chromeos/dbus/fake_audio_dsp_client.cc +++ b/chromeos/dbus/fake_audio_dsp_client.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/fake_audio_dsp_client.h" +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" #include "base/single_thread_task_runner.h" @@ -106,7 +108,7 @@ void FakeAudioDspClient::GetCapabilitiesOEM( } void FakeAudioDspClient::SetCapabilitiesOEM( - uint32 speaker_id, + uint32_t speaker_id, const std::string& speaker_capabilities, const std::string& driver_capabilities, const VoidDBusMethodCallback& callback) { @@ -115,7 +117,7 @@ void FakeAudioDspClient::SetCapabilitiesOEM( } void FakeAudioDspClient::GetFilterConfigOEM( - uint32 speaker_id, + uint32_t speaker_id, const TwoStringDBusMethodCallback& callback) { base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::Bind(&OnTwoStringDBusMethod, callback)); @@ -129,7 +131,7 @@ void FakeAudioDspClient::SetFilterConfigOEM( FROM_HERE, base::Bind(&OnVoidDBusMethod, callback)); } -void FakeAudioDspClient::SetSourceType(uint16 source_type, +void FakeAudioDspClient::SetSourceType(uint16_t source_type, const VoidDBusMethodCallback& callback) { base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::Bind(&OnVoidDBusMethod, callback)); diff --git a/chromeos/dbus/fake_audio_dsp_client.h b/chromeos/dbus/fake_audio_dsp_client.h index 05181ca..7bdab2a0 100644 --- a/chromeos/dbus/fake_audio_dsp_client.h +++ b/chromeos/dbus/fake_audio_dsp_client.h @@ -5,7 +5,9 @@ #ifndef CHROMEOS_DBUS_FAKE_AUDIO_DSP_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_AUDIO_DSP_CLIENT_H_ -#include "base/basictypes.h" +#include <stdint.h> + +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/audio_dsp_client.h" #include "chromeos/dbus/dbus_client.h" @@ -36,16 +38,16 @@ class CHROMEOS_EXPORT FakeAudioDspClient : public AudioDspClient { void GetBass(const DoubleDBusMethodCallback& callback) override; void GetCapabilitiesOEM( const ThreeStringDBusMethodCallback& callback) override; - void SetCapabilitiesOEM(uint32 speaker_id, + void SetCapabilitiesOEM(uint32_t speaker_id, const std::string& speaker_capabilities, const std::string& driver_capabilities, const VoidDBusMethodCallback& callback) override; - void GetFilterConfigOEM(uint32 speaker_id, + void GetFilterConfigOEM(uint32_t speaker_id, const TwoStringDBusMethodCallback& callback) override; void SetFilterConfigOEM(const std::string& speaker_config, const std::string& driver_config, const VoidDBusMethodCallback& callback) override; - void SetSourceType(uint16 source_type, + void SetSourceType(uint16_t source_type, const VoidDBusMethodCallback& callback) override; void AmplifierVolumeChanged(double db_spl, const VoidDBusMethodCallback& callback) override; diff --git a/chromeos/dbus/fake_cras_audio_client.cc b/chromeos/dbus/fake_cras_audio_client.cc index e28852b..f2e0a6142 100644 --- a/chromeos/dbus/fake_cras_audio_client.cc +++ b/chromeos/dbus/fake_cras_audio_client.cc @@ -98,7 +98,8 @@ void FakeCrasAudioClient::GetNodes(const GetNodesCallback& callback, callback.Run(node_list_, true); } -void FakeCrasAudioClient::SetOutputNodeVolume(uint64 node_id, int32 volume) {} +void FakeCrasAudioClient::SetOutputNodeVolume(uint64_t node_id, + int32_t volume) {} void FakeCrasAudioClient::SetOutputUserMute(bool mute_on) { volume_state_.output_user_mute = mute_on; @@ -106,7 +107,8 @@ void FakeCrasAudioClient::SetOutputUserMute(bool mute_on) { OutputMuteChanged(volume_state_.output_user_mute)); } -void FakeCrasAudioClient::SetInputNodeGain(uint64 node_id, int32 input_gain) {} +void FakeCrasAudioClient::SetInputNodeGain(uint64_t node_id, + int32_t input_gain) {} void FakeCrasAudioClient::SetInputMute(bool mute_on) { volume_state_.input_mute = mute_on; @@ -114,7 +116,7 @@ void FakeCrasAudioClient::SetInputMute(bool mute_on) { InputMuteChanged(volume_state_.input_mute)); } -void FakeCrasAudioClient::SetActiveOutputNode(uint64 node_id) { +void FakeCrasAudioClient::SetActiveOutputNode(uint64_t node_id) { if (active_output_node_id_ == node_id) return; @@ -128,7 +130,7 @@ void FakeCrasAudioClient::SetActiveOutputNode(uint64 node_id) { FOR_EACH_OBSERVER(Observer, observers_, ActiveOutputNodeChanged(node_id)); } -void FakeCrasAudioClient::SetActiveInputNode(uint64 node_id) { +void FakeCrasAudioClient::SetActiveInputNode(uint64_t node_id) { if (active_input_node_id_ == node_id) return; @@ -142,31 +144,30 @@ void FakeCrasAudioClient::SetActiveInputNode(uint64 node_id) { FOR_EACH_OBSERVER(Observer, observers_, ActiveInputNodeChanged(node_id)); } -void FakeCrasAudioClient::AddActiveInputNode(uint64 node_id) { +void FakeCrasAudioClient::AddActiveInputNode(uint64_t node_id) { for (size_t i = 0; i < node_list_.size(); ++i) { if (node_list_[i].id == node_id) node_list_[i].active = true; } } -void FakeCrasAudioClient::RemoveActiveInputNode(uint64 node_id) { +void FakeCrasAudioClient::RemoveActiveInputNode(uint64_t node_id) { for (size_t i = 0; i < node_list_.size(); ++i) { if (node_list_[i].id == node_id) node_list_[i].active = false; } } -void FakeCrasAudioClient::SwapLeftRight(uint64 node_id, bool swap) { -} +void FakeCrasAudioClient::SwapLeftRight(uint64_t node_id, bool swap) {} -void FakeCrasAudioClient::AddActiveOutputNode(uint64 node_id) { +void FakeCrasAudioClient::AddActiveOutputNode(uint64_t node_id) { for (size_t i = 0; i < node_list_.size(); ++i) { if (node_list_[i].id == node_id) node_list_[i].active = true; } } -void FakeCrasAudioClient::RemoveActiveOutputNode(uint64 node_id) { +void FakeCrasAudioClient::RemoveActiveOutputNode(uint64_t node_id) { for (size_t i = 0; i < node_list_.size(); ++i) { if (node_list_[i].id == node_id) node_list_[i].active = false; @@ -182,7 +183,7 @@ void FakeCrasAudioClient::InsertAudioNodeToList(const AudioNode& audio_node) { FOR_EACH_OBSERVER(Observer, observers_, NodesChanged()); } -void FakeCrasAudioClient::RemoveAudioNodeFromList(const uint64& node_id) { +void FakeCrasAudioClient::RemoveAudioNodeFromList(const uint64_t& node_id) { auto iter = FindNode(node_id); if (iter != node_list_.end()) { node_list_.erase(iter); @@ -201,7 +202,7 @@ void FakeCrasAudioClient::SetAudioNodesAndNotifyObserversForTesting( FOR_EACH_OBSERVER(Observer, observers_, NodesChanged()); } -AudioNodeList::iterator FakeCrasAudioClient::FindNode(uint64 node_id) { +AudioNodeList::iterator FakeCrasAudioClient::FindNode(uint64_t node_id) { return std::find_if( node_list_.begin(), node_list_.end(), [node_id](const AudioNode& node) { return node_id == node.id; }); diff --git a/chromeos/dbus/fake_cras_audio_client.h b/chromeos/dbus/fake_cras_audio_client.h index cb15ab6..7ba80ab 100644 --- a/chromeos/dbus/fake_cras_audio_client.h +++ b/chromeos/dbus/fake_cras_audio_client.h @@ -5,6 +5,9 @@ #ifndef CHROMEOS_DBUS_FAKE_CRAS_AUDIO_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_CRAS_AUDIO_CLIENT_H_ +#include <stdint.h> + +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/cras_audio_client.h" @@ -26,17 +29,17 @@ class CHROMEOS_EXPORT FakeCrasAudioClient : public CrasAudioClient { void GetVolumeState(const GetVolumeStateCallback& callback) override; void GetNodes(const GetNodesCallback& callback, const ErrorCallback& error_callback) override; - void SetOutputNodeVolume(uint64 node_id, int32 volume) override; + void SetOutputNodeVolume(uint64_t node_id, int32_t volume) override; void SetOutputUserMute(bool mute_on) override; - void SetInputNodeGain(uint64 node_id, int32 gain) override; + void SetInputNodeGain(uint64_t node_id, int32_t gain) override; void SetInputMute(bool mute_on) override; - void SetActiveOutputNode(uint64 node_id) override; - void SetActiveInputNode(uint64 node_id) override; - void AddActiveInputNode(uint64 node_id) override; - void RemoveActiveInputNode(uint64 node_id) override; - void AddActiveOutputNode(uint64 node_id) override; - void RemoveActiveOutputNode(uint64 node_id) override; - void SwapLeftRight(uint64 node_id, bool swap) override; + void SetActiveOutputNode(uint64_t node_id) override; + void SetActiveInputNode(uint64_t node_id) override; + void AddActiveInputNode(uint64_t node_id) override; + void RemoveActiveInputNode(uint64_t node_id) override; + void AddActiveOutputNode(uint64_t node_id) override; + void RemoveActiveOutputNode(uint64_t node_id) override; + void SwapLeftRight(uint64_t node_id, bool swap) override; // Modifies an AudioNode from |node_list_| based on |audio_node.id|. // if the |audio_node.id| cannot be found in list, Add an @@ -44,7 +47,7 @@ class CHROMEOS_EXPORT FakeCrasAudioClient : public CrasAudioClient { void InsertAudioNodeToList(const AudioNode& audio_node); // Removes an AudioNode from |node_list_| based on |node_id|. - void RemoveAudioNodeFromList(const uint64& node_id); + void RemoveAudioNodeFromList(const uint64_t& node_id); // Updates |node_list_| to contain |audio_nodes|. void SetAudioNodesForTesting(const AudioNodeList& audio_nodes); @@ -54,17 +57,19 @@ class CHROMEOS_EXPORT FakeCrasAudioClient : public CrasAudioClient { const AudioNodeList& new_nodes); const AudioNodeList& node_list() const { return node_list_; } - const uint64& active_input_node_id() const { return active_input_node_id_; } - const uint64& active_output_node_id() const { return active_output_node_id_; } + const uint64_t& active_input_node_id() const { return active_input_node_id_; } + const uint64_t& active_output_node_id() const { + return active_output_node_id_; + } private: // Find a node in the list based on the id. - AudioNodeList::iterator FindNode(uint64 node_id); + AudioNodeList::iterator FindNode(uint64_t node_id); VolumeState volume_state_; AudioNodeList node_list_; - uint64 active_input_node_id_; - uint64 active_output_node_id_; + uint64_t active_input_node_id_; + uint64_t active_output_node_id_; base::ObserverList<Observer> observers_; DISALLOW_COPY_AND_ASSIGN(FakeCrasAudioClient); diff --git a/chromeos/dbus/fake_cryptohome_client.cc b/chromeos/dbus/fake_cryptohome_client.cc index 8b64fd9..236b1f9 100644 --- a/chromeos/dbus/fake_cryptohome_client.cc +++ b/chromeos/dbus/fake_cryptohome_client.cc @@ -4,6 +4,9 @@ #include "chromeos/dbus/fake_cryptohome_client.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/files/file_util.h" #include "base/location.h" @@ -231,8 +234,8 @@ void FakeCryptohomeClient::Pkcs11GetTpmTokenInfoForUser( } bool FakeCryptohomeClient::InstallAttributesGet(const std::string& name, - std::vector<uint8>* value, - bool* successful) { + std::vector<uint8_t>* value, + bool* successful) { if (install_attrs_.find(name) != install_attrs_.end()) { *value = install_attrs_[name]; *successful = true; @@ -245,7 +248,7 @@ bool FakeCryptohomeClient::InstallAttributesGet(const std::string& name, bool FakeCryptohomeClient::InstallAttributesSet( const std::string& name, - const std::vector<uint8>& value, + const std::vector<uint8_t>& value, bool* successful) { install_attrs_[name] = value; *successful = true; @@ -280,7 +283,7 @@ bool FakeCryptohomeClient::InstallAttributesFinalize(bool* successful) { const int kVarLengthTag1 = (1 << 3) | 0x2; const int kVarLengthTag2 = (2 << 3) | 0x2; - typedef std::map<std::string, std::vector<uint8> >::const_iterator Iter; + typedef std::map<std::string, std::vector<uint8_t>>::const_iterator Iter; for (Iter it = install_attrs_.begin(); it != install_attrs_.end(); ++it) { std::string attr; { @@ -552,10 +555,10 @@ void FakeCryptohomeClient::SetServiceIsAvailable(bool is_available) { } // static -std::vector<uint8> FakeCryptohomeClient::GetStubSystemSalt() { +std::vector<uint8_t> FakeCryptohomeClient::GetStubSystemSalt() { const char kStubSystemSalt[] = "stub_system_salt"; - return std::vector<uint8>(kStubSystemSalt, - kStubSystemSalt + arraysize(kStubSystemSalt) - 1); + return std::vector<uint8_t>(kStubSystemSalt, + kStubSystemSalt + arraysize(kStubSystemSalt) - 1); } void FakeCryptohomeClient::ReturnProtobufMethodCallback( diff --git a/chromeos/dbus/fake_cryptohome_client.h b/chromeos/dbus/fake_cryptohome_client.h index 7064a2e..801faaf 100644 --- a/chromeos/dbus/fake_cryptohome_client.h +++ b/chromeos/dbus/fake_cryptohome_client.h @@ -5,9 +5,11 @@ #ifndef CHROMEOS_DBUS_FAKE_CRYPTOHOME_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_CRYPTOHOME_CLIENT_H_ +#include <stdint.h> + #include <map> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chromeos/dbus/cryptohome_client.h" @@ -71,10 +73,10 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient { const std::string& username, const Pkcs11GetTpmTokenInfoCallback& callback) override; bool InstallAttributesGet(const std::string& name, - std::vector<uint8>* value, + std::vector<uint8_t>* value, bool* successful) override; bool InstallAttributesSet(const std::string& name, - const std::vector<uint8>& value, + const std::vector<uint8_t>& value, bool* successful) override; bool InstallAttributesFinalize(bool* successful) override; void InstallAttributesIsReady( @@ -195,13 +197,13 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient { // Sets the system salt which will be returned from GetSystemSalt(). By // default, GetSystemSalt() returns the value generated by // GetStubSystemSalt(). - void set_system_salt(const std::vector<uint8>& system_salt) { + void set_system_salt(const std::vector<uint8_t>& system_salt) { system_salt_ = system_salt; } // Returns the stub system salt as raw bytes. (not as a string encoded in the // format used by SystemSaltGetter::ConvertRawSaltToHexString()). - static std::vector<uint8> GetStubSystemSalt(); + static std::vector<uint8_t> GetStubSystemSalt(); private: void ReturnProtobufMethodCallback( @@ -221,14 +223,14 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient { AsyncCallStatusHandler async_call_status_handler_; AsyncCallStatusWithDataHandler async_call_status_data_handler_; bool unmount_result_; - std::vector<uint8> system_salt_; + std::vector<uint8_t> system_salt_; std::vector<WaitForServiceToBeAvailableCallback> pending_wait_for_service_to_be_available_callbacks_; // A stub store for InstallAttributes, mapping an attribute name to the // associated data blob. Used to implement InstallAttributesSet and -Get. - std::map<std::string, std::vector<uint8> > install_attrs_; + std::map<std::string, std::vector<uint8_t>> install_attrs_; bool locked_; base::WeakPtrFactory<FakeCryptohomeClient> weak_ptr_factory_; diff --git a/chromeos/dbus/fake_debug_daemon_client.cc b/chromeos/dbus/fake_debug_daemon_client.cc index bdfa7aa..a2952ec 100644 --- a/chromeos/dbus/fake_debug_daemon_client.cc +++ b/chromeos/dbus/fake_debug_daemon_client.cc @@ -4,6 +4,9 @@ #include "chromeos/dbus/fake_debug_daemon_client.h" +#include <stddef.h> +#include <stdint.h> + #include <map> #include <string> @@ -106,8 +109,8 @@ void FakeDebugDaemonClient::GetPerfOutput( const std::vector<std::string>& perf_args, const GetPerfOutputCallback& callback) { int status = 0; - std::vector<uint8> perf_data; - std::vector<uint8> perf_stat; + std::vector<uint8_t> perf_data; + std::vector<uint8_t> perf_stat; base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::Bind(callback, status, perf_data, perf_stat)); } diff --git a/chromeos/dbus/fake_debug_daemon_client.h b/chromeos/dbus/fake_debug_daemon_client.h index 9c02fe2..a75edbf3 100644 --- a/chromeos/dbus/fake_debug_daemon_client.h +++ b/chromeos/dbus/fake_debug_daemon_client.h @@ -5,10 +5,12 @@ #ifndef CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "chromeos/dbus/debug_daemon_client.h" namespace chromeos { diff --git a/chromeos/dbus/fake_easy_unlock_client.h b/chromeos/dbus/fake_easy_unlock_client.h index 4f56b78..e94cc54 100644 --- a/chromeos/dbus/fake_easy_unlock_client.h +++ b/chromeos/dbus/fake_easy_unlock_client.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "chromeos/dbus/easy_unlock_client.h" namespace chromeos { diff --git a/chromeos/dbus/fake_gsm_sms_client.cc b/chromeos/dbus/fake_gsm_sms_client.cc index ba1286b..8806988 100644 --- a/chromeos/dbus/fake_gsm_sms_client.cc +++ b/chromeos/dbus/fake_gsm_sms_client.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" #include "base/single_thread_task_runner.h" @@ -45,7 +47,7 @@ void FakeGsmSMSClient::ResetSmsReceivedHandler( void FakeGsmSMSClient::Delete(const std::string& service_name, const dbus::ObjectPath& object_path, - uint32 index, + uint32_t index, const DeleteCallback& callback) { message_list_.Remove(index, NULL); callback.Run(); @@ -53,7 +55,7 @@ void FakeGsmSMSClient::Delete(const std::string& service_name, void FakeGsmSMSClient::Get(const std::string& service_name, const dbus::ObjectPath& object_path, - uint32 index, + uint32_t index, const GetCallback& callback) { base::DictionaryValue* dictionary = NULL; if (message_list_.GetDictionary(index, &dictionary)) { diff --git a/chromeos/dbus/fake_gsm_sms_client.h b/chromeos/dbus/fake_gsm_sms_client.h index 69a3ebe..0df9c12 100644 --- a/chromeos/dbus/fake_gsm_sms_client.h +++ b/chromeos/dbus/fake_gsm_sms_client.h @@ -5,8 +5,11 @@ #ifndef CHROMEOS_DBUS_FAKE_GSM_SMS_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_GSM_SMS_CLIENT_H_ +#include <stdint.h> + #include <string> +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/values.h" #include "chromeos/dbus/gsm_sms_client.h" @@ -29,11 +32,11 @@ class CHROMEOS_EXPORT FakeGsmSMSClient : public GsmSMSClient { const dbus::ObjectPath& object_path) override; void Delete(const std::string& service_name, const dbus::ObjectPath& object_path, - uint32 index, + uint32_t index, const DeleteCallback& callback) override; void Get(const std::string& service_name, const dbus::ObjectPath& object_path, - uint32 index, + uint32_t index, const GetCallback& callback) override; void List(const std::string& service_name, const dbus::ObjectPath& object_path, diff --git a/chromeos/dbus/fake_image_burner_client.h b/chromeos/dbus/fake_image_burner_client.h index 0941706..69a041e 100644 --- a/chromeos/dbus/fake_image_burner_client.h +++ b/chromeos/dbus/fake_image_burner_client.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "chromeos/dbus/image_burner_client.h" namespace chromeos { diff --git a/chromeos/dbus/fake_introspectable_client.h b/chromeos/dbus/fake_introspectable_client.h index d16a6cb..6525ec8 100644 --- a/chromeos/dbus/fake_introspectable_client.h +++ b/chromeos/dbus/fake_introspectable_client.h @@ -5,7 +5,6 @@ #ifndef CHROMEOS_DBUS_FAKE_INTROSPECTABLE_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_INTROSPECTABLE_CLIENT_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "chromeos/dbus/introspectable_client.h" diff --git a/chromeos/dbus/fake_lorgnette_manager_client.h b/chromeos/dbus/fake_lorgnette_manager_client.h index a5fde7c..3fd8b27 100644 --- a/chromeos/dbus/fake_lorgnette_manager_client.h +++ b/chromeos/dbus/fake_lorgnette_manager_client.h @@ -5,8 +5,8 @@ #ifndef CHROMEOS_DBUS_FAKE_LORGNETTE_MANAGER_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_LORGNETTE_MANAGER_CLIENT_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "chromeos/dbus/lorgnette_manager_client.h" namespace chromeos { diff --git a/chromeos/dbus/fake_modem_messaging_client.h b/chromeos/dbus/fake_modem_messaging_client.h index 8cfb17b..a01e528 100644 --- a/chromeos/dbus/fake_modem_messaging_client.h +++ b/chromeos/dbus/fake_modem_messaging_client.h @@ -5,8 +5,8 @@ #ifndef CHROMEOS_DBUS_FAKE_MODEM_MESSAGING_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_MODEM_MESSAGING_CLIENT_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/modem_messaging_client.h" diff --git a/chromeos/dbus/fake_nfc_adapter_client.h b/chromeos/dbus/fake_nfc_adapter_client.h index 21e76bd..460c945 100644 --- a/chromeos/dbus/fake_nfc_adapter_client.h +++ b/chromeos/dbus/fake_nfc_adapter_client.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/dbus/fake_nfc_device_client.h b/chromeos/dbus/fake_nfc_device_client.h index 67d691c..ccb2cef 100644 --- a/chromeos/dbus/fake_nfc_device_client.h +++ b/chromeos/dbus/fake_nfc_device_client.h @@ -5,6 +5,7 @@ #ifndef CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/dbus/fake_nfc_manager_client.h b/chromeos/dbus/fake_nfc_manager_client.h index 1f3f394..48ed90d 100644 --- a/chromeos/dbus/fake_nfc_manager_client.h +++ b/chromeos/dbus/fake_nfc_manager_client.h @@ -8,6 +8,7 @@ #include <set> #include <string> +#include "base/macros.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/nfc_manager_client.h" diff --git a/chromeos/dbus/fake_nfc_record_client.cc b/chromeos/dbus/fake_nfc_record_client.cc index c16b300..33b2754 100644 --- a/chromeos/dbus/fake_nfc_record_client.cc +++ b/chromeos/dbus/fake_nfc_record_client.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/fake_nfc_record_client.h" +#include <stdint.h> + #include "base/logging.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/fake_nfc_device_client.h" @@ -295,7 +297,7 @@ bool FakeNfcRecordClient::WriteTagRecord( GetStringValue(attributes, nfc_record::kMimeTypeProperty)); tag_record_properties_->action.ReplaceValue( GetStringValue(attributes, nfc_record::kActionProperty)); - tag_record_properties_->size.ReplaceValue(static_cast<uint32>( + tag_record_properties_->size.ReplaceValue(static_cast<uint32_t>( GetDoubleValue(attributes, nfc_record::kSizeProperty))); SetTagRecordsVisible(false); diff --git a/chromeos/dbus/fake_nfc_record_client.h b/chromeos/dbus/fake_nfc_record_client.h index daa6e07..5bdd635 100644 --- a/chromeos/dbus/fake_nfc_record_client.h +++ b/chromeos/dbus/fake_nfc_record_client.h @@ -5,6 +5,7 @@ #ifndef CHROMEOS_DBUS_FAKE_NFC_RECORD_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_NFC_RECORD_CLIENT_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "base/values.h" diff --git a/chromeos/dbus/fake_nfc_tag_client.h b/chromeos/dbus/fake_nfc_tag_client.h index 96f2ec8..40d79cd 100644 --- a/chromeos/dbus/fake_nfc_tag_client.h +++ b/chromeos/dbus/fake_nfc_tag_client.h @@ -5,6 +5,7 @@ #ifndef CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_ +#include "base/macros.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/nfc_client_helpers.h" diff --git a/chromeos/dbus/fake_peer_daemon_manager_client.h b/chromeos/dbus/fake_peer_daemon_manager_client.h index c2c2717..9d02c6b 100644 --- a/chromeos/dbus/fake_peer_daemon_manager_client.h +++ b/chromeos/dbus/fake_peer_daemon_manager_client.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "chromeos/dbus/peer_daemon_manager_client.h" namespace chromeos { diff --git a/chromeos/dbus/fake_permission_broker_client.cc b/chromeos/dbus/fake_permission_broker_client.cc index e011366..ace3479 100644 --- a/chromeos/dbus/fake_permission_broker_client.cc +++ b/chromeos/dbus/fake_permission_broker_client.cc @@ -5,6 +5,7 @@ #include "chromeos/dbus/fake_permission_broker_client.h" #include <fcntl.h> +#include <stdint.h> #include "base/bind.h" #include "base/callback.h" @@ -69,7 +70,7 @@ void FakePermissionBrokerClient::OpenPath(const std::string& path, } void FakePermissionBrokerClient::RequestTcpPortAccess( - uint16 port, + uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback) { @@ -78,7 +79,7 @@ void FakePermissionBrokerClient::RequestTcpPortAccess( } void FakePermissionBrokerClient::RequestUdpPortAccess( - uint16 port, + uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback) { @@ -87,14 +88,14 @@ void FakePermissionBrokerClient::RequestUdpPortAccess( } void FakePermissionBrokerClient::ReleaseTcpPort( - uint16 port, + uint16_t port, const std::string& interface, const ResultCallback& callback) { callback.Run(true); } void FakePermissionBrokerClient::ReleaseUdpPort( - uint16 port, + uint16_t port, const std::string& interface, const ResultCallback& callback) { callback.Run(true); diff --git a/chromeos/dbus/fake_permission_broker_client.h b/chromeos/dbus/fake_permission_broker_client.h index 6a1ddee..b34d5c3 100644 --- a/chromeos/dbus/fake_permission_broker_client.h +++ b/chromeos/dbus/fake_permission_broker_client.h @@ -5,8 +5,10 @@ #ifndef CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ -#include "base/basictypes.h" +#include <stdint.h> + #include "base/compiler_specific.h" +#include "base/macros.h" #include "chromeos/dbus/permission_broker_client.h" namespace chromeos { @@ -25,18 +27,18 @@ class CHROMEOS_EXPORT FakePermissionBrokerClient const ResultCallback& callback) override; void OpenPath(const std::string& path, const OpenPathCallback& callback) override; - void RequestTcpPortAccess(uint16 port, + void RequestTcpPortAccess(uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback) override; - void RequestUdpPortAccess(uint16 port, + void RequestUdpPortAccess(uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback) override; - void ReleaseTcpPort(uint16 port, + void ReleaseTcpPort(uint16_t port, const std::string& interface, const ResultCallback& callback) override; - void ReleaseUdpPort(uint16 port, + void ReleaseUdpPort(uint16_t port, const std::string& interface, const ResultCallback& callback) override; diff --git a/chromeos/dbus/fake_power_manager_client.h b/chromeos/dbus/fake_power_manager_client.h index 1746a0d..c2aac63 100644 --- a/chromeos/dbus/fake_power_manager_client.h +++ b/chromeos/dbus/fake_power_manager_client.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/chromeos/dbus/fake_power_manager_client_unittest.cc b/chromeos/dbus/fake_power_manager_client_unittest.cc index 021459e..1249077 100644 --- a/chromeos/dbus/fake_power_manager_client_unittest.cc +++ b/chromeos/dbus/fake_power_manager_client_unittest.cc @@ -4,7 +4,6 @@ #include "chromeos/dbus/fake_power_manager_client.h" -#include "base/basictypes.h" #include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" diff --git a/chromeos/dbus/fake_privet_daemon_manager_client.h b/chromeos/dbus/fake_privet_daemon_manager_client.h index f8d219c..d580832 100644 --- a/chromeos/dbus/fake_privet_daemon_manager_client.h +++ b/chromeos/dbus/fake_privet_daemon_manager_client.h @@ -5,6 +5,7 @@ #ifndef CHROMEOS_DBUS_FAKE_PRIVET_DAEMON_MANAGER_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_PRIVET_DAEMON_MANAGER_CLIENT_H_ +#include "base/macros.h" #include "chromeos/dbus/privet_daemon_manager_client.h" namespace chromeos { diff --git a/chromeos/dbus/fake_session_manager_client.h b/chromeos/dbus/fake_session_manager_client.h index 2a96cd3..b281847 100644 --- a/chromeos/dbus/fake_session_manager_client.h +++ b/chromeos/dbus/fake_session_manager_client.h @@ -9,8 +9,8 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/observer_list.h" #include "chromeos/dbus/session_manager_client.h" diff --git a/chromeos/dbus/fake_shill_device_client.h b/chromeos/dbus/fake_shill_device_client.h index 4dc0b54..56b9cf4 100644 --- a/chromeos/dbus/fake_shill_device_client.h +++ b/chromeos/dbus/fake_shill_device_client.h @@ -9,7 +9,7 @@ #include <set> #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/shill_device_client.h" diff --git a/chromeos/dbus/fake_shill_ipconfig_client.h b/chromeos/dbus/fake_shill_ipconfig_client.h index 6552079..ba05a95 100644 --- a/chromeos/dbus/fake_shill_ipconfig_client.h +++ b/chromeos/dbus/fake_shill_ipconfig_client.h @@ -7,7 +7,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/shill_ipconfig_client.h" diff --git a/chromeos/dbus/fake_shill_manager_client.cc b/chromeos/dbus/fake_shill_manager_client.cc index c50841f..9fe00b1 100644 --- a/chromeos/dbus/fake_shill_manager_client.cc +++ b/chromeos/dbus/fake_shill_manager_client.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/fake_shill_manager_client.h" +#include <stddef.h> + #include "base/bind.h" #include "base/command_line.h" #include "base/location.h" diff --git a/chromeos/dbus/fake_shill_manager_client.h b/chromeos/dbus/fake_shill_manager_client.h index f677350..de47691 100644 --- a/chromeos/dbus/fake_shill_manager_client.h +++ b/chromeos/dbus/fake_shill_manager_client.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/shill_manager_client.h" diff --git a/chromeos/dbus/fake_shill_profile_client.h b/chromeos/dbus/fake_shill_profile_client.h index 8c33bfb..3db52af 100644 --- a/chromeos/dbus/fake_shill_profile_client.h +++ b/chromeos/dbus/fake_shill_profile_client.h @@ -8,7 +8,7 @@ #include <map> #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/shill_manager_client.h" #include "chromeos/dbus/shill_profile_client.h" diff --git a/chromeos/dbus/fake_shill_service_client.h b/chromeos/dbus/fake_shill_service_client.h index a9af512..8c13358 100644 --- a/chromeos/dbus/fake_shill_service_client.h +++ b/chromeos/dbus/fake_shill_service_client.h @@ -8,8 +8,8 @@ #include <map> #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/shill_service_client.h" diff --git a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc index b68d0b3..702da0f 100644 --- a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc +++ b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h" +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" #include "base/single_thread_task_runner.h" diff --git a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.h b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.h index 18a3f21..69981c1 100644 --- a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.h +++ b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.h @@ -7,6 +7,7 @@ #include <stdint.h> +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/shill_third_party_vpn_driver_client.h" diff --git a/chromeos/dbus/fake_sms_client.h b/chromeos/dbus/fake_sms_client.h index c682e2b..cbb6ba1 100644 --- a/chromeos/dbus/fake_sms_client.h +++ b/chromeos/dbus/fake_sms_client.h @@ -5,8 +5,8 @@ #ifndef CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chromeos/dbus/sms_client.h" diff --git a/chromeos/dbus/fake_system_clock_client.cc b/chromeos/dbus/fake_system_clock_client.cc index b2ee3c6..565a314 100644 --- a/chromeos/dbus/fake_system_clock_client.cc +++ b/chromeos/dbus/fake_system_clock_client.cc @@ -25,8 +25,7 @@ bool FakeSystemClockClient::HasObserver(const Observer* observer) const { return false; } -void FakeSystemClockClient::SetTime(int64 time_in_seconds) { -} +void FakeSystemClockClient::SetTime(int64_t time_in_seconds) {} bool FakeSystemClockClient::CanSetTime() { return true; diff --git a/chromeos/dbus/fake_system_clock_client.h b/chromeos/dbus/fake_system_clock_client.h index 6f5f847..1750515 100644 --- a/chromeos/dbus/fake_system_clock_client.h +++ b/chromeos/dbus/fake_system_clock_client.h @@ -5,6 +5,9 @@ #ifndef CHROMEOS_DBUS_FAKE_SYSTEM_CLOCK_CLIENT_H_ #define CHROMEOS_DBUS_FAKE_SYSTEM_CLOCK_CLIENT_H_ +#include <stdint.h> + +#include "base/macros.h" #include "chromeos/dbus/system_clock_client.h" namespace chromeos { @@ -20,7 +23,7 @@ class CHROMEOS_EXPORT FakeSystemClockClient : public SystemClockClient { void AddObserver(Observer* observer) override; void RemoveObserver(Observer* observer) override; bool HasObserver(const Observer* observer) const override; - void SetTime(int64 time_in_seconds) override; + void SetTime(int64_t time_in_seconds) override; bool CanSetTime() override; private: diff --git a/chromeos/dbus/gsm_sms_client.cc b/chromeos/dbus/gsm_sms_client.cc index 4ca1b43..c694bb0 100644 --- a/chromeos/dbus/gsm_sms_client.cc +++ b/chromeos/dbus/gsm_sms_client.cc @@ -3,11 +3,14 @@ // found in the LICENSE file. #include "chromeos/dbus/gsm_sms_client.h" +#include <stdint.h> + #include <map> #include <utility> #include <vector> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" @@ -57,7 +60,7 @@ class SMSProxy { } // Calls Delete method. - void Delete(uint32 index, const DeleteCallback& callback) { + void Delete(uint32_t index, const DeleteCallback& callback) { dbus::MethodCall method_call(modemmanager::kModemManagerSMSInterface, modemmanager::kSMSDeleteFunction); dbus::MessageWriter writer(&method_call); @@ -69,7 +72,7 @@ class SMSProxy { } // Calls Get method. - void Get(uint32 index, const GetCallback& callback) { + void Get(uint32_t index, const GetCallback& callback) { dbus::MethodCall method_call(modemmanager::kModemManagerSMSInterface, modemmanager::kSMSGetFunction); dbus::MessageWriter writer(&method_call); @@ -93,7 +96,7 @@ class SMSProxy { private: // Handles SmsReceived signal. void OnSmsReceived(dbus::Signal* signal) { - uint32 index = 0; + uint32_t index = 0; bool complete = false; dbus::MessageReader reader(signal); if (!reader.PopUint32(&index) || @@ -179,7 +182,7 @@ class GsmSMSClientImpl : public GsmSMSClient { // GsmSMSClient override. void Delete(const std::string& service_name, const dbus::ObjectPath& object_path, - uint32 index, + uint32_t index, const DeleteCallback& callback) override { GetProxy(service_name, object_path)->Delete(index, callback); } @@ -187,7 +190,7 @@ class GsmSMSClientImpl : public GsmSMSClient { // GsmSMSClient override. void Get(const std::string& service_name, const dbus::ObjectPath& object_path, - uint32 index, + uint32_t index, const GetCallback& callback) override { GetProxy(service_name, object_path)->Get(index, callback); } diff --git a/chromeos/dbus/gsm_sms_client.h b/chromeos/dbus/gsm_sms_client.h index afbae38..01327e7 100644 --- a/chromeos/dbus/gsm_sms_client.h +++ b/chromeos/dbus/gsm_sms_client.h @@ -5,10 +5,12 @@ #ifndef CHROMEOS_DBUS_GSM_SMS_CLIENT_H_ #define CHROMEOS_DBUS_GSM_SMS_CLIENT_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" @@ -29,7 +31,8 @@ namespace chromeos { // initializes the DBusThreadManager instance. class CHROMEOS_EXPORT GsmSMSClient : public DBusClient { public: - typedef base::Callback<void(uint32 index, bool complete)> SmsReceivedHandler; + typedef base::Callback<void(uint32_t index, bool complete)> + SmsReceivedHandler; typedef base::Callback<void()> DeleteCallback; typedef base::Callback<void(const base::DictionaryValue& sms)> GetCallback; typedef base::Callback<void(const base::ListValue& result)> ListCallback; @@ -52,13 +55,13 @@ class CHROMEOS_EXPORT GsmSMSClient : public DBusClient { // Calls Delete method. |callback| is called after the method call succeeds. virtual void Delete(const std::string& service_name, const dbus::ObjectPath& object_path, - uint32 index, + uint32_t index, const DeleteCallback& callback) = 0; // Calls Get method. |callback| is called after the method call succeeds. virtual void Get(const std::string& service_name, const dbus::ObjectPath& object_path, - uint32 index, + uint32_t index, const GetCallback& callback) = 0; // Calls List method. |callback| is called after the method call succeeds. diff --git a/chromeos/dbus/gsm_sms_client_unittest.cc b/chromeos/dbus/gsm_sms_client_unittest.cc index 8b0c46f..66ec8d2 100644 --- a/chromeos/dbus/gsm_sms_client_unittest.cc +++ b/chromeos/dbus/gsm_sms_client_unittest.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/gsm_sms_client.h" +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" #include "base/message_loop/message_loop.h" @@ -29,7 +31,7 @@ namespace { // A mock SmsReceivedHandler. class MockSmsReceivedHandler { public: - MOCK_METHOD2(Run, void(uint32 index, bool complete)); + MOCK_METHOD2(Run, void(uint32_t index, bool complete)); }; // A mock DeleteCallback. @@ -114,7 +116,7 @@ class GsmSMSClientTest : public testing::Test { EXPECT_EQ(modemmanager::kModemManagerSMSInterface, method_call->GetInterface()); EXPECT_EQ(modemmanager::kSMSDeleteFunction, method_call->GetMember()); - uint32 index = 0; + uint32_t index = 0; dbus::MessageReader reader(method_call); EXPECT_TRUE(reader.PopUint32(&index)); EXPECT_EQ(expected_index_, index); @@ -131,7 +133,7 @@ class GsmSMSClientTest : public testing::Test { EXPECT_EQ(modemmanager::kModemManagerSMSInterface, method_call->GetInterface()); EXPECT_EQ(modemmanager::kSMSGetFunction, method_call->GetMember()); - uint32 index = 0; + uint32_t index = 0; dbus::MessageReader reader(method_call); EXPECT_TRUE(reader.PopUint32(&index)); EXPECT_EQ(expected_index_, index); @@ -172,7 +174,7 @@ class GsmSMSClientTest : public testing::Test { // The SmsReceived signal handler given by the tested client. dbus::ObjectProxy::SignalCallback sms_received_callback_; // Expected argument for Delete and Get methods. - uint32 expected_index_; + uint32_t expected_index_; // Response returned by mock methods. dbus::Response* response_; // Expected result of Get and List methods. @@ -195,7 +197,7 @@ class GsmSMSClientTest : public testing::Test { TEST_F(GsmSMSClientTest, SmsReceived) { // Set expectations. - const uint32 kIndex = 42; + const uint32_t kIndex = 42; const bool kComplete = true; MockSmsReceivedHandler handler; EXPECT_CALL(handler, Run(kIndex, kComplete)).Times(1); @@ -223,7 +225,7 @@ TEST_F(GsmSMSClientTest, SmsReceived) { TEST_F(GsmSMSClientTest, Delete) { // Set expectations. - const uint32 kIndex = 42; + const uint32_t kIndex = 42; expected_index_ = kIndex; EXPECT_CALL(*mock_proxy_.get(), CallMethod(_, _, _)) .WillOnce(Invoke(this, &GsmSMSClientTest::OnDelete)); @@ -243,7 +245,7 @@ TEST_F(GsmSMSClientTest, Delete) { TEST_F(GsmSMSClientTest, Get) { // Set expectations. - const uint32 kIndex = 42; + const uint32_t kIndex = 42; expected_index_ = kIndex; EXPECT_CALL(*mock_proxy_.get(), CallMethod(_, _, _)) .WillOnce(Invoke(this, &GsmSMSClientTest::OnGet)); diff --git a/chromeos/dbus/image_burner_client.cc b/chromeos/dbus/image_burner_client.cc index 91ef3aa..2a2b22d 100644 --- a/chromeos/dbus/image_burner_client.cc +++ b/chromeos/dbus/image_burner_client.cc @@ -4,8 +4,11 @@ #include "chromeos/dbus/image_burner_client.h" +#include <stdint.h> + #include "base/bind.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "dbus/bus.h" #include "dbus/message.h" #include "dbus/object_path.h" @@ -102,8 +105,8 @@ class ImageBurnerClientImpl : public ImageBurnerClient { void OnBurnProgressUpdate(dbus::Signal* signal) { dbus::MessageReader reader(signal); std::string target_path; - int64 num_bytes_burnt; - int64 total_size; + int64_t num_bytes_burnt; + int64_t total_size; if (!reader.PopString(&target_path) || !reader.PopInt64(&num_bytes_burnt) || !reader.PopInt64(&total_size)) { diff --git a/chromeos/dbus/image_burner_client.h b/chromeos/dbus/image_burner_client.h index 0c3f573f..35d0653 100644 --- a/chromeos/dbus/image_burner_client.h +++ b/chromeos/dbus/image_burner_client.h @@ -5,10 +5,12 @@ #ifndef CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ #define CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" @@ -31,8 +33,8 @@ class CHROMEOS_EXPORT ImageBurnerClient : public DBusClient { // A callback to handle burn_progress_update signal. typedef base::Callback<void(const std::string& target_path, - int64 num_bytes_burnt, - int64 total_size)> BurnProgressUpdateHandler; + int64_t num_bytes_burnt, + int64_t total_size)> BurnProgressUpdateHandler; // Burns the image |from_path| to the disk |to_path|. virtual void BurnImage(const std::string& from_path, diff --git a/chromeos/dbus/introspectable_client.cc b/chromeos/dbus/introspectable_client.cc index 71508f2..8f7754b 100644 --- a/chromeos/dbus/introspectable_client.cc +++ b/chromeos/dbus/introspectable_client.cc @@ -7,6 +7,7 @@ #include "base/bind.h" #include "base/logging.h" +#include "base/macros.h" #include "dbus/bus.h" #include "dbus/message.h" #include "dbus/object_proxy.h" diff --git a/chromeos/dbus/introspectable_client.h b/chromeos/dbus/introspectable_client.h index 1a4edab..49693f2 100644 --- a/chromeos/dbus/introspectable_client.h +++ b/chromeos/dbus/introspectable_client.h @@ -9,6 +9,7 @@ #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "dbus/object_path.h" diff --git a/chromeos/dbus/lorgnette_manager_client.cc b/chromeos/dbus/lorgnette_manager_client.cc index d99f59b..55a1c34 100644 --- a/chromeos/dbus/lorgnette_manager_client.cc +++ b/chromeos/dbus/lorgnette_manager_client.cc @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/task_runner_util.h" #include "base/threading/worker_pool.h" diff --git a/chromeos/dbus/lorgnette_manager_client.h b/chromeos/dbus/lorgnette_manager_client.h index d36cd38..9aa0d9f 100644 --- a/chromeos/dbus/lorgnette_manager_client.h +++ b/chromeos/dbus/lorgnette_manager_client.h @@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/files/file.h" +#include "base/macros.h" #include "base/memory/ref_counted_memory.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" diff --git a/chromeos/dbus/mock_cryptohome_client.h b/chromeos/dbus/mock_cryptohome_client.h index 20ccbb5..4382d35 100644 --- a/chromeos/dbus/mock_cryptohome_client.h +++ b/chromeos/dbus/mock_cryptohome_client.h @@ -5,6 +5,8 @@ #ifndef CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_ #define CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_ +#include <stdint.h> + #include <string> #include "chromeos/dbus/cryptohome/rpc.pb.h" @@ -79,11 +81,11 @@ class MockCryptohomeClient : public CryptohomeClient { const Pkcs11GetTpmTokenInfoCallback& callback)); MOCK_METHOD3(InstallAttributesGet, bool(const std::string& name, - std::vector<uint8>* value, + std::vector<uint8_t>* value, bool* successful)); MOCK_METHOD3(InstallAttributesSet, bool(const std::string& name, - const std::vector<uint8>& value, + const std::vector<uint8_t>& value, bool* successful)); MOCK_METHOD1(InstallAttributesFinalize, bool(bool* successful)); MOCK_METHOD1(InstallAttributesIsReady, diff --git a/chromeos/dbus/mock_permission_broker_client.h b/chromeos/dbus/mock_permission_broker_client.h index d5c9c02..9e45a97 100644 --- a/chromeos/dbus/mock_permission_broker_client.h +++ b/chromeos/dbus/mock_permission_broker_client.h @@ -5,6 +5,8 @@ #ifndef CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_ #define CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_ +#include <stdint.h> + #include "chromeos/dbus/permission_broker_client.h" #include "testing/gmock/include/gmock/gmock.h" @@ -29,21 +31,21 @@ class MockPermissionBrokerClient : public PermissionBrokerClient { MOCK_METHOD2(OpenPath, void(const std::string& path, const OpenPathCallback& callback)); MOCK_METHOD4(RequestTcpPortAccess, - void(uint16 port, + void(uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback)); MOCK_METHOD4(RequestUdpPortAccess, - void(uint16 port, + void(uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback)); MOCK_METHOD3(ReleaseTcpPort, - void(uint16 port, + void(uint16_t port, const std::string& interface, const ResultCallback& callback)); MOCK_METHOD3(ReleaseUdpPort, - void(uint16 port, + void(uint16_t port, const std::string& interface, const ResultCallback& callback)); }; diff --git a/chromeos/dbus/modem_messaging_client.cc b/chromeos/dbus/modem_messaging_client.cc index e714542..4f5277a 100644 --- a/chromeos/dbus/modem_messaging_client.cc +++ b/chromeos/dbus/modem_messaging_client.cc @@ -7,6 +7,7 @@ #include <utility> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" diff --git a/chromeos/dbus/modem_messaging_client.h b/chromeos/dbus/modem_messaging_client.h index 879d0c2..9a9b0ae 100644 --- a/chromeos/dbus/modem_messaging_client.h +++ b/chromeos/dbus/modem_messaging_client.h @@ -8,8 +8,8 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" diff --git a/chromeos/dbus/nfc_adapter_client.cc b/chromeos/dbus/nfc_adapter_client.cc index 4cde7c6..6535aa0 100644 --- a/chromeos/dbus/nfc_adapter_client.cc +++ b/chromeos/dbus/nfc_adapter_client.cc @@ -8,6 +8,7 @@ #include <utility> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "base/strings/stringprintf.h" diff --git a/chromeos/dbus/nfc_adapter_client.h b/chromeos/dbus/nfc_adapter_client.h index 51cf24d..8c6b62f0 100644 --- a/chromeos/dbus/nfc_adapter_client.h +++ b/chromeos/dbus/nfc_adapter_client.h @@ -9,6 +9,7 @@ #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/nfc_client_helpers.h" diff --git a/chromeos/dbus/nfc_client_helpers.h b/chromeos/dbus/nfc_client_helpers.h index d50db07..d6b50e8 100644 --- a/chromeos/dbus/nfc_client_helpers.h +++ b/chromeos/dbus/nfc_client_helpers.h @@ -9,8 +9,8 @@ #include <string> #include <utility> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/values.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/nfc_property_set.h" diff --git a/chromeos/dbus/nfc_client_unittest.cc b/chromeos/dbus/nfc_client_unittest.cc index 12cb0b0..8b431e9 100644 --- a/chromeos/dbus/nfc_client_unittest.cc +++ b/chromeos/dbus/nfc_client_unittest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "base/bind.h" #include "base/location.h" #include "base/message_loop/message_loop.h" diff --git a/chromeos/dbus/nfc_device_client.cc b/chromeos/dbus/nfc_device_client.cc index c27396b..1e84048 100644 --- a/chromeos/dbus/nfc_device_client.cc +++ b/chromeos/dbus/nfc_device_client.cc @@ -5,6 +5,7 @@ #include "chromeos/dbus/nfc_device_client.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/strings/stringprintf.h" diff --git a/chromeos/dbus/nfc_device_client.h b/chromeos/dbus/nfc_device_client.h index db9b753..b694dd8 100644 --- a/chromeos/dbus/nfc_device_client.h +++ b/chromeos/dbus/nfc_device_client.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/values.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" diff --git a/chromeos/dbus/nfc_manager_client.cc b/chromeos/dbus/nfc_manager_client.cc index d35aadd..8029fd3 100644 --- a/chromeos/dbus/nfc_manager_client.cc +++ b/chromeos/dbus/nfc_manager_client.cc @@ -4,6 +4,7 @@ #include "chromeos/dbus/nfc_manager_client.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/chromeos/dbus/nfc_manager_client.h b/chromeos/dbus/nfc_manager_client.h index 7e62070..1ba39d4 100644 --- a/chromeos/dbus/nfc_manager_client.h +++ b/chromeos/dbus/nfc_manager_client.h @@ -7,6 +7,7 @@ #include <vector> +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/nfc_property_set.h" diff --git a/chromeos/dbus/nfc_property_set.h b/chromeos/dbus/nfc_property_set.h index 7aae766..ee18528 100644 --- a/chromeos/dbus/nfc_property_set.h +++ b/chromeos/dbus/nfc_property_set.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "dbus/message.h" #include "dbus/object_proxy.h" #include "dbus/property.h" diff --git a/chromeos/dbus/nfc_record_client.cc b/chromeos/dbus/nfc_record_client.cc index f462d69..b829516 100644 --- a/chromeos/dbus/nfc_record_client.cc +++ b/chromeos/dbus/nfc_record_client.cc @@ -5,6 +5,7 @@ #include "chromeos/dbus/nfc_record_client.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "chromeos/dbus/nfc_device_client.h" diff --git a/chromeos/dbus/nfc_record_client.h b/chromeos/dbus/nfc_record_client.h index 783258b..c602257 100644 --- a/chromeos/dbus/nfc_record_client.h +++ b/chromeos/dbus/nfc_record_client.h @@ -5,8 +5,11 @@ #ifndef CHROMEOS_DBUS_NFC_RECORD_CLIENT_H_ #define CHROMEOS_DBUS_NFC_RECORD_CLIENT_H_ +#include <stdint.h> + #include <string> +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/nfc_property_set.h" @@ -60,7 +63,7 @@ class CHROMEOS_EXPORT NfcRecordClient : public DBusClient { // the object or not. This is not a mandatory field and is only valid for // Smart Posters carrying a URI record. // Read-only. - dbus::Property<uint32> size; + dbus::Property<uint32_t> size; // The suggested course of action. This one is only valid for Smart Posters // and is a suggestion only. It can be ignored, and the possible values are diff --git a/chromeos/dbus/nfc_tag_client.cc b/chromeos/dbus/nfc_tag_client.cc index adbe0ae..f77b063 100644 --- a/chromeos/dbus/nfc_tag_client.cc +++ b/chromeos/dbus/nfc_tag_client.cc @@ -5,6 +5,7 @@ #include "chromeos/dbus/nfc_tag_client.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/strings/stringprintf.h" diff --git a/chromeos/dbus/nfc_tag_client.h b/chromeos/dbus/nfc_tag_client.h index 144f1de..72d8399 100644 --- a/chromeos/dbus/nfc_tag_client.h +++ b/chromeos/dbus/nfc_tag_client.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/values.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" diff --git a/chromeos/dbus/peer_daemon_manager_client.cc b/chromeos/dbus/peer_daemon_manager_client.cc index e30f294..caf0852 100644 --- a/chromeos/dbus/peer_daemon_manager_client.cc +++ b/chromeos/dbus/peer_daemon_manager_client.cc @@ -8,6 +8,7 @@ #include "base/callback.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/single_thread_task_runner.h" diff --git a/chromeos/dbus/peer_daemon_manager_client.h b/chromeos/dbus/peer_daemon_manager_client.h index a3cad81..08603de 100644 --- a/chromeos/dbus/peer_daemon_manager_client.h +++ b/chromeos/dbus/peer_daemon_manager_client.h @@ -5,6 +5,8 @@ #ifndef CHROMEOS_DBUS_PEER_DAEMON_MANAGER_CLIENT_H_ #define CHROMEOS_DBUS_PEER_DAEMON_MANAGER_CLIENT_H_ +#include <stdint.h> + #include <map> #include <string> #include <utility> diff --git a/chromeos/dbus/permission_broker_client.cc b/chromeos/dbus/permission_broker_client.cc index 4ba4d31..b862f75 100644 --- a/chromeos/dbus/permission_broker_client.cc +++ b/chromeos/dbus/permission_broker_client.cc @@ -4,7 +4,10 @@ #include "chromeos/dbus/permission_broker_client.h" +#include <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "dbus/bus.h" #include "dbus/message.h" @@ -63,7 +66,7 @@ class PermissionBrokerClientImpl : public PermissionBrokerClient { weak_ptr_factory_.GetWeakPtr(), callback)); } - void RequestTcpPortAccess(uint16 port, + void RequestTcpPortAccess(uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback) override { @@ -78,7 +81,7 @@ class PermissionBrokerClientImpl : public PermissionBrokerClient { weak_ptr_factory_.GetWeakPtr(), callback)); } - void RequestUdpPortAccess(uint16 port, + void RequestUdpPortAccess(uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback) override { @@ -93,7 +96,7 @@ class PermissionBrokerClientImpl : public PermissionBrokerClient { weak_ptr_factory_.GetWeakPtr(), callback)); } - void ReleaseTcpPort(uint16 port, + void ReleaseTcpPort(uint16_t port, const std::string& interface, const ResultCallback& callback) override { dbus::MethodCall method_call(kPermissionBrokerInterface, kReleaseTcpPort); @@ -105,7 +108,7 @@ class PermissionBrokerClientImpl : public PermissionBrokerClient { weak_ptr_factory_.GetWeakPtr(), callback)); } - void ReleaseUdpPort(uint16 port, + void ReleaseUdpPort(uint16_t port, const std::string& interface, const ResultCallback& callback) override { dbus::MethodCall method_call(kPermissionBrokerInterface, kReleaseUdpPort); diff --git a/chromeos/dbus/permission_broker_client.h b/chromeos/dbus/permission_broker_client.h index dd5ecca..87c24c8 100644 --- a/chromeos/dbus/permission_broker_client.h +++ b/chromeos/dbus/permission_broker_client.h @@ -5,10 +5,12 @@ #ifndef CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_ #define CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "dbus/file_descriptor.h" @@ -62,7 +64,7 @@ class CHROMEOS_EXPORT PermissionBrokerClient : public DBusClient { // connections received on |interface| (an empty string indicates all // interfaces). An open pipe must be passed as |lifeline_fd| so that the // permission broker can monitor the lifetime of the calling process. - virtual void RequestTcpPortAccess(uint16 port, + virtual void RequestTcpPortAccess(uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback) = 0; @@ -71,7 +73,7 @@ class CHROMEOS_EXPORT PermissionBrokerClient : public DBusClient { // received on |interface| (an empty string indicates all interfaces). An open // pipe must be passed as |lifeline_fd| so that the permission broker can // monitor the lifetime of the calling process. - virtual void RequestUdpPortAccess(uint16 port, + virtual void RequestUdpPortAccess(uint16_t port, const std::string& interface, const dbus::FileDescriptor& lifeline_fd, const ResultCallback& callback) = 0; @@ -79,14 +81,14 @@ class CHROMEOS_EXPORT PermissionBrokerClient : public DBusClient { // Releases a request for an open firewall port for TCP/IP connections. The // |port| and |interface| parameters must be the same as a previous call to // RequestTcpPortAccess. - virtual void ReleaseTcpPort(uint16 port, + virtual void ReleaseTcpPort(uint16_t port, const std::string& interface, const ResultCallback& callback) = 0; // Releases a request for an open firewall port for UDP packets. The |port| // and |interface| parameters must be the same as a previous call to // RequestUdpPortAccess. - virtual void ReleaseUdpPort(uint16 port, + virtual void ReleaseUdpPort(uint16_t port, const std::string& interface, const ResultCallback& callback) = 0; diff --git a/chromeos/dbus/pipe_reader.h b/chromeos/dbus/pipe_reader.h index ad52549..3c98457 100644 --- a/chromeos/dbus/pipe_reader.h +++ b/chromeos/dbus/pipe_reader.h @@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/files/file.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc index f0c10f6..88b9275 100644 --- a/chromeos/dbus/power_manager_client.cc +++ b/chromeos/dbus/power_manager_client.cc @@ -4,12 +4,15 @@ #include "chromeos/dbus/power_manager_client.h" +#include <stdint.h> + #include <algorithm> #include "base/bind.h" #include "base/command_line.h" #include "base/format_macros.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/observer_list.h" diff --git a/chromeos/dbus/power_manager_client.h b/chromeos/dbus/power_manager_client.h index 4e8b8c8..59bed6a 100644 --- a/chromeos/dbus/power_manager_client.h +++ b/chromeos/dbus/power_manager_client.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/dbus/power_policy_controller.cc b/chromeos/dbus/power_policy_controller.cc index 49c76c2..fbad6e1 100644 --- a/chromeos/dbus/power_policy_controller.cc +++ b/chromeos/dbus/power_policy_controller.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/power_policy_controller.h" +#include <stdint.h> + #include <utility> #include "base/format_macros.h" @@ -193,7 +195,7 @@ void PowerPolicyController::ApplyPrefs(const PrefValues& values) { // If auto screen-locking is enabled, ensure that the screen is locked soon // after it's turned off due to user inactivity. - int64 lock_ms = delays->screen_off_ms() + kScreenLockAfterOffDelayMs; + int64_t lock_ms = delays->screen_off_ms() + kScreenLockAfterOffDelayMs; if (values.enable_auto_screen_lock && delays->screen_off_ms() > 0 && (delays->screen_lock_ms() <= 0 || lock_ms < delays->screen_lock_ms()) && lock_ms < delays->idle_ms()) { diff --git a/chromeos/dbus/privet_daemon_manager_client.cc b/chromeos/dbus/privet_daemon_manager_client.cc index de61cc8..fb04d11 100644 --- a/chromeos/dbus/privet_daemon_manager_client.cc +++ b/chromeos/dbus/privet_daemon_manager_client.cc @@ -4,9 +4,13 @@ #include "chromeos/dbus/privet_daemon_manager_client.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/single_thread_task_runner.h" @@ -220,7 +224,7 @@ bool PrivetDaemonManagerClient::PairingInfoProperty::PopValueFromReader( value_.set_mode(string_value); } } else if (field_reader.GetDataSignature() == "ay") { - const uint8* bytes = nullptr; + const uint8_t* bytes = nullptr; size_t length = 0; if (!field_reader.PopArrayOfBytes(&bytes, &length)) return false; diff --git a/chromeos/dbus/privet_daemon_manager_client.h b/chromeos/dbus/privet_daemon_manager_client.h index 8c490d8..43d760c 100644 --- a/chromeos/dbus/privet_daemon_manager_client.h +++ b/chromeos/dbus/privet_daemon_manager_client.h @@ -5,6 +5,9 @@ #ifndef CHROMEOS_DBUS_PRIVET_DAEMON_MANAGER_CLIENT_H_ #define CHROMEOS_DBUS_PRIVET_DAEMON_MANAGER_CLIENT_H_ +#include <stddef.h> +#include <stdint.h> + #include <string> #include <vector> diff --git a/chromeos/dbus/privet_daemon_manager_client_unittest.cc b/chromeos/dbus/privet_daemon_manager_client_unittest.cc index 84f31d4..68c48ea 100644 --- a/chromeos/dbus/privet_daemon_manager_client_unittest.cc +++ b/chromeos/dbus/privet_daemon_manager_client_unittest.cc @@ -4,6 +4,9 @@ #include "chromeos/dbus/privet_daemon_manager_client.h" +#include <stddef.h> +#include <stdint.h> + #include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" #include "dbus/message.h" diff --git a/chromeos/dbus/services/console_service_provider.h b/chromeos/dbus/services/console_service_provider.h index fd9e2ab..69acd7c 100644 --- a/chromeos/dbus/services/console_service_provider.h +++ b/chromeos/dbus/services/console_service_provider.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/dbus/services/cros_dbus_service.cc b/chromeos/dbus/services/cros_dbus_service.cc index 0523c92..6f482ac 100644 --- a/chromeos/dbus/services/cros_dbus_service.cc +++ b/chromeos/dbus/services/cros_dbus_service.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/services/cros_dbus_service.h" +#include <stddef.h> + #include "base/bind.h" #include "base/stl_util.h" #include "base/sys_info.h" diff --git a/chromeos/dbus/services/display_power_service_provider.h b/chromeos/dbus/services/display_power_service_provider.h index bdfc093..e09648e 100644 --- a/chromeos/dbus/services/display_power_service_provider.h +++ b/chromeos/dbus/services/display_power_service_provider.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" diff --git a/chromeos/dbus/services/liveness_service_provider.h b/chromeos/dbus/services/liveness_service_provider.h index a261ff2..bfde770 100644 --- a/chromeos/dbus/services/liveness_service_provider.h +++ b/chromeos/dbus/services/liveness_service_provider.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/dbus/services/proxy_resolution_service_provider.cc b/chromeos/dbus/services/proxy_resolution_service_provider.cc index 1f5ec44..8c760aa 100644 --- a/chromeos/dbus/services/proxy_resolution_service_provider.cc +++ b/chromeos/dbus/services/proxy_resolution_service_provider.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/macros.h" #include "base/thread_task_runner_handle.h" #include "dbus/bus.h" #include "dbus/message.h" diff --git a/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc b/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc index ff0ce4d..7514380 100644 --- a/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc +++ b/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc @@ -5,6 +5,7 @@ #include "chromeos/dbus/services/proxy_resolution_service_provider.h" #include "base/bind.h" +#include "base/macros.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" diff --git a/chromeos/dbus/session_manager_client.cc b/chromeos/dbus/session_manager_client.cc index 23ef0f6..dd9c13a 100644 --- a/chromeos/dbus/session_manager_client.cc +++ b/chromeos/dbus/session_manager_client.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/session_manager_client.h" +#include <stddef.h> +#include <stdint.h> #include <sys/socket.h> #include "base/bind.h" @@ -11,6 +13,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/location.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" @@ -275,7 +278,8 @@ class SessionManagerClientImpl : public SessionManagerClient { dbus::MessageWriter writer(&method_call); // static_cast does not work due to signedness. writer.AppendArrayOfBytes( - reinterpret_cast<const uint8*>(policy_blob.data()), policy_blob.size()); + reinterpret_cast<const uint8_t*>(policy_blob.data()), + policy_blob.size()); session_manager_proxy_->CallMethod( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, @@ -445,7 +449,8 @@ class SessionManagerClientImpl : public SessionManagerClient { writer.AppendString(username); // static_cast does not work due to signedness. writer.AppendArrayOfBytes( - reinterpret_cast<const uint8*>(policy_blob.data()), policy_blob.size()); + reinterpret_cast<const uint8_t*>(policy_blob.data()), + policy_blob.size()); session_manager_proxy_->CallMethod( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, @@ -555,7 +560,7 @@ class SessionManagerClientImpl : public SessionManagerClient { return; } dbus::MessageReader reader(response); - const uint8* values = NULL; + const uint8_t* values = NULL; size_t length = 0; if (!reader.PopArrayOfBytes(&values, &length)) { LOG(ERROR) << "Invalid response: " << response->ToString(); @@ -649,7 +654,7 @@ class SessionManagerClientImpl : public SessionManagerClient { LOG(ERROR) << "Bad response: " << response->ToString(); } else { while (array_reader.HasMoreData()) { - const uint8* data = NULL; + const uint8_t* data = NULL; size_t size = 0; if (!array_reader.PopArrayOfBytes(&data, &size)) { LOG(ERROR) << "Bad response: " << response->ToString(); diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h index c80688d..4fd4c09 100644 --- a/chromeos/dbus/session_manager_client.h +++ b/chromeos/dbus/session_manager_client.h @@ -10,6 +10,7 @@ #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" diff --git a/chromeos/dbus/shill_client_helper.cc b/chromeos/dbus/shill_client_helper.cc index 408c3bc..f0add9a 100644 --- a/chromeos/dbus/shill_client_helper.cc +++ b/chromeos/dbus/shill_client_helper.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/shill_client_helper.h" +#include <stddef.h> + #include "base/bind.h" #include "base/callback_helpers.h" #include "base/location.h" diff --git a/chromeos/dbus/shill_client_helper.h b/chromeos/dbus/shill_client_helper.h index 740a81c..f2cae1f 100644 --- a/chromeos/dbus/shill_client_helper.h +++ b/chromeos/dbus/shill_client_helper.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/chromeos/dbus/shill_client_unittest_base.cc b/chromeos/dbus/shill_client_unittest_base.cc index c6c60f9..7c02b9a 100644 --- a/chromeos/dbus/shill_client_unittest_base.cc +++ b/chromeos/dbus/shill_client_unittest_base.cc @@ -4,6 +4,9 @@ #include "chromeos/dbus/shill_client_unittest_base.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/json/json_writer.h" #include "base/location.h" diff --git a/chromeos/dbus/shill_client_unittest_base.h b/chromeos/dbus/shill_client_unittest_base.h index 9b32490..24fa392 100644 --- a/chromeos/dbus/shill_client_unittest_base.h +++ b/chromeos/dbus/shill_client_unittest_base.h @@ -5,6 +5,8 @@ #ifndef CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_ #define CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_ +#include <stdint.h> + #include <string> #include "base/memory/ref_counted.h" diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc index 64fef54d..12be94d 100644 --- a/chromeos/dbus/shill_device_client.cc +++ b/chromeos/dbus/shill_device_client.cc @@ -5,6 +5,7 @@ #include "chromeos/dbus/shill_device_client.h" #include "base/bind.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/stl_util.h" #include "base/values.h" diff --git a/chromeos/dbus/shill_device_client.h b/chromeos/dbus/shill_device_client.h index 06949de..272e9a7 100644 --- a/chromeos/dbus/shill_device_client.h +++ b/chromeos/dbus/shill_device_client.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/shill_client_helper.h" diff --git a/chromeos/dbus/shill_ipconfig_client.cc b/chromeos/dbus/shill_ipconfig_client.cc index b3b0cac..d96bdb1 100644 --- a/chromeos/dbus/shill_ipconfig_client.cc +++ b/chromeos/dbus/shill_ipconfig_client.cc @@ -8,6 +8,7 @@ #include <utility> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/values.h" diff --git a/chromeos/dbus/shill_ipconfig_client.h b/chromeos/dbus/shill_ipconfig_client.h index 8461380..374ad80 100644 --- a/chromeos/dbus/shill_ipconfig_client.h +++ b/chromeos/dbus/shill_ipconfig_client.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/shill_client_helper.h" diff --git a/chromeos/dbus/shill_ipconfig_client_unittest.cc b/chromeos/dbus/shill_ipconfig_client_unittest.cc index 68d6913..1318ae9 100644 --- a/chromeos/dbus/shill_ipconfig_client_unittest.cc +++ b/chromeos/dbus/shill_ipconfig_client_unittest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stdint.h> + #include "base/bind.h" #include "base/values.h" #include "chromeos/dbus/shill_client_unittest_base.h" @@ -80,7 +82,7 @@ TEST_F(ShillIPConfigClientTest, PropertyChanged) { TEST_F(ShillIPConfigClientTest, GetProperties) { const char kAddress[] = "address"; - const int32 kMtu = 68; + const int32_t kMtu = 68; // Create response. scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); diff --git a/chromeos/dbus/shill_manager_client.cc b/chromeos/dbus/shill_manager_client.cc index 46179a9..5465835 100644 --- a/chromeos/dbus/shill_manager_client.cc +++ b/chromeos/dbus/shill_manager_client.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/logging.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/values.h" #include "chromeos/dbus/shill_property_changed_observer.h" diff --git a/chromeos/dbus/shill_manager_client.h b/chromeos/dbus/shill_manager_client.h index 68fcf44..02f84de 100644 --- a/chromeos/dbus/shill_manager_client.h +++ b/chromeos/dbus/shill_manager_client.h @@ -7,7 +7,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/dbus_method_call_status.h" diff --git a/chromeos/dbus/shill_profile_client.cc b/chromeos/dbus/shill_profile_client.cc index f965a29..c8fe0c0 100644 --- a/chromeos/dbus/shill_profile_client.cc +++ b/chromeos/dbus/shill_profile_client.cc @@ -8,6 +8,7 @@ #include <utility> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/values.h" diff --git a/chromeos/dbus/shill_profile_client.h b/chromeos/dbus/shill_profile_client.h index 885151f..dba383c 100644 --- a/chromeos/dbus/shill_profile_client.h +++ b/chromeos/dbus/shill_profile_client.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/shill_client_helper.h" diff --git a/chromeos/dbus/shill_service_client.cc b/chromeos/dbus/shill_service_client.cc index 7d1746f..4de47e7 100644 --- a/chromeos/dbus/shill_service_client.cc +++ b/chromeos/dbus/shill_service_client.cc @@ -5,6 +5,7 @@ #include "chromeos/dbus/shill_service_client.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" #include "base/stl_util.h" diff --git a/chromeos/dbus/shill_service_client.h b/chromeos/dbus/shill_service_client.h index 0bb7db4..9283330 100644 --- a/chromeos/dbus/shill_service_client.h +++ b/chromeos/dbus/shill_service_client.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/shill_client_helper.h" diff --git a/chromeos/dbus/shill_third_party_vpn_driver_client.cc b/chromeos/dbus/shill_third_party_vpn_driver_client.cc index fd2f4d9a..a3f3f7b 100644 --- a/chromeos/dbus/shill_third_party_vpn_driver_client.cc +++ b/chromeos/dbus/shill_third_party_vpn_driver_client.cc @@ -4,7 +4,11 @@ #include "chromeos/dbus/shill_third_party_vpn_driver_client.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "chromeos/dbus/shill_third_party_vpn_observer.h" #include "dbus/bus.h" #include "dbus/message.h" diff --git a/chromeos/dbus/shill_third_party_vpn_driver_client.h b/chromeos/dbus/shill_third_party_vpn_driver_client.h index d75fab9..0845ac3 100644 --- a/chromeos/dbus/shill_third_party_vpn_driver_client.h +++ b/chromeos/dbus/shill_third_party_vpn_driver_client.h @@ -10,6 +10,7 @@ #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" #include "chromeos/dbus/shill_client_helper.h" diff --git a/chromeos/dbus/shill_third_party_vpn_driver_client_unittest.cc b/chromeos/dbus/shill_third_party_vpn_driver_client_unittest.cc index ec0e1f8..5880541 100644 --- a/chromeos/dbus/shill_third_party_vpn_driver_client_unittest.cc +++ b/chromeos/dbus/shill_third_party_vpn_driver_client_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 <string> #include "base/bind.h" diff --git a/chromeos/dbus/sms_client.cc b/chromeos/dbus/sms_client.cc index fc8e874..a7f4209 100644 --- a/chromeos/dbus/sms_client.cc +++ b/chromeos/dbus/sms_client.cc @@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" diff --git a/chromeos/dbus/sms_client.h b/chromeos/dbus/sms_client.h index acc6b7e..a0c040b 100644 --- a/chromeos/dbus/sms_client.h +++ b/chromeos/dbus/sms_client.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" diff --git a/chromeos/dbus/system_clock_client.cc b/chromeos/dbus/system_clock_client.cc index 160c9c1..047a29c 100644 --- a/chromeos/dbus/system_clock_client.cc +++ b/chromeos/dbus/system_clock_client.cc @@ -4,7 +4,10 @@ #include "chromeos/dbus/system_clock_client.h" +#include <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/observer_list.h" #include "dbus/bus.h" #include "dbus/message.h" @@ -37,7 +40,7 @@ class SystemClockClientImpl : public SystemClockClient { return observers_.HasObserver(observer); } - void SetTime(int64 time_in_seconds) override { + void SetTime(int64_t time_in_seconds) override { // Always try to set the time, because |can_set_time_| may be stale. dbus::MethodCall method_call(system_clock::kSystemClockInterface, system_clock::kSystemClockSet); diff --git a/chromeos/dbus/system_clock_client.h b/chromeos/dbus/system_clock_client.h index 3b84501..98a4892 100644 --- a/chromeos/dbus/system_clock_client.h +++ b/chromeos/dbus/system_clock_client.h @@ -5,7 +5,10 @@ #ifndef CHROMEOS_DBUS_SYSTEM_CLOCK_CLIENT_H_ #define CHROMEOS_DBUS_SYSTEM_CLOCK_CLIENT_H_ +#include <stdint.h> + #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" @@ -38,7 +41,7 @@ class CHROMEOS_EXPORT SystemClockClient : public DBusClient { virtual bool HasObserver(const Observer* observer) const = 0; // Sets the system clock. - virtual void SetTime(int64 time_in_seconds) = 0; + virtual void SetTime(int64_t time_in_seconds) = 0; // Checks if the system time can be set. virtual bool CanSetTime() = 0; diff --git a/chromeos/dbus/update_engine_client.cc b/chromeos/dbus/update_engine_client.cc index f77c5de..1363b78 100644 --- a/chromeos/dbus/update_engine_client.cc +++ b/chromeos/dbus/update_engine_client.cc @@ -4,6 +4,8 @@ #include "chromeos/dbus/update_engine_client.h" +#include <stdint.h> + #include <algorithm> #include "base/bind.h" @@ -351,7 +353,7 @@ class UpdateEngineClientImpl : public UpdateEngineClient { void StatusUpdateReceived(dbus::Signal* signal) { VLOG(1) << "Status update signal received: " << signal->ToString(); dbus::MessageReader reader(signal); - int64 last_checked_time = 0; + int64_t last_checked_time = 0; double progress = 0.0; std::string current_operation; std::string new_version; diff --git a/chromeos/dbus/update_engine_client.h b/chromeos/dbus/update_engine_client.h index 99de142..9950e21 100644 --- a/chromeos/dbus/update_engine_client.h +++ b/chromeos/dbus/update_engine_client.h @@ -5,9 +5,12 @@ #ifndef CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ #define CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ +#include <stdint.h> + #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_client.h" diff --git a/chromeos/dbus/volume_state.h b/chromeos/dbus/volume_state.h index 0d0a305..caa0848 100644 --- a/chromeos/dbus/volume_state.h +++ b/chromeos/dbus/volume_state.h @@ -5,17 +5,18 @@ #ifndef CHROMEOS_DBUS_VOLUME_STATE_H_ #define CHROMEOS_DBUS_VOLUME_STATE_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "chromeos/chromeos_export.h" namespace chromeos { struct CHROMEOS_EXPORT VolumeState { - int32 output_volume; + int32_t output_volume; bool output_system_mute; - int32 input_gain; + int32_t input_gain; bool input_mute; bool output_user_mute; diff --git a/chromeos/disks/disk_mount_manager.cc b/chromeos/disks/disk_mount_manager.cc index e947eb7..3c89ac6 100644 --- a/chromeos/disks/disk_mount_manager.cc +++ b/chromeos/disks/disk_mount_manager.cc @@ -4,9 +4,13 @@ #include "chromeos/disks/disk_mount_manager.h" +#include <stddef.h> +#include <stdint.h> + #include <set> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/stl_util.h" @@ -651,7 +655,7 @@ DiskMountManager::Disk::Disk(const std::string& device_path, const std::string& fs_uuid, const std::string& system_path_prefix, DeviceType device_type, - uint64 total_size_in_bytes, + uint64_t total_size_in_bytes, bool is_parent, bool is_read_only, bool has_media, @@ -677,8 +681,7 @@ DiskMountManager::Disk::Disk(const std::string& device_path, has_media_(has_media), on_boot_device_(on_boot_device), on_removable_device_(on_removable_device), - is_hidden_(is_hidden) { -} + is_hidden_(is_hidden) {} DiskMountManager::Disk::~Disk() {} diff --git a/chromeos/disks/disk_mount_manager.h b/chromeos/disks/disk_mount_manager.h index ac21ad3..cf29e72 100644 --- a/chromeos/disks/disk_mount_manager.h +++ b/chromeos/disks/disk_mount_manager.h @@ -5,6 +5,8 @@ #ifndef CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ #define CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ +#include <stdint.h> + #include <map> #include "base/callback_forward.h" @@ -64,7 +66,7 @@ class CHROMEOS_EXPORT DiskMountManager { const std::string& fs_uuid, const std::string& system_path_prefix, DeviceType device_type, - uint64 total_size_in_bytes, + uint64_t total_size_in_bytes, bool is_parent, bool is_read_only, bool has_media, @@ -121,7 +123,7 @@ class CHROMEOS_EXPORT DiskMountManager { DeviceType device_type() const { return device_type_; } // Total size of the device in bytes. - uint64 total_size_in_bytes() const { return total_size_in_bytes_; } + uint64_t total_size_in_bytes() const { return total_size_in_bytes_; } // Is the device is a parent device (i.e. sdb rather than sdb1). bool is_parent() const { return is_parent_; } @@ -161,7 +163,7 @@ class CHROMEOS_EXPORT DiskMountManager { std::string fs_uuid_; std::string system_path_prefix_; DeviceType device_type_; - uint64 total_size_in_bytes_; + uint64_t total_size_in_bytes_; bool is_parent_; bool is_read_only_; bool has_media_; diff --git a/chromeos/disks/disk_mount_manager_unittest.cc b/chromeos/disks/disk_mount_manager_unittest.cc index becb950..4a5aae8 100644 --- a/chromeos/disks/disk_mount_manager_unittest.cc +++ b/chromeos/disks/disk_mount_manager_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/bind.h" #include "base/message_loop/message_loop.h" #include "chromeos/dbus/dbus_thread_manager.h" @@ -35,7 +38,7 @@ struct TestDiskInfo { const char* fs_uuid; const char* system_path_prefix; chromeos::DeviceType device_type; - uint64 size_in_bytes; + uint64_t size_in_bytes; bool is_parent; bool is_read_only; bool has_media; diff --git a/chromeos/disks/mock_disk_mount_manager.cc b/chromeos/disks/mock_disk_mount_manager.cc index c915b00..7b76767 100644 --- a/chromeos/disks/mock_disk_mount_manager.cc +++ b/chromeos/disks/mock_disk_mount_manager.cc @@ -4,6 +4,8 @@ #include "chromeos/disks/mock_disk_mount_manager.h" +#include <stdint.h> + #include <utility> #include "base/message_loop/message_loop.h" @@ -186,7 +188,7 @@ void MockDiskMountManager::CreateDiskEntryForMountDevice( const std::string& vendor_name, const std::string& product_name, DeviceType device_type, - uint64 total_size_in_bytes, + uint64_t total_size_in_bytes, bool is_parent, bool has_media, bool on_boot_device, diff --git a/chromeos/disks/mock_disk_mount_manager.h b/chromeos/disks/mock_disk_mount_manager.h index e5693d1..a37f8a0 100644 --- a/chromeos/disks/mock_disk_mount_manager.h +++ b/chromeos/disks/mock_disk_mount_manager.h @@ -5,8 +5,11 @@ #ifndef CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ #define CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ +#include <stdint.h> + #include <string> +#include "base/macros.h" #include "base/observer_list.h" #include "chromeos/dbus/cros_disks_client.h" #include "chromeos/disks/disk_mount_manager.h" @@ -63,7 +66,7 @@ class MockDiskMountManager : public DiskMountManager { const std::string& vendor_name, const std::string& product_name, DeviceType device_type, - uint64 total_size_in_bytes, + uint64_t total_size_in_bytes, bool is_parent, bool has_media, bool on_boot_device, diff --git a/chromeos/disks/suspend_unmount_manager.h b/chromeos/disks/suspend_unmount_manager.h index b52687c..e69dfb0c 100644 --- a/chromeos/disks/suspend_unmount_manager.h +++ b/chromeos/disks/suspend_unmount_manager.h @@ -8,6 +8,7 @@ #include <set> #include <string> +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/cros_disks_client.h" #include "chromeos/dbus/power_manager_client.h" diff --git a/chromeos/geolocation/simple_geolocation_request.cc b/chromeos/geolocation/simple_geolocation_request.cc index 0f205b6..01f48a0 100644 --- a/chromeos/geolocation/simple_geolocation_request.cc +++ b/chromeos/geolocation/simple_geolocation_request.cc @@ -4,6 +4,8 @@ #include "chromeos/geolocation/simple_geolocation_request.h" +#include <stddef.h> + #include <algorithm> #include <string> diff --git a/chromeos/geolocation/simple_geolocation_request.h b/chromeos/geolocation/simple_geolocation_request.h index 5ec5ce3..8771e5d 100644 --- a/chromeos/geolocation/simple_geolocation_request.h +++ b/chromeos/geolocation/simple_geolocation_request.h @@ -5,9 +5,9 @@ #ifndef CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ #define CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ -#include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" diff --git a/chromeos/geolocation/simple_geolocation_unittest.cc b/chromeos/geolocation/simple_geolocation_unittest.cc index db2243ac..ba4eb2e 100644 --- a/chromeos/geolocation/simple_geolocation_unittest.cc +++ b/chromeos/geolocation/simple_geolocation_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 "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "chromeos/geolocation/simple_geolocation_provider.h" diff --git a/chromeos/login/auth/auth_attempt_state.h b/chromeos/login/auth/auth_attempt_state.h index 685ba68..73ccced 100644 --- a/chromeos/login/auth/auth_attempt_state.h +++ b/chromeos/login/auth/auth_attempt_state.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" #include "chromeos/login/auth/auth_status_consumer.h" diff --git a/chromeos/login/auth/authenticator.h b/chromeos/login/auth/authenticator.h index 650ea38..1f05bce 100644 --- a/chromeos/login/auth/authenticator.h +++ b/chromeos/login/auth/authenticator.h @@ -7,7 +7,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "chromeos/chromeos_export.h" #include "chromeos/login/auth/auth_status_consumer.h" diff --git a/chromeos/login/auth/cryptohome_authenticator.cc b/chromeos/login/auth/cryptohome_authenticator.cc index e9e1017..4a80b2b 100644 --- a/chromeos/login/auth/cryptohome_authenticator.cc +++ b/chromeos/login/auth/cryptohome_authenticator.cc @@ -4,9 +4,10 @@ #include "chromeos/login/auth/cryptohome_authenticator.h" +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/bind.h" #include "base/files/file_path.h" #include "base/location.h" @@ -194,14 +195,14 @@ void OnGetKeyDataEx( DCHECK_EQ(kCryptohomeGAIAKeyLabel, key_definition.label); // Extract the key type and salt from |key_definition|, if present. - scoped_ptr<int64> type; + scoped_ptr<int64_t> type; scoped_ptr<std::string> salt; for (std::vector<cryptohome::KeyDefinition::ProviderData>:: const_iterator it = key_definition.provider_data.begin(); it != key_definition.provider_data.end(); ++it) { if (it->name == kKeyProviderDataTypeName) { if (it->number) - type.reset(new int64(*it->number)); + type.reset(new int64_t(*it->number)); else NOTREACHED(); } else if (it->name == kKeyProviderDataSaltName) { diff --git a/chromeos/login/auth/extended_authenticator.h b/chromeos/login/auth/extended_authenticator.h index d80b209..deaa6c4 100644 --- a/chromeos/login/auth/extended_authenticator.h +++ b/chromeos/login/auth/extended_authenticator.h @@ -7,9 +7,9 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/login/auth/extended_authenticator_impl.cc b/chromeos/login/auth/extended_authenticator_impl.cc index 88ec3cf..25d9520 100644 --- a/chromeos/login/auth/extended_authenticator_impl.cc +++ b/chromeos/login/auth/extended_authenticator_impl.cc @@ -4,6 +4,8 @@ #include "chromeos/login/auth/extended_authenticator_impl.h" +#include <stddef.h> + #include "base/bind.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" diff --git a/chromeos/login/auth/extended_authenticator_impl.h b/chromeos/login/auth/extended_authenticator_impl.h index 519c1fe..a292e9e 100644 --- a/chromeos/login/auth/extended_authenticator_impl.h +++ b/chromeos/login/auth/extended_authenticator_impl.h @@ -7,9 +7,9 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" #include "chromeos/login/auth/extended_authenticator.h" diff --git a/chromeos/login/auth/login_performer.h b/chromeos/login/auth/login_performer.h index 68b5aa1..c85a482 100644 --- a/chromeos/login/auth/login_performer.h +++ b/chromeos/login/auth/login_performer.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/login/auth/mock_auth_attempt_state_resolver.h b/chromeos/login/auth/mock_auth_attempt_state_resolver.h index f96545d..0cc9cc5 100644 --- a/chromeos/login/auth/mock_auth_attempt_state_resolver.h +++ b/chromeos/login/auth/mock_auth_attempt_state_resolver.h @@ -5,7 +5,7 @@ #ifndef CHROMEOS_LOGIN_AUTH_MOCK_AUTH_ATTEMPT_STATE_RESOLVER_H_ #define CHROMEOS_LOGIN_AUTH_MOCK_AUTH_ATTEMPT_STATE_RESOLVER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/login/auth/auth_attempt_state_resolver.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/chromeos/login/auth/mock_url_fetchers.h b/chromeos/login/auth/mock_url_fetchers.h index 8d81e41..8e977a7 100644 --- a/chromeos/login/auth/mock_url_fetchers.h +++ b/chromeos/login/auth/mock_url_fetchers.h @@ -8,6 +8,7 @@ #include <string> #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/login/auth/stub_authenticator.h b/chromeos/login/auth/stub_authenticator.h index 84d0595..8c67874 100644 --- a/chromeos/login/auth/stub_authenticator.h +++ b/chromeos/login/auth/stub_authenticator.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "chromeos/chromeos_export.h" #include "chromeos/login/auth/authenticator.h" diff --git a/chromeos/login/auth/test_attempt_state.h b/chromeos/login/auth/test_attempt_state.h index 25cde3c..287b003 100644 --- a/chromeos/login/auth/test_attempt_state.h +++ b/chromeos/login/auth/test_attempt_state.h @@ -6,6 +6,7 @@ #define CHROMEOS_LOGIN_AUTH_TEST_ATTEMPT_STATE_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/login/auth/auth_attempt_state.h" #include "chromeos/login/auth/auth_status_consumer.h" diff --git a/chromeos/login/login_state.h b/chromeos/login/login_state.h index 394357e8..e69bc63 100644 --- a/chromeos/login/login_state.h +++ b/chromeos/login/login_state.h @@ -5,7 +5,7 @@ #ifndef CHROMEOS_LOGIN_LOGIN_STATE_H_ #define CHROMEOS_LOGIN_LOGIN_STATE_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/login/login_state_unittest.cc b/chromeos/login/login_state_unittest.cc index a6a5d4a..c683496 100644 --- a/chromeos/login/login_state_unittest.cc +++ b/chromeos/login/login_state_unittest.cc @@ -6,6 +6,7 @@ #include "base/command_line.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "chromeos/chromeos_switches.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chromeos/login/user_names.cc b/chromeos/login/user_names.cc index 7245c17..32c23de 100644 --- a/chromeos/login/user_names.cc +++ b/chromeos/login/user_names.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "chromeos/login/user_names.h" +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/signin/core/account_id/account_id.h" #include "google_apis/gaia/gaia_auth_util.h" diff --git a/chromeos/network/certificate_pattern.cc b/chromeos/network/certificate_pattern.cc index 7d22088..eba1dfe 100644 --- a/chromeos/network/certificate_pattern.cc +++ b/chromeos/network/certificate_pattern.cc @@ -4,6 +4,8 @@ #include "chromeos/network/certificate_pattern.h" +#include <stddef.h> + #include "base/logging.h" #include "base/values.h" #include "components/onc/onc_constants.h" diff --git a/chromeos/network/client_cert_resolver.h b/chromeos/network/client_cert_resolver.h index 931012b..91d7fb5 100644 --- a/chromeos/network/client_cert_resolver.h +++ b/chromeos/network/client_cert_resolver.h @@ -9,7 +9,6 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" diff --git a/chromeos/network/client_cert_resolver_unittest.cc b/chromeos/network/client_cert_resolver_unittest.cc index 4006072..98123a3 100644 --- a/chromeos/network/client_cert_resolver_unittest.cc +++ b/chromeos/network/client_cert_resolver_unittest.cc @@ -11,6 +11,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/json/json_reader.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" diff --git a/chromeos/network/client_cert_util.cc b/chromeos/network/client_cert_util.cc index 1f810f0..f440dcb 100644 --- a/chromeos/network/client_cert_util.cc +++ b/chromeos/network/client_cert_util.cc @@ -6,6 +6,7 @@ #include <cert.h> #include <pk11pub.h> +#include <stddef.h> #include <list> diff --git a/chromeos/network/device_state.h b/chromeos/network/device_state.h index 00e49078..97ebd0b 100644 --- a/chromeos/network/device_state.h +++ b/chromeos/network/device_state.h @@ -5,6 +5,9 @@ #ifndef CHROMEOS_NETWORK_DEVICE_STATE_H_ #define CHROMEOS_NETWORK_DEVICE_STATE_H_ +#include <stdint.h> + +#include "base/macros.h" #include "base/values.h" #include "chromeos/network/managed_state.h" #include "chromeos/network/network_util.h" @@ -41,7 +44,7 @@ class CHROMEOS_EXPORT DeviceState : public ManagedState { const std::string& technology_family() const { return technology_family_; } const std::string& carrier() const { return carrier_; } const std::string& sim_lock_type() const { return sim_lock_type_; } - uint32 sim_retries_left() const { return sim_retries_left_; } + uint32_t sim_retries_left() const { return sim_retries_left_; } const std::string& meid() const { return meid_; } const std::string& imei() const { return imei_; } const std::string& iccid() const { return iccid_; } @@ -79,7 +82,7 @@ class CHROMEOS_EXPORT DeviceState : public ManagedState { std::string technology_family_; std::string carrier_; std::string sim_lock_type_; - uint32 sim_retries_left_; + uint32_t sim_retries_left_; bool sim_present_; std::string meid_; std::string imei_; diff --git a/chromeos/network/dhcp_proxy_script_fetcher_chromeos.h b/chromeos/network/dhcp_proxy_script_fetcher_chromeos.h index f0d3c4f..27d8d13 100644 --- a/chromeos/network/dhcp_proxy_script_fetcher_chromeos.h +++ b/chromeos/network/dhcp_proxy_script_fetcher_chromeos.h @@ -5,6 +5,7 @@ #ifndef CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ #define CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/fake_network_device_handler.h b/chromeos/network/fake_network_device_handler.h index 79424c7..a7281fa 100644 --- a/chromeos/network/fake_network_device_handler.h +++ b/chromeos/network/fake_network_device_handler.h @@ -5,8 +5,8 @@ #ifndef CHROMEOS_NETWORK_FAKE_NETWORK_DEVICE_HANDLER_H_ #define CHROMEOS_NETWORK_FAKE_NETWORK_DEVICE_HANDLER_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/network/network_device_handler.h" diff --git a/chromeos/network/firewall_hole.cc b/chromeos/network/firewall_hole.cc index 3ad3463..3839b3a 100644 --- a/chromeos/network/firewall_hole.cc +++ b/chromeos/network/firewall_hole.cc @@ -5,6 +5,7 @@ #include "chromeos/network/firewall_hole.h" #include <fcntl.h> +#include <stdint.h> #include <unistd.h> #include "base/bind.h" diff --git a/chromeos/network/geolocation_handler.cc b/chromeos/network/geolocation_handler.cc index d4adfb8..0041ccf 100644 --- a/chromeos/network/geolocation_handler.cc +++ b/chromeos/network/geolocation_handler.cc @@ -4,6 +4,9 @@ #include "chromeos/network/geolocation_handler.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/strings/string_number_conversions.h" #include "base/values.h" @@ -35,7 +38,8 @@ void GeolocationHandler::Init() { } bool GeolocationHandler::GetWifiAccessPoints( - WifiAccessPointVector* access_points, int64* age_ms) { + WifiAccessPointVector* access_points, + int64_t* age_ms) { if (!wifi_enabled_) return false; // Always request updated access points. @@ -127,7 +131,7 @@ void GeolocationHandler::GeolocationCallback( entry->GetString(shill::kGeoMacAddressProperty, &wap.mac_address); std::string age_str; if (entry->GetString(shill::kGeoAgeProperty, &age_str)) { - int64 age_ms; + int64_t age_ms; if (base::StringToInt64(age_str, &age_ms)) { wap.timestamp = base::Time::Now() - base::TimeDelta::FromMilliseconds(age_ms); diff --git a/chromeos/network/geolocation_handler.h b/chromeos/network/geolocation_handler.h index 15b291e..5720364 100644 --- a/chromeos/network/geolocation_handler.h +++ b/chromeos/network/geolocation_handler.h @@ -5,6 +5,9 @@ #ifndef CHROMEOS_NETWORK_GEOLOCATION_HANDLER_H_ #define CHROMEOS_NETWORK_GEOLOCATION_HANDLER_H_ +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "chromeos/dbus/dbus_method_call_status.h" @@ -37,7 +40,8 @@ class CHROMEOS_EXPORT GeolocationHandler : public ShillPropertyChangedObserver { // This sends a request for wifi access point data. If data is already // available, returns |true|, fills |access_points| with the latest access // point data, and sets |age_ms| to the time since the last update in MS. - bool GetWifiAccessPoints(WifiAccessPointVector* access_points, int64* age_ms); + bool GetWifiAccessPoints(WifiAccessPointVector* access_points, + int64_t* age_ms); bool wifi_enabled() const { return wifi_enabled_; } diff --git a/chromeos/network/geolocation_handler_unittest.cc b/chromeos/network/geolocation_handler_unittest.cc index 265f120..6a64a91 100644 --- a/chromeos/network/geolocation_handler_unittest.cc +++ b/chromeos/network/geolocation_handler_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/strings/string_number_conversions.h" diff --git a/chromeos/network/host_resolver_impl_chromeos.cc b/chromeos/network/host_resolver_impl_chromeos.cc index 05def37..ce0cd18 100644 --- a/chromeos/network/host_resolver_impl_chromeos.cc +++ b/chromeos/network/host_resolver_impl_chromeos.cc @@ -5,6 +5,7 @@ #include "chromeos/network/host_resolver_impl_chromeos.h" #include "base/location.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/sys_info.h" #include "base/thread_task_runner_handle.h" diff --git a/chromeos/network/host_resolver_impl_chromeos.h b/chromeos/network/host_resolver_impl_chromeos.h index dba4398..d4acf0f 100644 --- a/chromeos/network/host_resolver_impl_chromeos.h +++ b/chromeos/network/host_resolver_impl_chromeos.h @@ -5,6 +5,7 @@ #ifndef CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ #define CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/threading/thread_checker.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/host_resolver_impl_chromeos_unittest.cc b/chromeos/network/host_resolver_impl_chromeos_unittest.cc index 8b04c1e..89ebb35 100644 --- a/chromeos/network/host_resolver_impl_chromeos_unittest.cc +++ b/chromeos/network/host_resolver_impl_chromeos_unittest.cc @@ -5,6 +5,7 @@ #include "chromeos/network/host_resolver_impl_chromeos.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" diff --git a/chromeos/network/managed_network_configuration_handler.h b/chromeos/network/managed_network_configuration_handler.h index dfdeb722..172dc0b 100644 --- a/chromeos/network/managed_network_configuration_handler.h +++ b/chromeos/network/managed_network_configuration_handler.h @@ -8,9 +8,9 @@ #include <map> #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" #include "chromeos/network/network_handler.h" diff --git a/chromeos/network/managed_network_configuration_handler_impl.h b/chromeos/network/managed_network_configuration_handler_impl.h index 9cf30ef..76d6c2e 100644 --- a/chromeos/network/managed_network_configuration_handler_impl.h +++ b/chromeos/network/managed_network_configuration_handler_impl.h @@ -9,8 +9,8 @@ #include <set> #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/managed_network_configuration_handler_unittest.cc b/chromeos/network/managed_network_configuration_handler_unittest.cc index 6580156..e22b161 100644 --- a/chromeos/network/managed_network_configuration_handler_unittest.cc +++ b/chromeos/network/managed_network_configuration_handler_unittest.cc @@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/single_thread_task_runner.h" diff --git a/chromeos/network/managed_state.cc b/chromeos/network/managed_state.cc index 75fce5b..9a6c1b2 100644 --- a/chromeos/network/managed_state.cc +++ b/chromeos/network/managed_state.cc @@ -4,6 +4,8 @@ #include "chromeos/network/managed_state.h" +#include <stdint.h> + #include "base/logging.h" #include "base/values.h" #include "chromeos/network/device_state.h" @@ -125,17 +127,17 @@ bool ManagedState::GetStringValue(const std::string& key, bool ManagedState::GetUInt32Value(const std::string& key, const base::Value& value, - uint32* out_value) { + uint32_t* out_value) { // base::Value restricts the number types to BOOL, INTEGER, and DOUBLE only. - // uint32 will automatically get converted to a double, which is why we try + // uint32_t will automatically get converted to a double, which is why we try // to obtain the value as a double (see dbus/values_util.h). - uint32 new_value; + uint32_t new_value; double double_value; if (!value.GetAsDouble(&double_value) || double_value < 0) { NET_LOG_ERROR("Error parsing state value", path() + "." + key); return false; } - new_value = static_cast<uint32>(double_value); + new_value = static_cast<uint32_t>(double_value); if (*out_value == new_value) return false; *out_value = new_value; diff --git a/chromeos/network/managed_state.h b/chromeos/network/managed_state.h index d33aa8b..86e3b6d 100644 --- a/chromeos/network/managed_state.h +++ b/chromeos/network/managed_state.h @@ -5,10 +5,12 @@ #ifndef CHROMEOS_NETWORK_MANAGED_STATE_H_ #define CHROMEOS_NETWORK_MANAGED_STATE_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" namespace base { @@ -101,7 +103,7 @@ class CHROMEOS_EXPORT ManagedState { std::string* out_value); bool GetUInt32Value(const std::string& key, const base::Value& value, - uint32* out_value); + uint32_t* out_value); void set_name(const std::string& name) { name_ = name; } diff --git a/chromeos/network/mock_managed_network_configuration_handler.h b/chromeos/network/mock_managed_network_configuration_handler.h index 0af4862..812dfc3 100644 --- a/chromeos/network/mock_managed_network_configuration_handler.h +++ b/chromeos/network/mock_managed_network_configuration_handler.h @@ -7,7 +7,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/values.h" #include "chromeos/chromeos_export.h" #include "chromeos/network/managed_network_configuration_handler.h" diff --git a/chromeos/network/network_activation_handler.h b/chromeos/network/network_activation_handler.h index f15c73d..8984d2d 100644 --- a/chromeos/network/network_activation_handler.h +++ b/chromeos/network/network_activation_handler.h @@ -7,7 +7,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" #include "chromeos/network/network_handler_callbacks.h" diff --git a/chromeos/network/network_cert_migrator.h b/chromeos/network/network_cert_migrator.h index f4fc4dba..d1bf51a 100644 --- a/chromeos/network/network_cert_migrator.h +++ b/chromeos/network/network_cert_migrator.h @@ -5,7 +5,7 @@ #ifndef CHROMEOS_NETWORK_NETWORK_CERT_MIGRATOR_H_ #define CHROMEOS_NETWORK_NETWORK_CERT_MIGRATOR_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chromeos/cert_loader.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/network_cert_migrator_unittest.cc b/chromeos/network/network_cert_migrator_unittest.cc index ff7191c..d24d67b 100644 --- a/chromeos/network/network_cert_migrator_unittest.cc +++ b/chromeos/network/network_cert_migrator_unittest.cc @@ -9,6 +9,7 @@ #include <string> #include "base/files/file_path.h" +#include "base/macros.h" #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" #include "chromeos/cert_loader.h" diff --git a/chromeos/network/network_change_notifier_chromeos.cc b/chromeos/network/network_change_notifier_chromeos.cc index a232997..2c81c03 100644 --- a/chromeos/network/network_change_notifier_chromeos.cc +++ b/chromeos/network/network_change_notifier_chromeos.cc @@ -4,7 +4,6 @@ #include <string> -#include "base/basictypes.h" #include "base/bind.h" #include "base/location.h" #include "base/strings/string_util.h" diff --git a/chromeos/network/network_change_notifier_chromeos.h b/chromeos/network/network_change_notifier_chromeos.h index d8b7292..ed24045 100644 --- a/chromeos/network/network_change_notifier_chromeos.h +++ b/chromeos/network/network_change_notifier_chromeos.h @@ -7,9 +7,9 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" diff --git a/chromeos/network/network_change_notifier_chromeos_unittest.cc b/chromeos/network/network_change_notifier_chromeos_unittest.cc index 570bc36..4ace6d5 100644 --- a/chromeos/network/network_change_notifier_chromeos_unittest.cc +++ b/chromeos/network/network_change_notifier_chromeos_unittest.cc @@ -4,9 +4,10 @@ #include "chromeos/network/network_change_notifier_chromeos.h" +#include <stddef.h> + #include <string> -#include "base/basictypes.h" #include "base/message_loop/message_loop.h" #include "base/strings/string_split.h" #include "chromeos/network/network_change_notifier_factory_chromeos.h" diff --git a/chromeos/network/network_change_notifier_factory_chromeos.h b/chromeos/network/network_change_notifier_factory_chromeos.h index 1a04fbf..a60e5e8 100644 --- a/chromeos/network/network_change_notifier_factory_chromeos.h +++ b/chromeos/network/network_change_notifier_factory_chromeos.h @@ -5,7 +5,6 @@ #ifndef CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_FACTORY_CHROMEOS_H_ #define CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_FACTORY_CHROMEOS_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "chromeos/chromeos_export.h" #include "net/base/network_change_notifier_factory.h" diff --git a/chromeos/network/network_configuration_handler.cc b/chromeos/network/network_configuration_handler.cc index ac7ea8b..4caf50c 100644 --- a/chromeos/network/network_configuration_handler.cc +++ b/chromeos/network/network_configuration_handler.cc @@ -4,12 +4,14 @@ #include "chromeos/network/network_configuration_handler.h" +#include <stddef.h> #include "base/bind.h" #include "base/format_macros.h" #include "base/guid.h" #include "base/json/json_writer.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/stl_util.h" #include "base/strings/stringprintf.h" diff --git a/chromeos/network/network_configuration_handler.h b/chromeos/network/network_configuration_handler.h index 0020c07..6b0bbbd 100644 --- a/chromeos/network/network_configuration_handler.h +++ b/chromeos/network/network_configuration_handler.h @@ -10,8 +10,8 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/chromeos/network/network_configuration_handler_unittest.cc b/chromeos/network/network_configuration_handler_unittest.cc index 21ff388..be4194a 100644 --- a/chromeos/network/network_configuration_handler_unittest.cc +++ b/chromeos/network/network_configuration_handler_unittest.cc @@ -2,12 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include <map> #include <set> #include "base/bind.h" #include "base/json/json_writer.h" #include "base/location.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/single_thread_task_runner.h" #include "base/stl_util.h" diff --git a/chromeos/network/network_connection_handler.h b/chromeos/network/network_connection_handler.h index 36f3a6d..f2ff1a0 100644 --- a/chromeos/network/network_connection_handler.h +++ b/chromeos/network/network_connection_handler.h @@ -9,8 +9,8 @@ #include <set> #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/time/time.h" diff --git a/chromeos/network/network_connection_handler_unittest.cc b/chromeos/network/network_connection_handler_unittest.cc index 0c613be..18bf80d 100644 --- a/chromeos/network/network_connection_handler_unittest.cc +++ b/chromeos/network/network_connection_handler_unittest.cc @@ -11,6 +11,7 @@ #include "base/callback.h" #include "base/files/file_util.h" #include "base/json/json_reader.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" diff --git a/chromeos/network/network_device_handler.h b/chromeos/network/network_device_handler.h index d682eb9..5f4e81c 100644 --- a/chromeos/network/network_device_handler.h +++ b/chromeos/network/network_device_handler.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/network/network_handler_callbacks.h" diff --git a/chromeos/network/network_device_handler_impl.cc b/chromeos/network/network_device_handler_impl.cc index 177fbcc..ccb560e 100644 --- a/chromeos/network/network_device_handler_impl.cc +++ b/chromeos/network/network_device_handler_impl.cc @@ -4,6 +4,9 @@ #include "chromeos/network/network_device_handler_impl.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" #include "base/single_thread_task_runner.h" @@ -171,8 +174,8 @@ void TDLSSuccessCallback( } TDLSOperationParams new_params; - const int64 kRequestStatusDelayMs = 500; - int64 request_delay_ms = 0; + const int64_t kRequestStatusDelayMs = 500; + int64_t request_delay_ms = 0; if (params.operation == shill::kTDLSStatusOperation) { // If this is the last operation, or the result is 'Nonexistent', // return the result. @@ -228,7 +231,7 @@ void TDLSErrorCallback( ++retry_params.retry_count; NET_LOG(EVENT) << "TDLS Retry: " << params.retry_count << ": " << device_path; - const int64 kReRequestDelayMs = 1000; + const int64_t kReRequestDelayMs = 1000; base::TimeDelta request_delay; if (!DBusThreadManager::Get()->GetShillDeviceClient()->GetTestInterface()) request_delay = base::TimeDelta::FromMilliseconds(kReRequestDelayMs); diff --git a/chromeos/network/network_device_handler_impl.h b/chromeos/network/network_device_handler_impl.h index 6b77815..31d8854 100644 --- a/chromeos/network/network_device_handler_impl.h +++ b/chromeos/network/network_device_handler_impl.h @@ -8,9 +8,9 @@ #include <map> #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/network/network_device_handler.h" #include "chromeos/network/network_handler.h" diff --git a/chromeos/network/network_device_handler_unittest.cc b/chromeos/network/network_device_handler_unittest.cc index 38e078b..8ef65f0 100644 --- a/chromeos/network/network_device_handler_unittest.cc +++ b/chromeos/network/network_device_handler_unittest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/values.h" diff --git a/chromeos/network/network_event_log.h b/chromeos/network/network_event_log.h index 7c2ba92..7e8f3ce 100644 --- a/chromeos/network/network_event_log.h +++ b/chromeos/network/network_event_log.h @@ -8,7 +8,6 @@ #include <deque> #include <string> -#include "base/basictypes.h" #include "base/strings/stringprintf.h" #include "base/time/time.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/network_handler.h b/chromeos/network/network_handler.h index 93658e0..028b7d5 100644 --- a/chromeos/network/network_handler.h +++ b/chromeos/network/network_handler.h @@ -5,7 +5,7 @@ #ifndef CHROMEOS_NETWORK_NETWORK_HANDLER_H_ #define CHROMEOS_NETWORK_NETWORK_HANDLER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/single_thread_task_runner.h" diff --git a/chromeos/network/network_handler_callbacks.h b/chromeos/network/network_handler_callbacks.h index 4bdd687..3135bf9 100644 --- a/chromeos/network/network_handler_callbacks.h +++ b/chromeos/network/network_handler_callbacks.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/network_ip_config.h b/chromeos/network/network_ip_config.h index d137fa1..a4efe1e 100644 --- a/chromeos/network/network_ip_config.h +++ b/chromeos/network/network_ip_config.h @@ -8,7 +8,6 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/network_policy_observer.h b/chromeos/network/network_policy_observer.h index 924a036..cf56b25 100644 --- a/chromeos/network/network_policy_observer.h +++ b/chromeos/network/network_policy_observer.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" namespace chromeos { diff --git a/chromeos/network/network_profile_handler.cc b/chromeos/network/network_profile_handler.cc index 002421a..0d13ee3 100644 --- a/chromeos/network/network_profile_handler.cc +++ b/chromeos/network/network_profile_handler.cc @@ -4,6 +4,8 @@ #include "chromeos/network/network_profile_handler.h" +#include <stddef.h> + #include <algorithm> #include "base/bind.h" diff --git a/chromeos/network/network_profile_handler.h b/chromeos/network/network_profile_handler.h index af5045a..5015dd2 100644 --- a/chromeos/network/network_profile_handler.h +++ b/chromeos/network/network_profile_handler.h @@ -9,8 +9,8 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/network_profile_observer.h b/chromeos/network/network_profile_observer.h index 87a7b19..ba7c917 100644 --- a/chromeos/network/network_profile_observer.h +++ b/chromeos/network/network_profile_observer.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" namespace chromeos { diff --git a/chromeos/network/network_sms_handler.cc b/chromeos/network/network_sms_handler.cc index 9c95c7b..88bd7b1 100644 --- a/chromeos/network/network_sms_handler.cc +++ b/chromeos/network/network_sms_handler.cc @@ -4,17 +4,21 @@ #include "chromeos/network/network_sms_handler.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include <deque> #include <vector> #include "base/bind.h" +#include "base/macros.h" #include "base/values.h" #include "chromeos/dbus/dbus_thread_manager.h" -#include "chromeos/dbus/shill_device_client.h" -#include "chromeos/dbus/shill_manager_client.h" #include "chromeos/dbus/gsm_sms_client.h" #include "chromeos/dbus/modem_messaging_client.h" +#include "chromeos/dbus/shill_device_client.h" +#include "chromeos/dbus/shill_manager_client.h" #include "chromeos/dbus/sms_client.h" #include "dbus/object_path.h" #include "third_party/cros_system_api/dbus/service_constants.h" @@ -60,8 +64,8 @@ class NetworkSmsHandler::ModemManagerNetworkSmsDeviceHandler private: void ListCallback(const base::ListValue& message_list); - void SmsReceivedCallback(uint32 index, bool complete); - void GetCallback(uint32 index, const base::DictionaryValue& dictionary); + void SmsReceivedCallback(uint32_t index, bool complete); + void GetCallback(uint32_t index, const base::DictionaryValue& dictionary); void DeleteMessages(); void MessageReceived(const base::DictionaryValue& dictionary); @@ -69,7 +73,7 @@ class NetworkSmsHandler::ModemManagerNetworkSmsDeviceHandler std::string service_name_; dbus::ObjectPath object_path_; bool deleting_messages_; - std::vector<uint32> delete_queue_; + std::vector<uint32_t> delete_queue_; base::WeakPtrFactory<ModemManagerNetworkSmsDeviceHandler> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(ModemManagerNetworkSmsDeviceHandler); @@ -116,7 +120,7 @@ void NetworkSmsHandler::ModemManagerNetworkSmsDeviceHandler::ListCallback( MessageReceived(*message); double index = 0; if (message->GetDoubleWithoutPathExpansion(kIndexKey, &index)) - delete_queue_.push_back(static_cast<uint32>(index)); + delete_queue_.push_back(static_cast<uint32_t>(index)); } DeleteMessages(); } @@ -130,7 +134,7 @@ void NetworkSmsHandler::ModemManagerNetworkSmsDeviceHandler::DeleteMessages() { return; } deleting_messages_ = true; - uint32 index = delete_queue_.back(); + uint32_t index = delete_queue_.back(); delete_queue_.pop_back(); DBusThreadManager::Get()->GetGsmSMSClient()->Delete( service_name_, object_path_, index, @@ -139,10 +143,8 @@ void NetworkSmsHandler::ModemManagerNetworkSmsDeviceHandler::DeleteMessages() { weak_ptr_factory_.GetWeakPtr())); } -void NetworkSmsHandler:: -ModemManagerNetworkSmsDeviceHandler::SmsReceivedCallback( - uint32 index, - bool complete) { +void NetworkSmsHandler::ModemManagerNetworkSmsDeviceHandler:: + SmsReceivedCallback(uint32_t index, bool complete) { // Only handle complete messages. if (!complete) return; @@ -154,7 +156,7 @@ ModemManagerNetworkSmsDeviceHandler::SmsReceivedCallback( } void NetworkSmsHandler::ModemManagerNetworkSmsDeviceHandler::GetCallback( - uint32 index, + uint32_t index, const base::DictionaryValue& dictionary) { MessageReceived(dictionary); delete_queue_.push_back(index); diff --git a/chromeos/network/network_sms_handler.h b/chromeos/network/network_sms_handler.h index bb7fcb2..eb8ed88 100644 --- a/chromeos/network/network_sms_handler.h +++ b/chromeos/network/network_sms_handler.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc index 27d48e9..23381bc 100644 --- a/chromeos/network/network_state.cc +++ b/chromeos/network/network_state.cc @@ -4,6 +4,8 @@ #include "chromeos/network/network_state.h" +#include <stddef.h> + #include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h index d388a8e..5a155dd 100644 --- a/chromeos/network/network_state.h +++ b/chromeos/network/network_state.h @@ -10,6 +10,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/values.h" #include "chromeos/network/managed_state.h" #include "components/onc/onc_constants.h" diff --git a/chromeos/network/network_state_handler.cc b/chromeos/network/network_state_handler.cc index e2ea522..dfcc0e6 100644 --- a/chromeos/network/network_state_handler.cc +++ b/chromeos/network/network_state_handler.cc @@ -4,6 +4,8 @@ #include "chromeos/network/network_state_handler.h" +#include <stddef.h> + #include "base/bind.h" #include "base/format_macros.h" #include "base/guid.h" diff --git a/chromeos/network/network_state_handler.h b/chromeos/network/network_state_handler.h index 7dd422c..2477c1a 100644 --- a/chromeos/network/network_state_handler.h +++ b/chromeos/network/network_state_handler.h @@ -12,6 +12,7 @@ #include "base/callback_forward.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/observer_list.h" diff --git a/chromeos/network/network_state_handler_observer.h b/chromeos/network/network_state_handler_observer.h index f2ffd61..a25dc59 100644 --- a/chromeos/network/network_state_handler_observer.h +++ b/chromeos/network/network_state_handler_observer.h @@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" namespace chromeos { diff --git a/chromeos/network/network_state_handler_unittest.cc b/chromeos/network/network_state_handler_unittest.cc index 3da3831..de832c0 100644 --- a/chromeos/network/network_state_handler_unittest.cc +++ b/chromeos/network/network_state_handler_unittest.cc @@ -4,11 +4,14 @@ #include "chromeos/network/network_state_handler.h" +#include <stddef.h> + #include <map> #include <set> #include <string> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/values.h" diff --git a/chromeos/network/network_state_unittest.cc b/chromeos/network/network_state_unittest.cc index 3ba359a..0d48cdc 100644 --- a/chromeos/network/network_state_unittest.cc +++ b/chromeos/network/network_state_unittest.cc @@ -4,8 +4,10 @@ #include "chromeos/network/network_state.h" -#include "base/basictypes.h" +#include <stdint.h> + #include "base/i18n/streaming_utf8_validator.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" #include "base/values.h" diff --git a/chromeos/network/network_type_pattern.cc b/chromeos/network/network_type_pattern.cc index fd7d216..65537292 100644 --- a/chromeos/network/network_type_pattern.cc +++ b/chromeos/network/network_type_pattern.cc @@ -4,6 +4,8 @@ #include "chromeos/network/network_type_pattern.h" +#include <stddef.h> + #include "chromeos/network/network_event_log.h" #include "third_party/cros_system_api/dbus/service_constants.h" diff --git a/chromeos/network/network_ui_data.h b/chromeos/network/network_ui_data.h index 66cb236..981131ec 100644 --- a/chromeos/network/network_ui_data.h +++ b/chromeos/network/network_ui_data.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" #include "components/onc/onc_constants.h" diff --git a/chromeos/network/network_util.cc b/chromeos/network/network_util.cc index af660e2..a0f8181 100644 --- a/chromeos/network/network_util.cc +++ b/chromeos/network/network_util.cc @@ -4,6 +4,9 @@ #include "chromeos/network/network_util.h" +#include <stddef.h> +#include <stdint.h> + #include "base/strings/string_number_conversions.h" #include "base/strings/string_tokenizer.h" #include "base/strings/string_util.h" @@ -37,7 +40,7 @@ CellularScanResult::~CellularScanResult() { namespace network_util { -std::string PrefixLengthToNetmask(int32 prefix_length) { +std::string PrefixLengthToNetmask(int32_t prefix_length) { std::string netmask; // Return the empty string for invalid inputs. if (prefix_length < 0 || prefix_length > 32) @@ -59,7 +62,7 @@ std::string PrefixLengthToNetmask(int32 prefix_length) { return netmask; } -int32 NetmaskToPrefixLength(const std::string& netmask) { +int32_t NetmaskToPrefixLength(const std::string& netmask) { int count = 0; int prefix_length = 0; base::StringTokenizer t(netmask, "."); diff --git a/chromeos/network/network_util.h b/chromeos/network/network_util.h index 47cdcde..b8fee45 100644 --- a/chromeos/network/network_util.h +++ b/chromeos/network/network_util.h @@ -10,10 +10,11 @@ // All calls to functions in chromeos_network.h should be made through // functions provided by this header. +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -75,11 +76,11 @@ namespace network_util { // Converts a |prefix_length| to a netmask. (for IPv4 only) // e.g. a |prefix_length| of 24 is converted to a netmask of "255.255.255.0". // Invalid prefix lengths will return the empty string. -CHROMEOS_EXPORT std::string PrefixLengthToNetmask(int32 prefix_length); +CHROMEOS_EXPORT std::string PrefixLengthToNetmask(int32_t prefix_length); // Converts a |netmask| to a prefixlen. (for IPv4 only) // e.g. a |netmask| of 255.255.255.0 is converted to a prefixlen of 24 -CHROMEOS_EXPORT int32 NetmaskToPrefixLength(const std::string& netmask); +CHROMEOS_EXPORT int32_t NetmaskToPrefixLength(const std::string& netmask); // Returns |shill_mac_address| in aa:bb format. CHROMEOS_EXPORT std::string FormattedMacAddress( diff --git a/chromeos/network/network_util_unittest.cc b/chromeos/network/network_util_unittest.cc index 9ccf8e6..032c08c 100644 --- a/chromeos/network/network_util_unittest.cc +++ b/chromeos/network/network_util_unittest.cc @@ -4,6 +4,8 @@ #include "chromeos/network/network_util.h" +#include <stddef.h> + #include "testing/gtest/include/gtest/gtest.h" #include "third_party/cros_system_api/dbus/service_constants.h" diff --git a/chromeos/network/onc/onc_certificate_importer.h b/chromeos/network/onc/onc_certificate_importer.h index 5c2678d..ff934c1 100644 --- a/chromeos/network/onc/onc_certificate_importer.h +++ b/chromeos/network/onc/onc_certificate_importer.h @@ -5,8 +5,8 @@ #ifndef CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_ #define CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_H_ -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "components/onc/onc_constants.h" #include "net/cert/x509_certificate.h" diff --git a/chromeos/network/onc/onc_certificate_importer_impl.cc b/chromeos/network/onc/onc_certificate_importer_impl.cc index f5c97b0..90fc684 100644 --- a/chromeos/network/onc/onc_certificate_importer_impl.cc +++ b/chromeos/network/onc/onc_certificate_importer_impl.cc @@ -7,6 +7,7 @@ #include <cert.h> #include <keyhi.h> #include <pk11pub.h> +#include <stddef.h> #include "base/base64.h" #include "base/bind.h" diff --git a/chromeos/network/onc/onc_certificate_importer_impl.h b/chromeos/network/onc/onc_certificate_importer_impl.h index 5746084..d3e5fb2 100644 --- a/chromeos/network/onc/onc_certificate_importer_impl.h +++ b/chromeos/network/onc/onc_certificate_importer_impl.h @@ -9,7 +9,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" diff --git a/chromeos/network/onc/onc_mapper.h b/chromeos/network/onc/onc_mapper.h index d4b1869..07c5339 100644 --- a/chromeos/network/onc/onc_mapper.h +++ b/chromeos/network/onc/onc_mapper.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/onc/onc_merger.cc b/chromeos/network/onc/onc_merger.cc index 2237b3a..1662920 100644 --- a/chromeos/network/onc/onc_merger.cc +++ b/chromeos/network/onc/onc_merger.cc @@ -8,8 +8,8 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/logging.h" +#include "base/macros.h" #include "base/values.h" #include "chromeos/network/onc/onc_signature.h" #include "components/onc/onc_constants.h" diff --git a/chromeos/network/onc/onc_normalizer.h b/chromeos/network/onc/onc_normalizer.h index 2ee0935..1fb18f1 100644 --- a/chromeos/network/onc/onc_normalizer.h +++ b/chromeos/network/onc/onc_normalizer.h @@ -5,6 +5,7 @@ #ifndef CHROMEOS_NETWORK_ONC_ONC_NORMALIZER_H_ #define CHROMEOS_NETWORK_ONC_ONC_NORMALIZER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" #include "chromeos/network/onc/onc_mapper.h" diff --git a/chromeos/network/onc/onc_translator_onc_to_shill.cc b/chromeos/network/onc/onc_translator_onc_to_shill.cc index 81d0733..6ce1eab 100644 --- a/chromeos/network/onc/onc_translator_onc_to_shill.cc +++ b/chromeos/network/onc/onc_translator_onc_to_shill.cc @@ -15,6 +15,7 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/values.h" #include "chromeos/network/onc/onc_signature.h" diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc index 2861737..62aa868 100644 --- a/chromeos/network/onc/onc_translator_shill_to_onc.cc +++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc @@ -6,10 +6,10 @@ #include <string> -#include "base/basictypes.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/values.h" #include "chromeos/network/network_profile_handler.h" diff --git a/chromeos/network/onc/onc_utils.cc b/chromeos/network/onc/onc_utils.cc index 771c51b..55f5091 100644 --- a/chromeos/network/onc/onc_utils.cc +++ b/chromeos/network/onc/onc_utils.cc @@ -4,6 +4,9 @@ #include "chromeos/network/onc/onc_utils.h" +#include <stddef.h> +#include <stdint.h> + #include "base/base64.h" #include "base/json/json_reader.h" #include "base/logging.h" @@ -768,7 +771,7 @@ net::ProxyServer ConvertOncProxyLocationToHostPort( return net::ProxyServer( proxy_server.scheme(), net::HostPortPair(proxy_server.host_port_pair().host(), - static_cast<uint16>(port))); + static_cast<uint16_t>(port))); } void AppendProxyServerForScheme(const base::DictionaryValue& onc_manual, diff --git a/chromeos/network/onc/onc_utils.h b/chromeos/network/onc/onc_utils.h index 6a56e96..b70a7df 100644 --- a/chromeos/network/onc/onc_utils.h +++ b/chromeos/network/onc/onc_utils.h @@ -9,7 +9,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/network/onc/onc_utils_unittest.cc b/chromeos/network/onc/onc_utils_unittest.cc index 30053f1..4c20d99 100644 --- a/chromeos/network/onc/onc_utils_unittest.cc +++ b/chromeos/network/onc/onc_utils_unittest.cc @@ -8,6 +8,7 @@ #include "base/json/json_file_value_serializer.h" #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/values.h" #include "chromeos/chromeos_test_utils.h" diff --git a/chromeos/network/onc/onc_validator.cc b/chromeos/network/onc/onc_validator.cc index ee681aa..12c602f 100644 --- a/chromeos/network/onc/onc_validator.cc +++ b/chromeos/network/onc/onc_validator.cc @@ -4,6 +4,9 @@ #include "chromeos/network/onc/onc_validator.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include "base/json/json_writer.h" @@ -452,7 +455,7 @@ bool Validator::ValidateSSIDAndHexSSID(base::DictionaryValue* object) { std::string hex_ssid_string; if (object->GetStringWithoutPathExpansion(::onc::wifi::kHexSSID, &hex_ssid_string)) { - std::vector<uint8> decoded_ssid; + std::vector<uint8_t> decoded_ssid; if (!base::HexStringToBytes(hex_ssid_string, &decoded_ssid)) { LOG(ERROR) << MessageHeader() << "Field " << ::onc::wifi::kHexSSID << " is not a valid hex representation: \"" << hex_ssid_string diff --git a/chromeos/network/onc/onc_validator.h b/chromeos/network/onc/onc_validator.h index adacbda..07be183 100644 --- a/chromeos/network/onc/onc_validator.h +++ b/chromeos/network/onc/onc_validator.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chromeos/chromeos_export.h" #include "chromeos/network/onc/onc_mapper.h" diff --git a/chromeos/network/policy_applicator.h b/chromeos/network/policy_applicator.h index bca3b06..032f4f3 100644 --- a/chromeos/network/policy_applicator.h +++ b/chromeos/network/policy_applicator.h @@ -9,6 +9,7 @@ #include <set> #include <string> +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" #include "base/values.h" diff --git a/chromeos/network/portal_detector/network_portal_detector.h b/chromeos/network/portal_detector/network_portal_detector.h index 611cb64..f5cf756 100644 --- a/chromeos/network/portal_detector/network_portal_detector.h +++ b/chromeos/network/portal_detector/network_portal_detector.h @@ -5,7 +5,7 @@ #ifndef CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_H_ #define CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" #include "net/url_request/url_fetcher.h" diff --git a/chromeos/network/portal_detector/network_portal_detector_strategy.cc b/chromeos/network/portal_detector/network_portal_detector_strategy.cc index c45466f..185d441 100644 --- a/chromeos/network/portal_detector/network_portal_detector_strategy.cc +++ b/chromeos/network/portal_detector/network_portal_detector_strategy.cc @@ -5,6 +5,7 @@ #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" #include "base/logging.h" +#include "base/macros.h" #include "chromeos/network/network_handler.h" #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" diff --git a/chromeos/network/portal_detector/network_portal_detector_strategy.h b/chromeos/network/portal_detector/network_portal_detector_strategy.h index 84d4853..22d4ec5 100644 --- a/chromeos/network/portal_detector/network_portal_detector_strategy.h +++ b/chromeos/network/portal_detector/network_portal_detector_strategy.h @@ -5,7 +5,6 @@ #ifndef CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_STRATEGY_H_ #define CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_STRATEGY_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" diff --git a/chromeos/network/portal_detector/network_portal_detector_stub.h b/chromeos/network/portal_detector/network_portal_detector_stub.h index c2e921e..16e9fd0 100644 --- a/chromeos/network/portal_detector/network_portal_detector_stub.h +++ b/chromeos/network/portal_detector/network_portal_detector_stub.h @@ -5,6 +5,7 @@ #ifndef CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_STUB_H_ #define CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_STUB_H_ +#include "base/macros.h" #include "chromeos/network/portal_detector/network_portal_detector.h" namespace chromeos { diff --git a/chromeos/network/prohibited_technologies_handler_unittest.cc b/chromeos/network/prohibited_technologies_handler_unittest.cc index 68e186f..931e727 100644 --- a/chromeos/network/prohibited_technologies_handler_unittest.cc +++ b/chromeos/network/prohibited_technologies_handler_unittest.cc @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/callback.h" #include "base/json/json_reader.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" diff --git a/chromeos/network/shill_property_handler.cc b/chromeos/network/shill_property_handler.cc index 41482be..a3f77a5 100644 --- a/chromeos/network/shill_property_handler.cc +++ b/chromeos/network/shill_property_handler.cc @@ -4,10 +4,13 @@ #include "chromeos/network/shill_property_handler.h" +#include <stddef.h> + #include <sstream> #include "base/bind.h" #include "base/format_macros.h" +#include "base/macros.h" #include "base/stl_util.h" #include "base/strings/string_util.h" #include "base/values.h" diff --git a/chromeos/network/shill_property_handler.h b/chromeos/network/shill_property_handler.h index b4b6202..2fb49d0 100644 --- a/chromeos/network/shill_property_handler.h +++ b/chromeos/network/shill_property_handler.h @@ -11,6 +11,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chromeos/dbus/dbus_method_call_status.h" #include "chromeos/dbus/shill_property_changed_observer.h" diff --git a/chromeos/network/shill_property_handler_unittest.cc b/chromeos/network/shill_property_handler_unittest.cc index 7593194..6a23238 100644 --- a/chromeos/network/shill_property_handler_unittest.cc +++ b/chromeos/network/shill_property_handler_unittest.cc @@ -4,11 +4,14 @@ #include "chromeos/network/shill_property_handler.h" +#include <stddef.h> + #include <map> #include <set> #include <string> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/values.h" diff --git a/chromeos/network/shill_property_util.cc b/chromeos/network/shill_property_util.cc index c5cafc8..e47c7ad 100644 --- a/chromeos/network/shill_property_util.cc +++ b/chromeos/network/shill_property_util.cc @@ -4,6 +4,8 @@ #include "chromeos/network/shill_property_util.h" +#include <stdint.h> + #include <set> #include "base/i18n/icu_encoding_detection.h" @@ -28,15 +30,15 @@ namespace { // Replace non UTF8 characters in |str| with a replacement character. std::string ValidateUTF8(const std::string& str) { std::string result; - for (int32 index = 0; index < static_cast<int32>(str.size()); ++index) { - uint32 code_point_out; + for (int32_t index = 0; index < static_cast<int32_t>(str.size()); ++index) { + uint32_t code_point_out; bool is_unicode_char = base::ReadUnicodeCharacter( str.c_str(), str.size(), &index, &code_point_out); - const uint32 kFirstNonControlChar = 0x20; + const uint32_t kFirstNonControlChar = 0x20; if (is_unicode_char && (code_point_out >= kFirstNonControlChar)) { base::WriteUnicodeCharacter(code_point_out, &result); } else { - const uint32 kReplacementChar = 0xFFFD; + const uint32_t kReplacementChar = 0xFFFD; // Puts kReplacementChar if character is a control character [0,0x20) // or is not readable UTF8. base::WriteUnicodeCharacter(kReplacementChar, &result); @@ -86,7 +88,7 @@ std::string GetSSIDFromProperties(const base::DictionaryValue& properties, } std::string ssid; - std::vector<uint8> raw_ssid_bytes; + std::vector<uint8_t> raw_ssid_bytes; if (base::HexStringToBytes(hex_ssid, &raw_ssid_bytes)) { ssid = std::string(raw_ssid_bytes.begin(), raw_ssid_bytes.end()); VLOG(2) << "GetSSIDFromProperties: " << name << " HexSsid=" << hex_ssid diff --git a/chromeos/process_proxy/process_output_watcher.cc b/chromeos/process_proxy/process_output_watcher.cc index 92868c0..c9f1916 100644 --- a/chromeos/process_proxy/process_output_watcher.cc +++ b/chromeos/process_proxy/process_output_watcher.cc @@ -4,6 +4,9 @@ #include "chromeos/process_proxy/process_output_watcher.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include <cstdio> #include <cstring> @@ -23,10 +26,10 @@ namespace { // byte. If the most significant bit is '0', the character is a valid ASCII // and it's byte size is 1. // The method returns 1 if the provided byte is invalid leading byte. -size_t UTF8SizeFromLeadingByte(uint8 leading_byte) { +size_t UTF8SizeFromLeadingByte(uint8_t leading_byte) { size_t byte_count = 0; - uint8 mask = 1 << 7; - uint8 error_mask = 1 << (7 - CBU8_MAX_LENGTH); + uint8_t mask = 1 << 7; + uint8_t error_mask = 1 << (7 - CBU8_MAX_LENGTH); while (leading_byte & mask) { if (mask & error_mask) return 1; diff --git a/chromeos/process_proxy/process_output_watcher.h b/chromeos/process_proxy/process_output_watcher.h index a5aefb5..936672d 100644 --- a/chromeos/process_proxy/process_output_watcher.h +++ b/chromeos/process_proxy/process_output_watcher.h @@ -5,10 +5,13 @@ #ifndef CHROMEOS_PROCESS_PROXY_PROCESS_OUTPUT_WATCHER_H_ #define CHROMEOS_PROCESS_PROXY_PROCESS_OUTPUT_WATCHER_H_ +#include <stddef.h> + #include <string> #include "base/callback.h" #include "base/files/file.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/process_proxy/process_output_watcher_unittest.cc b/chromeos/process_proxy/process_output_watcher_unittest.cc index 2f2eb99..7537381 100644 --- a/chromeos/process_proxy/process_output_watcher_unittest.cc +++ b/chromeos/process_proxy/process_output_watcher_unittest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include <gtest/gtest.h> +#include <stddef.h> #include <queue> #include <string> diff --git a/chromeos/process_proxy/process_proxy.cc b/chromeos/process_proxy/process_proxy.cc index 8ec9ceb..684316b 100644 --- a/chromeos/process_proxy/process_proxy.cc +++ b/chromeos/process_proxy/process_proxy.cc @@ -4,6 +4,7 @@ #include "chromeos/process_proxy/process_proxy.h" +#include <stddef.h> #include <stdlib.h> #include <sys/ioctl.h> diff --git a/chromeos/process_proxy/process_proxy.h b/chromeos/process_proxy/process_proxy.h index d49ba80..49b3b0c 100644 --- a/chromeos/process_proxy/process_proxy.h +++ b/chromeos/process_proxy/process_proxy.h @@ -11,6 +11,7 @@ #include <cstdio> #include <string> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "chromeos/process_proxy/process_output_watcher.h" diff --git a/chromeos/process_proxy/process_proxy_registry.h b/chromeos/process_proxy/process_proxy_registry.h index 554af9e..e845d5d 100644 --- a/chromeos/process_proxy/process_proxy_registry.h +++ b/chromeos/process_proxy/process_proxy_registry.h @@ -10,8 +10,9 @@ #include "base/callback.h" #include "base/lazy_instance.h" -#include "base/memory/scoped_ptr.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" +#include "base/memory/scoped_ptr.h" #include "base/threading/non_thread_safe.h" #include "base/threading/thread.h" #include "chromeos/chromeos_export.h" diff --git a/chromeos/process_proxy/process_proxy_unittest.cc b/chromeos/process_proxy/process_proxy_unittest.cc index c838f31..9a43c3d 100644 --- a/chromeos/process_proxy/process_proxy_unittest.cc +++ b/chromeos/process_proxy/process_proxy_unittest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include <gtest/gtest.h> +#include <stddef.h> #include <string> diff --git a/chromeos/settings/timezone_settings.cc b/chromeos/settings/timezone_settings.cc index adf04a8b..6f1251e 100644 --- a/chromeos/settings/timezone_settings.cc +++ b/chromeos/settings/timezone_settings.cc @@ -4,6 +4,8 @@ #include "chromeos/settings/timezone_settings.h" +#include <stddef.h> + #include <string> #include "base/bind.h" @@ -11,6 +13,7 @@ #include "base/files/file_util.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" #include "base/observer_list.h" diff --git a/chromeos/system/fake_statistics_provider.h b/chromeos/system/fake_statistics_provider.h index 0c43e88..d7f1c35 100644 --- a/chromeos/system/fake_statistics_provider.h +++ b/chromeos/system/fake_statistics_provider.h @@ -8,6 +8,7 @@ #include <map> #include <string> +#include "base/macros.h" #include "chromeos/system/statistics_provider.h" namespace chromeos { diff --git a/chromeos/system/name_value_pairs_parser.cc b/chromeos/system/name_value_pairs_parser.cc index bd565f7..2bf34b6 100644 --- a/chromeos/system/name_value_pairs_parser.cc +++ b/chromeos/system/name_value_pairs_parser.cc @@ -4,6 +4,8 @@ #include "chromeos/system/name_value_pairs_parser.h" +#include <stddef.h> + #include "base/command_line.h" #include "base/files/file_path.h" #include "base/files/file_util.h" diff --git a/chromeos/system/name_value_pairs_parser.h b/chromeos/system/name_value_pairs_parser.h index 2cb704b..bb1758b 100644 --- a/chromeos/system/name_value_pairs_parser.h +++ b/chromeos/system/name_value_pairs_parser.h @@ -8,7 +8,7 @@ #include <map> #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "chromeos/chromeos_export.h" namespace base { diff --git a/chromeos/system/name_value_pairs_parser_unittest.cc b/chromeos/system/name_value_pairs_parser_unittest.cc index e627521..675a978 100644 --- a/chromeos/system/name_value_pairs_parser_unittest.cc +++ b/chromeos/system/name_value_pairs_parser_unittest.cc @@ -4,7 +4,6 @@ #include "chromeos/system/name_value_pairs_parser.h" -#include "base/basictypes.h" #include "testing/gtest/include/gtest/gtest.h" namespace chromeos { diff --git a/chromeos/system/statistics_provider.cc b/chromeos/system/statistics_provider.cc index 019177e..afa67de 100644 --- a/chromeos/system/statistics_provider.cc +++ b/chromeos/system/statistics_provider.cc @@ -11,6 +11,7 @@ #include "base/json/json_file_value_serializer.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/singleton.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" diff --git a/chromeos/system/version_loader.cc b/chromeos/system/version_loader.cc index ab9505b..f62ea06 100644 --- a/chromeos/system/version_loader.cc +++ b/chromeos/system/version_loader.cc @@ -4,6 +4,8 @@ #include "chromeos/system/version_loader.h" +#include <stddef.h> + #include <vector> #include "base/files/file_path.h" diff --git a/chromeos/timezone/timezone_request.cc b/chromeos/timezone/timezone_request.cc index 7c284cd..4d787bd 100644 --- a/chromeos/timezone/timezone_request.cc +++ b/chromeos/timezone/timezone_request.cc @@ -4,6 +4,8 @@ #include "chromeos/timezone/timezone_request.h" +#include <stddef.h> + #include <string> #include "base/json/json_reader.h" diff --git a/chromeos/timezone/timezone_request.h b/chromeos/timezone/timezone_request.h index dbad66b..8c584cc 100644 --- a/chromeos/timezone/timezone_request.h +++ b/chromeos/timezone/timezone_request.h @@ -5,9 +5,9 @@ #ifndef CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_ #define CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_ -#include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" diff --git a/chromeos/timezone/timezone_resolver.cc b/chromeos/timezone/timezone_resolver.cc index 051a558..5938654 100644 --- a/chromeos/timezone/timezone_resolver.cc +++ b/chromeos/timezone/timezone_resolver.cc @@ -5,12 +5,14 @@ #include "chromeos/timezone/timezone_resolver.h" #include <math.h> +#include <stdint.h> #include <algorithm> #include "base/bind.h" #include "base/callback_helpers.h" #include "base/logging.h" +#include "base/macros.h" #include "base/power_monitor/power_monitor.h" #include "base/power_monitor/power_observer.h" #include "base/prefs/pref_registry_simple.h" @@ -262,7 +264,7 @@ TimeZoneResolver::TimeZoneResolverImpl::TimeZoneResolverImpl( base::PowerMonitor* power_monitor = base::PowerMonitor::Get(); power_monitor->AddObserver(this); - const int64 last_refresh_at_raw = + const int64_t last_refresh_at_raw = resolver_->local_state()->GetInt64(kLastTimeZoneRefreshTime); const base::Time last_refresh_at = base::Time::FromInternalValue(last_refresh_at_raw); diff --git a/chromeos/timezone/timezone_unittest.cc b/chromeos/timezone/timezone_unittest.cc index 9e05fe0..37c608c 100644 --- a/chromeos/timezone/timezone_unittest.cc +++ b/chromeos/timezone/timezone_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 "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "chromeos/geolocation/geoposition.h" diff --git a/chromeos/tools/onc_validator/onc_validator.cc b/chromeos/tools/onc_validator/onc_validator.cc index 196b0b2..e80d612 100644 --- a/chromeos/tools/onc_validator/onc_validator.cc +++ b/chromeos/tools/onc_validator/onc_validator.cc @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include <cstdio> #include <iostream> -#include "base/basictypes.h" #include "base/command_line.h" #include "base/files/file_path.h" #include "base/json/json_file_value_serializer.h" diff --git a/chromeos/tpm/tpm_password_fetcher.h b/chromeos/tpm/tpm_password_fetcher.h index f9ceb5d..bc1f2a6 100644 --- a/chromeos/tpm/tpm_password_fetcher.h +++ b/chromeos/tpm/tpm_password_fetcher.h @@ -7,7 +7,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_method_call_status.h" diff --git a/chromeos/tpm/tpm_token_info_getter.cc b/chromeos/tpm/tpm_token_info_getter.cc index 6f6dfe7..e51392f 100644 --- a/chromeos/tpm/tpm_token_info_getter.cc +++ b/chromeos/tpm/tpm_token_info_getter.cc @@ -4,14 +4,16 @@ #include "chromeos/tpm/tpm_token_info_getter.h" +#include <stdint.h> + #include "base/bind.h" #include "base/location.h" #include "chromeos/dbus/cryptohome_client.h" namespace { -const int64 kInitialRequestDelayMs = 100; -const int64 kMaxRequestDelayMs = 300000; // 5 minutes +const int64_t kInitialRequestDelayMs = 100; +const int64_t kMaxRequestDelayMs = 300000; // 5 minutes // Calculates the delay before running next attempt to initiatialize the TPM // token, if |last_delay| was the last or initial delay. diff --git a/chromeos/tpm/tpm_token_info_getter.h b/chromeos/tpm/tpm_token_info_getter.h index f1f39a6..1612dc5 100644 --- a/chromeos/tpm/tpm_token_info_getter.h +++ b/chromeos/tpm/tpm_token_info_getter.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" diff --git a/chromeos/tpm/tpm_token_info_getter_unittest.cc b/chromeos/tpm/tpm_token_info_getter_unittest.cc index 7d53474..013c22a 100644 --- a/chromeos/tpm/tpm_token_info_getter_unittest.cc +++ b/chromeos/tpm/tpm_token_info_getter_unittest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stdint.h> + #include <string> #include <vector> @@ -53,7 +55,7 @@ void RecordGetterResult(TestTPMTokenInfo* target, class FakeTaskRunner : public base::TaskRunner { public: // |delays|: Vector to which the dalays seen by the task runner are saved. - explicit FakeTaskRunner(std::vector<int64>* delays) : delays_(delays) {} + explicit FakeTaskRunner(std::vector<int64_t>* delays) : delays_(delays) {} // base::TaskRunner overrides: bool PostDelayedTask(const tracked_objects::Location& from_here, @@ -70,7 +72,7 @@ class FakeTaskRunner : public base::TaskRunner { private: // The vector of delays. - std::vector<int64>* delays_; + std::vector<int64_t>* delays_; DISALLOW_COPY_AND_ASSIGN(FakeTaskRunner); }; @@ -246,7 +248,7 @@ class SystemTPMTokenInfoGetterTest : public testing::Test { scoped_ptr<TestCryptohomeClient> cryptohome_client_; scoped_ptr<chromeos::TPMTokenInfoGetter> tpm_token_info_getter_; - std::vector<int64> delays_; + std::vector<int64_t> delays_; private: base::MessageLoop message_loop_; @@ -273,7 +275,7 @@ class UserTPMTokenInfoGetterTest : public testing::Test { scoped_ptr<chromeos::TPMTokenInfoGetter> tpm_token_info_getter_; std::string user_id_; - std::vector<int64> delays_; + std::vector<int64_t> delays_; private: base::MessageLoop message_loop_; @@ -296,7 +298,7 @@ TEST_F(SystemTPMTokenInfoGetterTest, BasicFlow) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(1, reported_info.slot_id); - EXPECT_EQ(std::vector<int64>(), delays_); + EXPECT_EQ(std::vector<int64_t>(), delays_); } TEST_F(SystemTPMTokenInfoGetterTest, TokenSlotIdEqualsZero) { @@ -316,7 +318,7 @@ TEST_F(SystemTPMTokenInfoGetterTest, TokenSlotIdEqualsZero) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(0, reported_info.slot_id); - EXPECT_EQ(std::vector<int64>(), delays_); + EXPECT_EQ(std::vector<int64_t>(), delays_); } TEST_F(SystemTPMTokenInfoGetterTest, TPMNotEnabled) { @@ -330,7 +332,7 @@ TEST_F(SystemTPMTokenInfoGetterTest, TPMNotEnabled) { EXPECT_FALSE(reported_info.IsReady()); EXPECT_FALSE(reported_info.enabled); - EXPECT_EQ(std::vector<int64>(), delays_); + EXPECT_EQ(std::vector<int64_t>(), delays_); } TEST_F(SystemTPMTokenInfoGetterTest, TpmEnabledCallFails) { @@ -350,9 +352,9 @@ TEST_F(SystemTPMTokenInfoGetterTest, TpmEnabledCallFails) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(1, reported_info.slot_id); - const int64 kExpectedDelays[] = {100}; - EXPECT_EQ(std::vector<int64>(kExpectedDelays, - kExpectedDelays + arraysize(kExpectedDelays)), + const int64_t kExpectedDelays[] = {100}; + EXPECT_EQ(std::vector<int64_t>(kExpectedDelays, + kExpectedDelays + arraysize(kExpectedDelays)), delays_); } @@ -373,9 +375,9 @@ TEST_F(SystemTPMTokenInfoGetterTest, GetTpmTokenInfoInitiallyNotReady) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(1, reported_info.slot_id); - const int64 kExpectedDelays[] = {100}; - EXPECT_EQ(std::vector<int64>(kExpectedDelays, - kExpectedDelays + arraysize(kExpectedDelays)), + const int64_t kExpectedDelays[] = {100}; + EXPECT_EQ(std::vector<int64_t>(kExpectedDelays, + kExpectedDelays + arraysize(kExpectedDelays)), delays_); } @@ -396,9 +398,9 @@ TEST_F(SystemTPMTokenInfoGetterTest, GetTpmTokenInfoInitiallyFails) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(1, reported_info.slot_id); - const int64 kExpectedDelays[] = {100}; - EXPECT_EQ(std::vector<int64>(kExpectedDelays, - kExpectedDelays + arraysize(kExpectedDelays)), + const int64_t kExpectedDelays[] = {100}; + EXPECT_EQ(std::vector<int64_t>(kExpectedDelays, + kExpectedDelays + arraysize(kExpectedDelays)), delays_); } @@ -421,11 +423,10 @@ TEST_F(SystemTPMTokenInfoGetterTest, RetryDelaysIncreaseExponentially) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(2, reported_info.slot_id); - int64 kExpectedDelays[] = { 100, 200, 400, 800, 1600, 3200 }; - ASSERT_EQ( - std::vector<int64>(kExpectedDelays, - kExpectedDelays + arraysize(kExpectedDelays)), - delays_); + int64_t kExpectedDelays[] = {100, 200, 400, 800, 1600, 3200}; + ASSERT_EQ(std::vector<int64_t>(kExpectedDelays, + kExpectedDelays + arraysize(kExpectedDelays)), + delays_); } TEST_F(SystemTPMTokenInfoGetterTest, RetryDelayBounded) { @@ -447,14 +448,12 @@ TEST_F(SystemTPMTokenInfoGetterTest, RetryDelayBounded) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(1, reported_info.slot_id); - int64 kExpectedDelays[] = { - 100, 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200, 102400, 204800, - 300000, 300000, 300000 - }; - ASSERT_EQ( - std::vector<int64>(kExpectedDelays, - kExpectedDelays + arraysize(kExpectedDelays)), - delays_); + int64_t kExpectedDelays[] = {100, 200, 400, 800, 1600, + 3200, 6400, 12800, 25600, 51200, + 102400, 204800, 300000, 300000, 300000}; + ASSERT_EQ(std::vector<int64_t>(kExpectedDelays, + kExpectedDelays + arraysize(kExpectedDelays)), + delays_); } TEST_F(UserTPMTokenInfoGetterTest, BasicFlow) { @@ -472,7 +471,7 @@ TEST_F(UserTPMTokenInfoGetterTest, BasicFlow) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(1, reported_info.slot_id); - EXPECT_EQ(std::vector<int64>(), delays_); + EXPECT_EQ(std::vector<int64_t>(), delays_); } TEST_F(UserTPMTokenInfoGetterTest, GetTpmTokenInfoInitiallyFails) { @@ -492,9 +491,9 @@ TEST_F(UserTPMTokenInfoGetterTest, GetTpmTokenInfoInitiallyFails) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(1, reported_info.slot_id); - const int64 kExpectedDelays[] = {100}; - EXPECT_EQ(std::vector<int64>(kExpectedDelays, - kExpectedDelays + arraysize(kExpectedDelays)), + const int64_t kExpectedDelays[] = {100}; + EXPECT_EQ(std::vector<int64_t>(kExpectedDelays, + kExpectedDelays + arraysize(kExpectedDelays)), delays_); } @@ -515,9 +514,9 @@ TEST_F(UserTPMTokenInfoGetterTest, GetTpmTokenInfoInitiallyNotReady) { EXPECT_EQ("2222", reported_info.pin); EXPECT_EQ(1, reported_info.slot_id); - const int64 kExpectedDelays[] = {100}; - EXPECT_EQ(std::vector<int64>(kExpectedDelays, - kExpectedDelays + arraysize(kExpectedDelays)), + const int64_t kExpectedDelays[] = {100}; + EXPECT_EQ(std::vector<int64_t>(kExpectedDelays, + kExpectedDelays + arraysize(kExpectedDelays)), delays_); } diff --git a/chromeos/tpm/tpm_token_loader.h b/chromeos/tpm/tpm_token_loader.h index 6add4a6..84f98b8 100644 --- a/chromeos/tpm/tpm_token_loader.h +++ b/chromeos/tpm/tpm_token_loader.h @@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" |