diff options
author | avi <avi@chromium.org> | 2015-12-22 15:15:43 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-22 23:17:06 +0000 |
commit | 5a080f017c68b6230a6acea6cca89414d12db661 (patch) | |
tree | d80c0813bbf91d8d2b9f477ccdfaba26c77fc33e | |
parent | 4bcdaa935641c632c546917e0442ade23c0a01a2 (diff) | |
download | chromium_src-5a080f017c68b6230a6acea6cca89414d12db661.zip chromium_src-5a080f017c68b6230a6acea6cca89414d12db661.tar.gz chromium_src-5a080f017c68b6230a6acea6cca89414d12db661.tar.bz2 |
Switch to standard integer types in remoting/.
BUG=138542
TBR=wez@chromium.org
Review URL: https://codereview.chromium.org/1542203002
Cr-Commit-Position: refs/heads/master@{#366684}
269 files changed, 612 insertions, 253 deletions
diff --git a/remoting/base/auto_thread.cc b/remoting/base/auto_thread.cc index b0c6268..dd7cc17 100644 --- a/remoting/base/auto_thread.cc +++ b/remoting/base/auto_thread.cc @@ -6,10 +6,11 @@ #include "base/bind.h" #include "base/lazy_instance.h" +#include "base/synchronization/waitable_event.h" #include "base/third_party/dynamic_annotations/dynamic_annotations.h" #include "base/threading/thread_local.h" #include "base/threading/thread_restrictions.h" -#include "base/synchronization/waitable_event.h" +#include "build/build_config.h" #include "remoting/base/auto_thread_task_runner.h" #if defined(OS_WIN) diff --git a/remoting/base/auto_thread.h b/remoting/base/auto_thread.h index a6c0e56..943d02f 100644 --- a/remoting/base/auto_thread.h +++ b/remoting/base/auto_thread.h @@ -7,8 +7,10 @@ #include <string> +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/threading/platform_thread.h" +#include "build/build_config.h" #include "remoting/base/auto_thread_task_runner.h" namespace remoting { diff --git a/remoting/base/auto_thread_task_runner.h b/remoting/base/auto_thread_task_runner.h index 96a576d..4e64500 100644 --- a/remoting/base/auto_thread_task_runner.h +++ b/remoting/base/auto_thread_task_runner.h @@ -5,8 +5,8 @@ #ifndef REMOTING_BASE_AUTO_THREAD_TASK_RUNNER_H_ #define REMOTING_BASE_AUTO_THREAD_TASK_RUNNER_H_ -#include "base/basictypes.h" #include "base/callback.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/remoting/base/auto_thread_unittest.cc b/remoting/base/auto_thread_unittest.cc index 152db81..0faac34 100644 --- a/remoting/base/auto_thread_unittest.cc +++ b/remoting/base/auto_thread_unittest.cc @@ -6,6 +6,7 @@ #include "base/files/file_path.h" #include "base/memory/ref_counted.h" #include "base/scoped_native_library.h" +#include "build/build_config.h" #include "remoting/base/auto_thread.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/remoting/base/breakpad_win.cc b/remoting/base/breakpad_win.cc index 926d3af..ae1a81e 100644 --- a/remoting/base/breakpad_win.cc +++ b/remoting/base/breakpad_win.cc @@ -16,6 +16,7 @@ #include "base/file_version_info.h" #include "base/lazy_instance.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/process/memory.h" #include "base/strings/utf_string_conversions.h" diff --git a/remoting/base/buffered_socket_writer_unittest.cc b/remoting/base/buffered_socket_writer_unittest.cc index 8e5a1a5..3bf5d49 100644 --- a/remoting/base/buffered_socket_writer_unittest.cc +++ b/remoting/base/buffered_socket_writer_unittest.cc @@ -4,6 +4,7 @@ #include "remoting/base/buffered_socket_writer.h" +#include <stddef.h> #include <stdlib.h> #include "base/bind.h" diff --git a/remoting/base/capabilities.h b/remoting/base/capabilities.h index 0a285be..66f81b7 100644 --- a/remoting/base/capabilities.h +++ b/remoting/base/capabilities.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" namespace remoting { diff --git a/remoting/base/capabilities_unittest.cc b/remoting/base/capabilities_unittest.cc index 90c12a0..8caf011 100644 --- a/remoting/base/capabilities_unittest.cc +++ b/remoting/base/capabilities_unittest.cc @@ -2,9 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include <algorithm> #include <vector> +#include "base/macros.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "remoting/base/capabilities.h" diff --git a/remoting/base/compound_buffer.cc b/remoting/base/compound_buffer.cc index c18592b..a659c23 100644 --- a/remoting/base/compound_buffer.cc +++ b/remoting/base/compound_buffer.cc @@ -272,7 +272,7 @@ bool CompoundBufferInputStream::Skip(int count) { return count == 0; } -int64 CompoundBufferInputStream::ByteCount() const { +int64_t CompoundBufferInputStream::ByteCount() const { return position_; } diff --git a/remoting/base/compound_buffer.h b/remoting/base/compound_buffer.h index 50d3efb..4883e11 100644 --- a/remoting/base/compound_buffer.h +++ b/remoting/base/compound_buffer.h @@ -18,9 +18,12 @@ #ifndef REMOTING_BASE_COMPOUND_BUFFER_H_ #define REMOTING_BASE_COMPOUND_BUFFER_H_ +#include <stddef.h> +#include <stdint.h> + #include <deque> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "google/protobuf/io/zero_copy_stream.h" @@ -111,7 +114,7 @@ class CompoundBufferInputStream bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: const CompoundBuffer* buffer_; diff --git a/remoting/base/compound_buffer_unittest.cc b/remoting/base/compound_buffer_unittest.cc index e5f4bef..031365a 100644 --- a/remoting/base/compound_buffer_unittest.cc +++ b/remoting/base/compound_buffer_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" @@ -108,7 +111,7 @@ class CompoundBufferTest : public testing::Test { static size_t ReadFromInput(CompoundBufferInputStream* input, void* data, size_t size) { - uint8* out = reinterpret_cast<uint8*>(data); + uint8_t* out = reinterpret_cast<uint8_t*>(data); int out_size = size; const void* in; diff --git a/remoting/base/dispatch_win.h b/remoting/base/dispatch_win.h index 53ad6ec..8f00561 100644 --- a/remoting/base/dispatch_win.h +++ b/remoting/base/dispatch_win.h @@ -11,7 +11,7 @@ #include <oaidl.h> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/template_util.h" #include "base/win/scoped_variant.h" diff --git a/remoting/base/dispatch_win.h.pump b/remoting/base/dispatch_win.h.pump index 31c34a5..41dc8bc 100644 --- a/remoting/base/dispatch_win.h.pump +++ b/remoting/base/dispatch_win.h.pump @@ -17,6 +17,7 @@ $var MAX_ARITY = 7 #include <oaidl.h> #include "base/basictypes.h" +#include "base/macros.h" #include "base/template_util.h" #include "base/win/scoped_variant.h" diff --git a/remoting/base/rate_counter.cc b/remoting/base/rate_counter.cc index e6532da..fdc7981 100644 --- a/remoting/base/rate_counter.cc +++ b/remoting/base/rate_counter.cc @@ -17,7 +17,7 @@ RateCounter::RateCounter(base::TimeDelta time_window) RateCounter::~RateCounter() { } -void RateCounter::Record(int64 value) { +void RateCounter::Record(int64_t value) { DCHECK(CalledOnValidThread()); base::Time current_time = CurrentTime(); diff --git a/remoting/base/rate_counter.h b/remoting/base/rate_counter.h index 083ec94..ee34edc 100644 --- a/remoting/base/rate_counter.h +++ b/remoting/base/rate_counter.h @@ -5,10 +5,12 @@ #ifndef REMOTING_BASE_RATE_COUNTER_H_ #define REMOTING_BASE_RATE_COUNTER_H_ +#include <stdint.h> + #include <queue> #include <utility> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/threading/non_thread_safe.h" #include "base/time/time.h" @@ -24,7 +26,7 @@ class RateCounter : public base::NonThreadSafe { virtual ~RateCounter(); // Records a point event count to include in the rate. - void Record(int64 value); + void Record(int64_t value); // Returns the rate-per-second of values recorded over the time window. // Note that rates reported before |time_window| has elapsed are not accurate. @@ -35,7 +37,7 @@ class RateCounter : public base::NonThreadSafe { private: // Type used to store data points with timestamps. - typedef std::pair<base::Time, int64> DataPoint; + typedef std::pair<base::Time, int64_t> DataPoint; // Removes data points more than |time_window| older than |current_time|. void EvictOldDataPoints(base::Time current_time); @@ -50,7 +52,7 @@ class RateCounter : public base::NonThreadSafe { std::queue<DataPoint> data_points_; // Sum of values in |data_points_|. - int64 sum_; + int64_t sum_; // If set, used to calculate the running average, in place of Now(). base::Time current_time_for_test_; diff --git a/remoting/base/rate_counter_unittest.cc b/remoting/base/rate_counter_unittest.cc index cf5962d..91b91c5 100644 --- a/remoting/base/rate_counter_unittest.cc +++ b/remoting/base/rate_counter_unittest.cc @@ -2,12 +2,16 @@ // 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/macros.h" #include "remoting/base/rate_counter.h" #include "testing/gtest/include/gtest/gtest.h" namespace remoting { -static const int64 kTestValues[] = { 10, 20, 30, 10, 25, 16, 15 }; +static const int64_t kTestValues[] = { 10, 20, 30, 10, 25, 16, 15 }; // One second window and one sample per second, so rate equals each sample. TEST(RateCounterTest, OneSecondWindow) { diff --git a/remoting/base/rsa_key_pair.cc b/remoting/base/rsa_key_pair.cc index 366d93d..66688e9 100644 --- a/remoting/base/rsa_key_pair.cc +++ b/remoting/base/rsa_key_pair.cc @@ -4,6 +4,8 @@ #include "remoting/base/rsa_key_pair.h" +#include <stdint.h> + #include <limits> #include <string> #include <vector> @@ -44,7 +46,7 @@ scoped_refptr<RsaKeyPair> RsaKeyPair::FromString( return NULL; } - std::vector<uint8> key_buf(key_str.begin(), key_str.end()); + std::vector<uint8_t> key_buf(key_str.begin(), key_str.end()); scoped_ptr<crypto::RSAPrivateKey> key( crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_buf)); if (!key) { @@ -59,7 +61,7 @@ std::string RsaKeyPair::ToString() const { // Check that the key initialized. DCHECK(key_.get() != NULL); - std::vector<uint8> key_buf; + std::vector<uint8_t> key_buf; CHECK(key_->ExportPrivateKey(&key_buf)); std::string key_str(key_buf.begin(), key_buf.end()); std::string key_base64; @@ -68,7 +70,7 @@ std::string RsaKeyPair::ToString() const { } std::string RsaKeyPair::GetPublicKey() const { - std::vector<uint8> public_key; + std::vector<uint8_t> public_key; CHECK(key_->ExportPublicKey(&public_key)); std::string public_key_str(public_key.begin(), public_key.end()); std::string public_key_base64; @@ -80,9 +82,9 @@ std::string RsaKeyPair::SignMessage(const std::string& message) const { scoped_ptr<crypto::SignatureCreator> signature_creator( crypto::SignatureCreator::Create(key_.get(), crypto::SignatureCreator::SHA1)); - signature_creator->Update(reinterpret_cast<const uint8*>(message.c_str()), + signature_creator->Update(reinterpret_cast<const uint8_t*>(message.c_str()), message.length()); - std::vector<uint8> signature_buf; + std::vector<uint8_t> signature_buf; signature_creator->Final(&signature_buf); std::string signature_str(signature_buf.begin(), signature_buf.end()); std::string signature_base64; diff --git a/remoting/base/rsa_key_pair.h b/remoting/base/rsa_key_pair.h index f5009b2..03e791f 100644 --- a/remoting/base/rsa_key_pair.h +++ b/remoting/base/rsa_key_pair.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" diff --git a/remoting/base/running_average.h b/remoting/base/running_average.h index 2ed2115..e41234e 100644 --- a/remoting/base/running_average.h +++ b/remoting/base/running_average.h @@ -5,9 +5,12 @@ #ifndef REMOTING_BASE_RUNNING_AVERAGE_H_ #define REMOTING_BASE_RUNNING_AVERAGE_H_ +#include <stddef.h> +#include <stdint.h> + #include <deque> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/threading/thread_checker.h" namespace remoting { diff --git a/remoting/base/running_average_unittest.cc b/remoting/base/running_average_unittest.cc index 709abd6..e731573 100644 --- a/remoting/base/running_average_unittest.cc +++ b/remoting/base/running_average_unittest.cc @@ -2,12 +2,16 @@ // 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/macros.h" #include "remoting/base/running_average.h" #include "testing/gtest/include/gtest/gtest.h" namespace remoting { -static const int64 kTestValues[] = { 10, 20, 30, 10, 25, 16, 15 }; +static const int64_t kTestValues[] = { 10, 20, 30, 10, 25, 16, 15 }; // Average across a single element, i.e. just return the most recent. TEST(RunningAverageTest, OneElementWindow) { diff --git a/remoting/base/scoped_sc_handle_win.h b/remoting/base/scoped_sc_handle_win.h index 69cd569..c15d477 100644 --- a/remoting/base/scoped_sc_handle_win.h +++ b/remoting/base/scoped_sc_handle_win.h @@ -7,6 +7,7 @@ #include <windows.h> +#include "base/macros.h" #include "base/win/scoped_handle.h" namespace remoting { diff --git a/remoting/base/service_urls.h b/remoting/base/service_urls.h index bafdc6a..74f1911 100644 --- a/remoting/base/service_urls.h +++ b/remoting/base/service_urls.h @@ -7,7 +7,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/singleton.h" namespace remoting { diff --git a/remoting/base/socket_reader.h b/remoting/base/socket_reader.h index a660bf1..2581f19 100644 --- a/remoting/base/socket_reader.h +++ b/remoting/base/socket_reader.h @@ -5,9 +5,10 @@ #ifndef REMOTING_BASE_SOCKET_READER_H_ #define REMOTING_BASE_SOCKET_READER_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" -#include "net/base/completion_callback.h" #include "base/memory/weak_ptr.h" +#include "net/base/completion_callback.h" namespace net { class IOBuffer; diff --git a/remoting/base/typed_buffer.h b/remoting/base/typed_buffer.h index fd46646..90239f0 100644 --- a/remoting/base/typed_buffer.h +++ b/remoting/base/typed_buffer.h @@ -6,10 +6,10 @@ #define REMOTING_BASE_TYPED_BUFFER_H_ #include <assert.h> +#include <stdint.h> #include <algorithm> -#include "base/basictypes.h" #include "base/logging.h" #include "base/move.h" @@ -27,16 +27,16 @@ class TypedBuffer { TypedBuffer() : TypedBuffer(0) {} // Creates an instance of the object allocating a buffer of the given size. - explicit TypedBuffer(uint32 length) : buffer_(NULL), length_(length) { + explicit TypedBuffer(uint32_t length) : buffer_(NULL), length_(length) { if (length_ > 0) - buffer_ = reinterpret_cast<T*>(new uint8[length_]); + buffer_ = reinterpret_cast<T*>(new uint8_t[length_]); } TypedBuffer(TypedBuffer&& rvalue) : TypedBuffer() { Swap(rvalue); } ~TypedBuffer() { if (buffer_) { - delete[] reinterpret_cast<uint8*>(buffer_); + delete[] reinterpret_cast<uint8_t*>(buffer_); buffer_ = NULL; } } @@ -58,12 +58,12 @@ class TypedBuffer { } T* get() const { return buffer_; } - uint32 length() const { return length_; } + uint32_t length() const { return length_; } // Helper returning a pointer to the structure starting at a specified byte // offset. - T* GetAtOffset(uint32 offset) { - return reinterpret_cast<T*>(reinterpret_cast<uint8*>(buffer_) + offset); + T* GetAtOffset(uint32_t offset) { + return reinterpret_cast<T*>(reinterpret_cast<uint8_t*>(buffer_) + offset); } // Allow TypedBuffer<T> to be used in boolean expressions, but not @@ -82,7 +82,7 @@ class TypedBuffer { T* buffer_; // Length of the owned buffer in bytes. - uint32 length_; + uint32_t length_; }; } // namespace remoting diff --git a/remoting/base/url_request_context_getter.h b/remoting/base/url_request_context_getter.h index 93e6817..13ef147 100644 --- a/remoting/base/url_request_context_getter.h +++ b/remoting/base/url_request_context_getter.h @@ -5,7 +5,7 @@ #ifndef REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_ #define REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "net/url_request/url_request_context_getter.h" diff --git a/remoting/base/util.h b/remoting/base/util.h index d022a16..3294cee 100644 --- a/remoting/base/util.h +++ b/remoting/base/util.h @@ -5,6 +5,7 @@ #ifndef REMOTING_BASE_UTIL_H_ #define REMOTING_BASE_UTIL_H_ +#include <stddef.h> #include <stdint.h> #include <string> diff --git a/remoting/base/util_unittest.cc b/remoting/base/util_unittest.cc index 3f489b8..7a36f55 100644 --- a/remoting/base/util_unittest.cc +++ b/remoting/base/util_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 <algorithm> #include "remoting/base/util.h" diff --git a/remoting/base/vlog_net_log.cc b/remoting/base/vlog_net_log.cc index bfcea02..98c964f 100644 --- a/remoting/base/vlog_net_log.cc +++ b/remoting/base/vlog_net_log.cc @@ -6,6 +6,7 @@ #include "base/json/json_writer.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_restrictions.h" #include "base/time/time.h" diff --git a/remoting/base/vlog_net_log.h b/remoting/base/vlog_net_log.h index 8ac0cfd..4b923ee 100644 --- a/remoting/base/vlog_net_log.h +++ b/remoting/base/vlog_net_log.h @@ -5,6 +5,7 @@ #ifndef REMOTING_BASE_VLOG_NET_LOG_H_ #define REMOTING_BASE_VLOG_NET_LOG_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "net/log/net_log.h" diff --git a/remoting/client/audio_decode_scheduler.cc b/remoting/client/audio_decode_scheduler.cc index 144025b..ac006dd 100644 --- a/remoting/client/audio_decode_scheduler.cc +++ b/remoting/client/audio_decode_scheduler.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/location.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "remoting/client/audio_player.h" #include "remoting/codec/audio_decoder.h" diff --git a/remoting/client/audio_decode_scheduler.h b/remoting/client/audio_decode_scheduler.h index 7848d67..a3c3c3b 100644 --- a/remoting/client/audio_decode_scheduler.h +++ b/remoting/client/audio_decode_scheduler.h @@ -5,6 +5,7 @@ #ifndef REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ #define REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "remoting/protocol/audio_stub.h" diff --git a/remoting/client/audio_player.cc b/remoting/client/audio_player.cc index a26f1bc..7ae340c 100644 --- a/remoting/client/audio_player.cc +++ b/remoting/client/audio_player.cc @@ -80,7 +80,7 @@ void AudioPlayer::ProcessAudioPacket(scoped_ptr<AudioPacket> packet) { // static void AudioPlayer::AudioPlayerCallback(void* samples, - uint32 buffer_size, + uint32_t buffer_size, void* data) { AudioPlayer* audio_player = static_cast<AudioPlayer*>(data); audio_player->FillWithSamples(samples, buffer_size); @@ -93,7 +93,7 @@ void AudioPlayer::ResetQueue() { bytes_consumed_ = 0; } -void AudioPlayer::FillWithSamples(void* samples, uint32 buffer_size) { +void AudioPlayer::FillWithSamples(void* samples, uint32_t buffer_size) { base::AutoLock auto_lock(lock_); const size_t bytes_needed = kChannels * kSampleSizeBytes * diff --git a/remoting/client/audio_player.h b/remoting/client/audio_player.h index e131737..94de1b4 100644 --- a/remoting/client/audio_player.h +++ b/remoting/client/audio_player.h @@ -5,8 +5,12 @@ #ifndef REMOTING_CLIENT_AUDIO_PLAYER_H_ #define REMOTING_CLIENT_AUDIO_PLAYER_H_ +#include <stddef.h> +#include <stdint.h> + #include <list> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/synchronization/lock.h" #include "remoting/proto/audio.pb.h" @@ -23,7 +27,7 @@ class AudioPlayer { AudioPlayer(); // Return the recommended number of samples to include in a frame. - virtual uint32 GetSamplesPerFrame() = 0; + virtual uint32_t GetSamplesPerFrame() = 0; // Resets the audio player and starts playback. // Returns true on success. @@ -31,7 +35,7 @@ class AudioPlayer { // Function called by the browser when it needs more audio samples. static void AudioPlayerCallback(void* samples, - uint32 buffer_size, + uint32_t buffer_size, void* data); private: @@ -40,7 +44,7 @@ class AudioPlayer { typedef std::list<AudioPacket*> AudioPacketQueue; void ResetQueue(); - void FillWithSamples(void* samples, uint32 buffer_size); + void FillWithSamples(void* samples, uint32_t buffer_size); AudioPacket::SamplingRate sampling_rate_; diff --git a/remoting/client/audio_player_unittest.cc b/remoting/client/audio_player_unittest.cc index 8084ee5..0e5381e 100644 --- a/remoting/client/audio_player_unittest.cc +++ b/remoting/client/audio_player_unittest.cc @@ -4,6 +4,8 @@ #include "remoting/client/audio_player.h" +#include <stdint.h> + #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "testing/gtest/include/gtest/gtest.h" @@ -17,8 +19,8 @@ const int kPaddingBytes = 16; // TODO(garykac): Generate random audio data in the tests rather than having // a single constant value. -const uint8 kDefaultBufferData = 0x5A; -const uint8 kDummyAudioData = 0x8B; +const uint8_t kDefaultBufferData = 0x5A; +const uint8_t kDummyAudioData = 0x8B; } // namespace @@ -31,7 +33,7 @@ class FakeAudioPlayer : public AudioPlayer { bool ResetAudioPlayer(AudioPacket::SamplingRate) override { return true; } - uint32 GetSamplesPerFrame() override { return kAudioSamplesPerFrame; } + uint32_t GetSamplesPerFrame() override { return kAudioSamplesPerFrame; } }; class AudioPlayerTest : public ::testing::Test { @@ -44,7 +46,7 @@ class AudioPlayerTest : public ::testing::Test { void TearDown() override {} void ConsumeAudioFrame() { - uint8* buffer = reinterpret_cast<uint8*>(buffer_.get()); + uint8_t* buffer = reinterpret_cast<uint8_t*>(buffer_.get()); memset(buffer, kDefaultBufferData, kAudioFrameBytes + kPaddingBytes); AudioPlayer::AudioPlayerCallback(reinterpret_cast<void*>(buffer_.get()), kAudioFrameBytes, @@ -57,7 +59,7 @@ class AudioPlayerTest : public ::testing::Test { // Check that the first |num_bytes| bytes are filled with audio data and // the rest of the buffer is zero-filled. void CheckAudioFrameBytes(int num_bytes) { - uint8* buffer = reinterpret_cast<uint8*>(buffer_.get()); + uint8_t* buffer = reinterpret_cast<uint8_t*>(buffer_.get()); int i = 0; for (; i < num_bytes; i++) { ASSERT_EQ(kDummyAudioData, *(buffer + i)); diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h index 9bcb929..1079018 100644 --- a/remoting/client/chromoting_client.h +++ b/remoting/client/chromoting_client.h @@ -10,6 +10,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/protocol/client_stub.h" #include "remoting/protocol/clipboard_stub.h" diff --git a/remoting/client/client_context.h b/remoting/client/client_context.h index 56ae02e..49f05378 100644 --- a/remoting/client/client_context.h +++ b/remoting/client/client_context.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/threading/thread.h" namespace base { diff --git a/remoting/client/client_status_logger.h b/remoting/client/client_status_logger.h index 4d15ac1..9f644c7 100644 --- a/remoting/client/client_status_logger.h +++ b/remoting/client/client_status_logger.h @@ -5,6 +5,7 @@ #ifndef REMOTING_CLIENT_CLIENT_STATUS_LOGGER_H_ #define REMOTING_CLIENT_CLIENT_STATUS_LOGGER_H_ +#include "base/macros.h" #include "base/threading/non_thread_safe.h" #include "base/time/time.h" #include "remoting/protocol/connection_to_host.h" diff --git a/remoting/client/client_user_interface.h b/remoting/client/client_user_interface.h index 59ad3ef..be578d2 100644 --- a/remoting/client/client_user_interface.h +++ b/remoting/client/client_user_interface.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "remoting/protocol/connection_to_host.h" #include "remoting/protocol/third_party_client_authenticator.h" diff --git a/remoting/client/empty_cursor_filter.cc b/remoting/client/empty_cursor_filter.cc index 085de58..9cb2fc9 100644 --- a/remoting/client/empty_cursor_filter.cc +++ b/remoting/client/empty_cursor_filter.cc @@ -4,8 +4,11 @@ #include "remoting/client/empty_cursor_filter.h" +#include <stdint.h> + #include <algorithm> +#include "build/build_config.h" #include "remoting/proto/control.pb.h" namespace remoting { diff --git a/remoting/client/empty_cursor_filter.h b/remoting/client/empty_cursor_filter.h index ed14e5c..03eb347 100644 --- a/remoting/client/empty_cursor_filter.h +++ b/remoting/client/empty_cursor_filter.h @@ -5,6 +5,7 @@ #ifndef REMOTING_CLIENT_EMPTY_CURSOR_FILTER_H_ #define REMOTING_CLIENT_EMPTY_CURSOR_FILTER_H_ +#include "base/macros.h" #include "remoting/protocol/cursor_shape_stub.h" namespace remoting { diff --git a/remoting/client/frame_consumer.h b/remoting/client/frame_consumer.h index f320356..792d2f6 100644 --- a/remoting/client/frame_consumer.h +++ b/remoting/client/frame_consumer.h @@ -5,7 +5,7 @@ #ifndef REMOTING_CLIENT_FRAME_CONSUMER_H_ #define REMOTING_CLIENT_FRAME_CONSUMER_H_ -#include "base/basictypes.h" +#include "base/macros.h" namespace webrtc { class DesktopFrame; diff --git a/remoting/client/jni/android_keymap.cc b/remoting/client/jni/android_keymap.cc index 7f5653e..2fc44b8 100644 --- a/remoting/client/jni/android_keymap.cc +++ b/remoting/client/jni/android_keymap.cc @@ -12,7 +12,7 @@ namespace { // <android/keycodes.h> and // "ui/events/keycodes/keyboard_code_conversion_android.cc" . Some of these // mappings assume a US keyboard layout for now. -const uint32 usb_keycodes[] = { +const uint32_t usb_keycodes[] = { 0, // UNKNOWN 0, // SOFT_LEFT 0, // SOFT_RIGHT @@ -203,8 +203,8 @@ const uint32 usb_keycodes[] = { namespace remoting { -uint32 AndroidKeycodeToUsbKeycode(size_t android) { - if (android >= sizeof (usb_keycodes) / sizeof (uint32)) { +uint32_t AndroidKeycodeToUsbKeycode(size_t android) { + if (android >= sizeof(usb_keycodes) / sizeof(uint32_t)) { LOG(WARNING) << "Attempted to decode out-of-range Android keycode"; return 0; } diff --git a/remoting/client/jni/android_keymap.h b/remoting/client/jni/android_keymap.h index 9368ae5..5cfe555 100644 --- a/remoting/client/jni/android_keymap.h +++ b/remoting/client/jni/android_keymap.h @@ -5,7 +5,9 @@ #ifndef REMOTING_CLIENT_JNI_ANDROID_KEYMAP_H_ #define REMOTING_CLIENT_JNI_ANDROID_KEYMAP_H_ -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + #include "base/memory/scoped_ptr.h" namespace remoting { @@ -16,7 +18,7 @@ namespace remoting { // instead of the host's. The whole process needs to be rethought to accomplish // the mappings in a localizable and future-proof way. // crbug.com/265945 -uint32 AndroidKeycodeToUsbKeycode(size_t android); +uint32_t AndroidKeycodeToUsbKeycode(size_t android); } // namespace remoting diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc index 535ca0f..02a701f 100644 --- a/remoting/client/jni/chromoting_jni_instance.cc +++ b/remoting/client/jni/chromoting_jni_instance.cc @@ -5,6 +5,7 @@ #include "remoting/client/jni/chromoting_jni_instance.h" #include <android/log.h> +#include <stdint.h> #include "base/bind.h" #include "base/logging.h" diff --git a/remoting/client/jni/chromoting_jni_instance.h b/remoting/client/jni/chromoting_jni_instance.h index c8ff15f..89e2bd2 100644 --- a/remoting/client/jni/chromoting_jni_instance.h +++ b/remoting/client/jni/chromoting_jni_instance.h @@ -7,6 +7,7 @@ #include <string> +#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/remoting/client/jni/chromoting_jni_runtime.cc b/remoting/client/jni/chromoting_jni_runtime.cc index 335e1ff..36b423c 100644 --- a/remoting/client/jni/chromoting_jni_runtime.cc +++ b/remoting/client/jni/chromoting_jni_runtime.cc @@ -9,7 +9,6 @@ #include "base/android/jni_string.h" #include "base/android/library_loader/library_loader_hooks.h" #include "base/android/scoped_java_ref.h" -#include "base/basictypes.h" #include "base/command_line.h" #include "base/memory/singleton.h" #include "base/stl_util.h" diff --git a/remoting/client/jni/chromoting_jni_runtime.h b/remoting/client/jni/chromoting_jni_runtime.h index 5d622ac..d2d5e46 100644 --- a/remoting/client/jni/chromoting_jni_runtime.h +++ b/remoting/client/jni/chromoting_jni_runtime.h @@ -9,6 +9,7 @@ #include <string> #include "base/android/scoped_java_ref.h" +#include "base/macros.h" #include "net/url_request/url_request_context_getter.h" #include "remoting/base/auto_thread.h" #include "remoting/client/jni/chromoting_jni_instance.h" diff --git a/remoting/client/jni/jni_frame_consumer.cc b/remoting/client/jni/jni_frame_consumer.cc index 8c84dba..25923da 100644 --- a/remoting/client/jni/jni_frame_consumer.cc +++ b/remoting/client/jni/jni_frame_consumer.cc @@ -4,6 +4,8 @@ #include "remoting/client/jni/jni_frame_consumer.h" +#include <stdint.h> + #include "base/android/jni_android.h" #include "base/android/scoped_java_ref.h" #include "base/logging.h" @@ -67,7 +69,7 @@ void JniFrameConsumer::Renderer::RenderFrame( // and then the R/B channels are swapped in place (on the decoding thread). // If a repaint is triggered from a Java event handler, the unswapped pixels // can sometimes appear on the display. - uint8* dest_buffer = static_cast<uint8*>(bitmap_->pixels()); + uint8_t* dest_buffer = static_cast<uint8_t*>(bitmap_->pixels()); webrtc::DesktopRect buffer_rect = webrtc::DesktopRect::MakeSize(frame->size()); for (webrtc::DesktopRegion::Iterator i(frame->updated_region()); !i.IsAtEnd(); diff --git a/remoting/client/jni/jni_frame_consumer.h b/remoting/client/jni/jni_frame_consumer.h index 5a9f7e6..5c72e9b 100644 --- a/remoting/client/jni/jni_frame_consumer.h +++ b/remoting/client/jni/jni_frame_consumer.h @@ -8,6 +8,7 @@ #include <list> #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "remoting/client/frame_consumer.h" diff --git a/remoting/client/jni/remoting_jni_onload.cc b/remoting/client/jni/remoting_jni_onload.cc index b539747..2140e4a 100644 --- a/remoting/client/jni/remoting_jni_onload.cc +++ b/remoting/client/jni/remoting_jni_onload.cc @@ -8,6 +8,7 @@ #include "base/android/jni_registrar.h" #include "base/android/jni_utils.h" #include "base/bind.h" +#include "base/macros.h" #include "net/android/net_jni_registrar.h" #include "remoting/client/jni/remoting_jni_registrar.h" #include "ui/gfx/android/gfx_jni_registrar.h" diff --git a/remoting/client/key_event_mapper.cc b/remoting/client/key_event_mapper.cc index c6e5958..85bda27 100644 --- a/remoting/client/key_event_mapper.cc +++ b/remoting/client/key_event_mapper.cc @@ -21,7 +21,7 @@ void KeyEventMapper::SetTrapCallback(KeyTrapCallback callback) { trap_callback = callback; } -void KeyEventMapper::TrapKey(uint32 usb_keycode, bool trap_key) { +void KeyEventMapper::TrapKey(uint32_t usb_keycode, bool trap_key) { if (trap_key) { trapped_keys.insert(usb_keycode); } else { @@ -29,7 +29,8 @@ void KeyEventMapper::TrapKey(uint32 usb_keycode, bool trap_key) { } } -void KeyEventMapper::RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode) { +void KeyEventMapper::RemapKey(uint32_t in_usb_keycode, + uint32_t out_usb_keycode) { if (in_usb_keycode == out_usb_keycode) { mapped_keys.erase(in_usb_keycode); } else { @@ -47,7 +48,7 @@ void KeyEventMapper::InjectKeyEvent(const protocol::KeyEvent& event) { } // Re-map mapped keys to the new value before passing them on. - std::map<uint32,uint32>::iterator mapped = + std::map<uint32_t, uint32_t>::iterator mapped = mapped_keys.find(event.usb_keycode()); if (mapped != mapped_keys.end()) { protocol::KeyEvent new_event(event); diff --git a/remoting/client/key_event_mapper.h b/remoting/client/key_event_mapper.h index b81c657..f500e27 100644 --- a/remoting/client/key_event_mapper.h +++ b/remoting/client/key_event_mapper.h @@ -5,12 +5,14 @@ #ifndef REMOTING_CLIENT_KEY_EVENT_MAPPER_H_ #define REMOTING_CLIENT_KEY_EVENT_MAPPER_H_ +#include <stdint.h> + #include <map> #include <set> -#include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "remoting/protocol/input_filter.h" namespace remoting { @@ -32,18 +34,18 @@ class KeyEventMapper : public protocol::InputFilter { // Causes events matching |usb_keycode| to be delivered to the trap callback. // Trapped events are not dispatched to the next InputStub in the chain. - void TrapKey(uint32 usb_keycode, bool trap_key); + void TrapKey(uint32_t usb_keycode, bool trap_key); // Causes events matching |in_usb_keycode| to be mapped to |out_usb_keycode|. // Keys are remapped at most once. Traps are processed before remapping. - void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode); + void RemapKey(uint32_t in_usb_keycode, uint32_t out_usb_keycode); // InputFilter overrides. void InjectKeyEvent(const protocol::KeyEvent& event) override; private: - std::map<uint32,uint32> mapped_keys; - std::set<uint32> trapped_keys; + std::map<uint32_t, uint32_t> mapped_keys; + std::set<uint32_t> trapped_keys; KeyTrapCallback trap_callback; DISALLOW_COPY_AND_ASSIGN(KeyEventMapper); diff --git a/remoting/client/key_event_mapper_unittest.cc b/remoting/client/key_event_mapper_unittest.cc index b194038..26715f5 100644 --- a/remoting/client/key_event_mapper_unittest.cc +++ b/remoting/client/key_event_mapper_unittest.cc @@ -4,6 +4,8 @@ #include "remoting/client/key_event_mapper.h" +#include <stdint.h> + #include "base/bind.h" #include "remoting/proto/event.pb.h" #include "remoting/protocol/protocol_mock_objects.h" @@ -22,9 +24,9 @@ using protocol::KeyEvent; using protocol::MockInputStub; using protocol::test::EqualsKeyEventWithCapsLock; -static KeyEvent NewUsbEvent(uint32 usb_keycode, +static KeyEvent NewUsbEvent(uint32_t usb_keycode, bool pressed, - uint32 lock_states) { + uint32_t lock_states) { KeyEvent event; event.set_usb_keycode(usb_keycode); event.set_pressed(pressed); @@ -33,7 +35,7 @@ static KeyEvent NewUsbEvent(uint32 usb_keycode, return event; } -static void PressAndReleaseUsb(InputStub* input_stub, uint32 usb_keycode) { +static void PressAndReleaseUsb(InputStub* input_stub, uint32_t usb_keycode) { input_stub->InjectKeyEvent( NewUsbEvent(usb_keycode, true, KeyEvent::LOCK_STATES_CAPSLOCK)); input_stub->InjectKeyEvent( diff --git a/remoting/client/normalizing_input_filter_cros.h b/remoting/client/normalizing_input_filter_cros.h index 0dfa805..9866194 100644 --- a/remoting/client/normalizing_input_filter_cros.h +++ b/remoting/client/normalizing_input_filter_cros.h @@ -5,6 +5,9 @@ #ifndef REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_ #define REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_ +#include <stdint.h> + +#include "base/macros.h" #include "remoting/proto/event.pb.h" #include "remoting/protocol/input_filter.h" @@ -49,7 +52,7 @@ class NormalizingInputFilterCros : public protocol::InputFilter { bool deferred_key_is_rewriting_; // Stores the code of the OSKey while it is pressed for use as a Modifier. - uint32 modifying_key_; + uint32_t modifying_key_; // True if the left or right Alt keys are pressed, respectively. bool left_alt_is_pressed_; diff --git a/remoting/client/normalizing_input_filter_cros_unittest.cc b/remoting/client/normalizing_input_filter_cros_unittest.cc index be89a27..e0e4f7f 100644 --- a/remoting/client/normalizing_input_filter_cros_unittest.cc +++ b/remoting/client/normalizing_input_filter_cros_unittest.cc @@ -4,6 +4,8 @@ #include "remoting/client/normalizing_input_filter_cros.h" +#include <stdint.h> + #include "remoting/proto/event.pb.h" #include "remoting/protocol/protocol_mock_objects.h" #include "remoting/protocol/test_event_matchers.h" diff --git a/remoting/client/normalizing_input_filter_mac.h b/remoting/client/normalizing_input_filter_mac.h index 26636ad..1271cf3 100644 --- a/remoting/client/normalizing_input_filter_mac.h +++ b/remoting/client/normalizing_input_filter_mac.h @@ -7,6 +7,7 @@ #include <map> +#include "base/macros.h" #include "remoting/protocol/input_filter.h" namespace remoting { diff --git a/remoting/client/normalizing_input_filter_mac_unittest.cc b/remoting/client/normalizing_input_filter_mac_unittest.cc index e29c705..9c637e5 100644 --- a/remoting/client/normalizing_input_filter_mac_unittest.cc +++ b/remoting/client/normalizing_input_filter_mac_unittest.cc @@ -4,6 +4,8 @@ #include "remoting/client/normalizing_input_filter_mac.h" +#include <stdint.h> + #include "remoting/proto/event.pb.h" #include "remoting/protocol/protocol_mock_objects.h" #include "remoting/protocol/test_event_matchers.h" diff --git a/remoting/client/normalizing_input_filter_win.cc b/remoting/client/normalizing_input_filter_win.cc index 20950da..2fca242 100644 --- a/remoting/client/normalizing_input_filter_win.cc +++ b/remoting/client/normalizing_input_filter_win.cc @@ -4,6 +4,8 @@ #include "remoting/client/normalizing_input_filter_win.h" +#include <stdint.h> + #include "base/logging.h" #include "ui/events/keycodes/dom/dom_code.h" diff --git a/remoting/client/normalizing_input_filter_win_unittest.cc b/remoting/client/normalizing_input_filter_win_unittest.cc index cb96b3f..ee8ec3c 100644 --- a/remoting/client/normalizing_input_filter_win_unittest.cc +++ b/remoting/client/normalizing_input_filter_win_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 "remoting/client/normalizing_input_filter_win.h" #include "remoting/proto/event.pb.h" #include "remoting/protocol/protocol_mock_objects.h" @@ -23,14 +25,14 @@ const unsigned int kUsbLeftControl = 0x0700e0; const unsigned int kUsbRightAlt = 0x0700e6; // A hardcoded value used to verify |lock_states| is preserved. -static const uint32 kTestLockStates = protocol::KeyEvent::LOCK_STATES_NUMLOCK; +static const uint32_t kTestLockStates = protocol::KeyEvent::LOCK_STATES_NUMLOCK; MATCHER_P2(EqualsKeyEvent, usb_keycode, pressed, "") { - return arg.usb_keycode() == static_cast<uint32>(usb_keycode) && + return arg.usb_keycode() == static_cast<uint32_t>(usb_keycode) && arg.pressed() == pressed && arg.lock_states() == kTestLockStates; } -KeyEvent MakeKeyEvent(uint32 keycode, bool pressed) { +KeyEvent MakeKeyEvent(uint32_t keycode, bool pressed) { KeyEvent event; event.set_usb_keycode(keycode); event.set_pressed(pressed); @@ -38,7 +40,7 @@ KeyEvent MakeKeyEvent(uint32 keycode, bool pressed) { return event; } -void PressAndReleaseKey(InputStub* input_stub, uint32 keycode) { +void PressAndReleaseKey(InputStub* input_stub, uint32_t keycode) { input_stub->InjectKeyEvent(MakeKeyEvent(keycode, true)); input_stub->InjectKeyEvent(MakeKeyEvent(keycode, false)); } diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc index 5f71ccd..1c23317 100644 --- a/remoting/client/plugin/chromoting_instance.cc +++ b/remoting/client/plugin/chromoting_instance.cc @@ -1032,7 +1032,7 @@ void ChromotingInstance::PostLegacyJsonMessage( PostMessage(pp::Var(message_json)); } -void ChromotingInstance::SendTrappedKey(uint32 usb_keycode, bool pressed) { +void ChromotingInstance::SendTrappedKey(uint32_t usb_keycode, bool pressed) { scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue()); data->SetInteger("usbKeycode", usb_keycode); data->SetBoolean("pressed", pressed); @@ -1131,7 +1131,7 @@ bool ChromotingInstance::IsConnected() { void ChromotingInstance::UpdateUmaEnumHistogram( const std::string& histogram_name, - int64 value, + int64_t value, int histogram_max) { pp::UMAPrivate uma(this); uma.HistogramEnumeration(histogram_name, value, histogram_max); @@ -1140,7 +1140,7 @@ void ChromotingInstance::UpdateUmaEnumHistogram( void ChromotingInstance::UpdateUmaCustomHistogram( bool is_custom_counts_histogram, const std::string& histogram_name, - int64 value, + int64_t value, int histogram_min, int histogram_max, int histogram_buckets) { diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h index 9339ded..9eba3d1 100644 --- a/remoting/client/plugin/chromoting_instance.h +++ b/remoting/client/plugin/chromoting_instance.h @@ -5,8 +5,12 @@ #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ +#include <stddef.h> +#include <stdint.h> + #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/thread_task_runner_handle.h" @@ -165,14 +169,14 @@ class ChromotingInstance : public ClientUserInterface, // Updates the specified UMA enumeration histogram with the input value. void UpdateUmaEnumHistogram(const std::string& histogram_name, - int64 value, + int64_t value, int histogram_max); // Updates the specified UMA custom counts or custom times histogram with the // input value. void UpdateUmaCustomHistogram(bool is_custom_counts_histogram, const std::string& histogram_name, - int64 value, + int64_t value, int histogram_min, int histogram_max, int histogram_buckets); @@ -224,7 +228,7 @@ class ChromotingInstance : public ClientUserInterface, scoped_ptr<base::DictionaryValue> data); // Posts trapped keys to the web-app to handle. - void SendTrappedKey(uint32 usb_keycode, bool pressed); + void SendTrappedKey(uint32_t usb_keycode, bool pressed); // Callback for DelegatingSignalStrategy. void SendOutgoingIq(const std::string& iq); diff --git a/remoting/client/plugin/delegating_signal_strategy.h b/remoting/client/plugin/delegating_signal_strategy.h index 94a3190..6f87856 100644 --- a/remoting/client/plugin/delegating_signal_strategy.h +++ b/remoting/client/plugin/delegating_signal_strategy.h @@ -6,6 +6,7 @@ #define REMOTING_CLIENT_PLUGIN_DELEGATING_SIGNAL_STRATEGY_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/observer_list.h" #include "remoting/signaling/signal_strategy.h" diff --git a/remoting/client/plugin/pepper_address_resolver.h b/remoting/client/plugin/pepper_address_resolver.h index ae8fd19..c130751 100644 --- a/remoting/client/plugin/pepper_address_resolver.h +++ b/remoting/client/plugin/pepper_address_resolver.h @@ -5,6 +5,8 @@ #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_ADDRESS_RESOLVER_H_ #define REMOTING_CLIENT_PLUGIN_PEPPER_ADDRESS_RESOLVER_H_ +#include <stdint.h> + #include "base/macros.h" #include "ppapi/cpp/host_resolver.h" #include "ppapi/utility/completion_callback_factory.h" diff --git a/remoting/client/plugin/pepper_audio_player.cc b/remoting/client/plugin/pepper_audio_player.cc index 4b1f02a..90e83b5 100644 --- a/remoting/client/plugin/pepper_audio_player.cc +++ b/remoting/client/plugin/pepper_audio_player.cc @@ -22,7 +22,7 @@ PepperAudioPlayer::PepperAudioPlayer(pp::Instance* instance) PepperAudioPlayer::~PepperAudioPlayer() { } -uint32 PepperAudioPlayer::GetSamplesPerFrame() { +uint32_t PepperAudioPlayer::GetSamplesPerFrame() { return samples_per_frame_; } diff --git a/remoting/client/plugin/pepper_audio_player.h b/remoting/client/plugin/pepper_audio_player.h index dcf2c6b..eef697c 100644 --- a/remoting/client/plugin/pepper_audio_player.h +++ b/remoting/client/plugin/pepper_audio_player.h @@ -5,7 +5,10 @@ #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_AUDIO_PLAYER_H_ #define REMOTING_CLIENT_PLUGIN_PEPPER_AUDIO_PLAYER_H_ +#include <stdint.h> + #include "base/callback.h" +#include "base/macros.h" #include "ppapi/cpp/audio.h" #include "ppapi/cpp/instance.h" #include "remoting/client/audio_player.h" @@ -18,7 +21,7 @@ class PepperAudioPlayer : public AudioPlayer { explicit PepperAudioPlayer(pp::Instance* instance); ~PepperAudioPlayer() override; - uint32 GetSamplesPerFrame() override; + uint32_t GetSamplesPerFrame() override; bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate) override; @@ -27,7 +30,7 @@ class PepperAudioPlayer : public AudioPlayer { pp::Audio audio_; // The count of sample frames per channel in an audio buffer. - uint32 samples_per_frame_; + uint32_t samples_per_frame_; DISALLOW_COPY_AND_ASSIGN(PepperAudioPlayer); }; diff --git a/remoting/client/plugin/pepper_cursor_setter.cc b/remoting/client/plugin/pepper_cursor_setter.cc index 3d1effd..2e1a919 100644 --- a/remoting/client/plugin/pepper_cursor_setter.cc +++ b/remoting/client/plugin/pepper_cursor_setter.cc @@ -4,6 +4,8 @@ #include "remoting/client/plugin/pepper_cursor_setter.h" +#include <stdint.h> + #include "base/logging.h" #include "ppapi/cpp/image_data.h" #include "ppapi/cpp/mouse_cursor.h" @@ -66,7 +68,7 @@ bool PepperCursorSetter::SetInstanceCursor( const uint32_t* src_row_data = reinterpret_cast<const uint32_t*>( cursor_shape.data().data()); const int bytes_per_row = size.width() * kBytesPerPixel; - uint8* dst_row_data = reinterpret_cast<uint8*>(image.data()); + uint8_t* dst_row_data = reinterpret_cast<uint8_t*>(image.data()); for (int row = 0; row < size.height(); row++) { memcpy(dst_row_data, src_row_data, bytes_per_row); src_row_data += size.width(); diff --git a/remoting/client/plugin/pepper_cursor_setter.h b/remoting/client/plugin/pepper_cursor_setter.h index 1989599..daff3a52 100644 --- a/remoting/client/plugin/pepper_cursor_setter.h +++ b/remoting/client/plugin/pepper_cursor_setter.h @@ -5,6 +5,7 @@ #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_CURSOR_SETTER_H_ #define REMOTING_CLIENT_PLUGIN_PEPPER_CURSOR_SETTER_H_ +#include "base/macros.h" #include "ppapi/cpp/instance_handle.h" #include "remoting/protocol/cursor_shape_stub.h" diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc index 1621949..c25c566 100644 --- a/remoting/client/plugin/pepper_input_handler.cc +++ b/remoting/client/plugin/pepper_input_handler.cc @@ -4,6 +4,8 @@ #include "remoting/client/plugin/pepper_input_handler.h" +#include <stdint.h> + #include "base/logging.h" #include "ppapi/cpp/image_data.h" #include "ppapi/cpp/input_event.h" diff --git a/remoting/client/plugin/pepper_input_handler.h b/remoting/client/plugin/pepper_input_handler.h index 0218e5f..3c00221 100644 --- a/remoting/client/plugin/pepper_input_handler.h +++ b/remoting/client/plugin/pepper_input_handler.h @@ -5,6 +5,7 @@ #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ #define REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" namespace pp { diff --git a/remoting/client/plugin/pepper_main_thread_task_runner.h b/remoting/client/plugin/pepper_main_thread_task_runner.h index a6e839a..9b5c8e8 100644 --- a/remoting/client/plugin/pepper_main_thread_task_runner.h +++ b/remoting/client/plugin/pepper_main_thread_task_runner.h @@ -5,6 +5,8 @@ #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_ #define REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_ +#include <stdint.h> + #include "base/callback_forward.h" #include "base/compiler_specific.h" #include "base/macros.h" diff --git a/remoting/client/plugin/pepper_mouse_locker.h b/remoting/client/plugin/pepper_mouse_locker.h index 9eb30cb..5e54dd2 100644 --- a/remoting/client/plugin/pepper_mouse_locker.h +++ b/remoting/client/plugin/pepper_mouse_locker.h @@ -6,6 +6,7 @@ #define REMOTING_CLIENT_PLUGIN_PEPPER_MOUSE_LOCKER_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "ppapi/cpp/mouse_lock.h" #include "ppapi/utility/completion_callback_factory.h" diff --git a/remoting/client/plugin/pepper_network_manager.cc b/remoting/client/plugin/pepper_network_manager.cc index b019320..2d6ab1c 100644 --- a/remoting/client/plugin/pepper_network_manager.cc +++ b/remoting/client/plugin/pepper_network_manager.cc @@ -4,6 +4,8 @@ #include "remoting/client/plugin/pepper_network_manager.h" +#include <stddef.h> + #include "base/bind.h" #include "base/location.h" #include "base/single_thread_task_runner.h" diff --git a/remoting/client/plugin/pepper_network_manager.h b/remoting/client/plugin/pepper_network_manager.h index c761d3a..0907a53 100644 --- a/remoting/client/plugin/pepper_network_manager.h +++ b/remoting/client/plugin/pepper_network_manager.h @@ -5,6 +5,8 @@ #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_NETWORK_MANAGER_H_ #define REMOTING_CLIENT_PLUGIN_PEPPER_NETWORK_MANAGER_H_ +#include <stdint.h> + #include "base/compiler_specific.h" #include "base/memory/weak_ptr.h" #include "ppapi/cpp/instance_handle.h" diff --git a/remoting/client/plugin/pepper_packet_socket_factory.cc b/remoting/client/plugin/pepper_packet_socket_factory.cc index b8a1249..9735d01 100644 --- a/remoting/client/plugin/pepper_packet_socket_factory.cc +++ b/remoting/client/plugin/pepper_packet_socket_factory.cc @@ -4,8 +4,11 @@ #include "remoting/client/plugin/pepper_packet_socket_factory.h" +#include <stddef.h> + #include "base/bind.h" #include "base/logging.h" +#include "base/macros.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "ppapi/cpp/net_address.h" @@ -91,8 +94,8 @@ class UdpPacketSocket : public rtc::AsyncPacketSocket { // |min_port| and |max_port| are set to zero if the port number // should be assigned by the OS. bool Init(const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port); + uint16_t min_port, + uint16_t max_port); // rtc::AsyncPacketSocket interface. rtc::SocketAddress GetLocalAddress() const override; @@ -183,8 +186,8 @@ UdpPacketSocket::~UdpPacketSocket() { } bool UdpPacketSocket::Init(const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port) { + uint16_t min_port, + uint16_t max_port) { if (socket_.is_null()) { return false; } @@ -408,9 +411,9 @@ PepperPacketSocketFactory::~PepperPacketSocketFactory() { } rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket( - const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port) { + const rtc::SocketAddress& local_address, + uint16_t min_port, + uint16_t max_port) { scoped_ptr<UdpPacketSocket> result(new UdpPacketSocket(pp_instance_)); if (!result->Init(local_address, min_port, max_port)) return nullptr; @@ -419,8 +422,8 @@ rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateUdpSocket( rtc::AsyncPacketSocket* PepperPacketSocketFactory::CreateServerTcpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port, + uint16_t min_port, + uint16_t max_port, int opts) { // We don't use TCP sockets for remoting connections. NOTREACHED(); diff --git a/remoting/client/plugin/pepper_packet_socket_factory.h b/remoting/client/plugin/pepper_packet_socket_factory.h index d355ff3..c1f001a 100644 --- a/remoting/client/plugin/pepper_packet_socket_factory.h +++ b/remoting/client/plugin/pepper_packet_socket_factory.h @@ -5,7 +5,8 @@ #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_ #define REMOTING_CLIENT_PLUGIN_PEPPER_PACKET_SOCKET_FACTORY_H_ -#include "base/basictypes.h" +#include <stdint.h> + #include "base/compiler_specific.h" #include "base/macros.h" #include "ppapi/cpp/instance_handle.h" @@ -20,12 +21,12 @@ class PepperPacketSocketFactory : public rtc::PacketSocketFactory { rtc::AsyncPacketSocket* CreateUdpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port) override; + uint16_t min_port, + uint16_t max_port) override; rtc::AsyncPacketSocket* CreateServerTcpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port, + uint16_t min_port, + uint16_t max_port, int opts) override; rtc::AsyncPacketSocket* CreateClientTcpSocket( const rtc::SocketAddress& local_address, diff --git a/remoting/client/plugin/pepper_port_allocator.cc b/remoting/client/plugin/pepper_port_allocator.cc index 11fee075..0b24341 100644 --- a/remoting/client/plugin/pepper_port_allocator.cc +++ b/remoting/client/plugin/pepper_port_allocator.cc @@ -4,7 +4,10 @@ #include "remoting/client/plugin/pepper_port_allocator.h" +#include <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "net/base/net_util.h" #include "ppapi/c/pp_errors.h" diff --git a/remoting/client/plugin/pepper_port_allocator.h b/remoting/client/plugin/pepper_port_allocator.h index 76d447b..137a0d8 100644 --- a/remoting/client/plugin/pepper_port_allocator.h +++ b/remoting/client/plugin/pepper_port_allocator.h @@ -6,6 +6,7 @@ #define REMOTING_CLIENT_PLUGIN_PEPPER_PORT_ALLOCATOR_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "ppapi/cpp/instance_handle.h" #include "remoting/protocol/port_allocator_factory.h" diff --git a/remoting/client/plugin/pepper_video_renderer_2d.cc b/remoting/client/plugin/pepper_video_renderer_2d.cc index afb2e76..204fdc8 100644 --- a/remoting/client/plugin/pepper_video_renderer_2d.cc +++ b/remoting/client/plugin/pepper_video_renderer_2d.cc @@ -4,6 +4,8 @@ #include "remoting/client/plugin/pepper_video_renderer_2d.h" +#include <stdint.h> + #include "base/bind.h" #include "base/callback_helpers.h" #include "base/strings/string_util.h" diff --git a/remoting/client/plugin/pepper_video_renderer_2d.h b/remoting/client/plugin/pepper_video_renderer_2d.h index 1e59279..6a17f4d 100644 --- a/remoting/client/plugin/pepper_video_renderer_2d.h +++ b/remoting/client/plugin/pepper_video_renderer_2d.h @@ -8,6 +8,7 @@ #include <list> #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" diff --git a/remoting/client/plugin/pepper_video_renderer_3d.h b/remoting/client/plugin/pepper_video_renderer_3d.h index 2c229b6..414cffa 100644 --- a/remoting/client/plugin/pepper_video_renderer_3d.h +++ b/remoting/client/plugin/pepper_video_renderer_3d.h @@ -5,11 +5,13 @@ #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ +#include <stdint.h> + #include <deque> #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "ppapi/cpp/graphics_3d.h" #include "ppapi/cpp/instance_handle.h" diff --git a/remoting/client/software_video_renderer.h b/remoting/client/software_video_renderer.h index 5158e9d..d67e3e5 100644 --- a/remoting/client/software_video_renderer.h +++ b/remoting/client/software_video_renderer.h @@ -5,6 +5,9 @@ #ifndef REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_ #define REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_ +#include <stdint.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/remoting/client/software_video_renderer_unittest.cc b/remoting/client/software_video_renderer_unittest.cc index 6444fdc..9a36d72 100644 --- a/remoting/client/software_video_renderer_unittest.cc +++ b/remoting/client/software_video_renderer_unittest.cc @@ -4,6 +4,8 @@ #include "remoting/client/software_video_renderer.h" +#include <stdint.h> + #include <vector> #include "base/bind.h" diff --git a/remoting/client/token_fetcher_proxy.h b/remoting/client/token_fetcher_proxy.h index e71aa04..17916ce 100644 --- a/remoting/client/token_fetcher_proxy.h +++ b/remoting/client/token_fetcher_proxy.h @@ -6,6 +6,7 @@ #define REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "remoting/protocol/third_party_client_authenticator.h" diff --git a/remoting/client/touch_input_scaler.h b/remoting/client/touch_input_scaler.h index b9c93e8..290309f 100644 --- a/remoting/client/touch_input_scaler.h +++ b/remoting/client/touch_input_scaler.h @@ -5,6 +5,7 @@ #ifndef REMOTING_CLIENT_TOUCH_INPUT_SCALER_H_ #define REMOTING_CLIENT_TOUCH_INPUT_SCALER_H_ +#include "base/macros.h" #include "remoting/protocol/input_filter.h" #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" diff --git a/remoting/client/touch_input_scaler_unittest.cc b/remoting/client/touch_input_scaler_unittest.cc index 2e779f1..e36e43e 100644 --- a/remoting/client/touch_input_scaler_unittest.cc +++ b/remoting/client/touch_input_scaler_unittest.cc @@ -4,8 +4,11 @@ #include "remoting/client/touch_input_scaler.h" +#include <stdint.h> + #include <cmath> +#include "base/macros.h" #include "remoting/protocol/protocol_mock_objects.h" #include "remoting/protocol/test_event_matchers.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/remoting/codec/audio_decoder_opus.cc b/remoting/codec/audio_decoder_opus.cc index e7bd5ac..0bcabcc 100644 --- a/remoting/codec/audio_decoder_opus.cc +++ b/remoting/codec/audio_decoder_opus.cc @@ -4,6 +4,8 @@ #include "remoting/codec/audio_decoder_opus.h" +#include <stdint.h> + #include "base/logging.h" #include "base/stl_util.h" #include "base/time/time.h" @@ -106,8 +108,8 @@ scoped_ptr<AudioPacket> AudioDecoderOpus::Decode( int buffer_pos = 0; for (int i = 0; i < packet->data_size(); ++i) { - int16* pcm_buffer = - reinterpret_cast<int16*>(string_as_array(decoded_data) + buffer_pos); + int16_t* pcm_buffer = + reinterpret_cast<int16_t*>(string_as_array(decoded_data) + buffer_pos); CHECK_LE(buffer_pos + max_frame_bytes, static_cast<int>(decoded_data->size())); std::string* frame = packet->mutable_data(i); diff --git a/remoting/codec/audio_decoder_opus.h b/remoting/codec/audio_decoder_opus.h index dcf8776..553f77f 100644 --- a/remoting/codec/audio_decoder_opus.h +++ b/remoting/codec/audio_decoder_opus.h @@ -5,7 +5,7 @@ #ifndef REMOTING_CODEC_AUDIO_DECODER_OPUS_H_ #define REMOTING_CODEC_AUDIO_DECODER_OPUS_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/codec/audio_decoder.h" diff --git a/remoting/codec/audio_decoder_verbatim.h b/remoting/codec/audio_decoder_verbatim.h index e6d1172..2aabe4a 100644 --- a/remoting/codec/audio_decoder_verbatim.h +++ b/remoting/codec/audio_decoder_verbatim.h @@ -7,6 +7,7 @@ #include "remoting/codec/audio_decoder.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" namespace remoting { diff --git a/remoting/codec/audio_encoder_opus.cc b/remoting/codec/audio_encoder_opus.cc index 315fb9f..547ef50 100644 --- a/remoting/codec/audio_encoder_opus.cc +++ b/remoting/codec/audio_encoder_opus.cc @@ -86,8 +86,7 @@ void AudioEncoderOpus::InitEncoder() { leftover_samples_ = 0; leftover_buffer_size_ = frame_size_ + media::SincResampler::kDefaultRequestSize; - leftover_buffer_.reset( - new int16[leftover_buffer_size_ * channels_]); + leftover_buffer_.reset(new int16_t[leftover_buffer_size_ * channels_]); } void AudioEncoderOpus::DestroyEncoder() { @@ -150,8 +149,8 @@ scoped_ptr<AudioPacket> AudioEncoderOpus::Encode( } int samples_in_packet = packet->data(0).size() / kBytesPerSample / channels_; - const int16* next_sample = - reinterpret_cast<const int16*>(packet->data(0).data()); + const int16_t* next_sample = + reinterpret_cast<const int16_t*>(packet->data(0).data()); // Create a new packet of encoded data. scoped_ptr<AudioPacket> encoded_packet(new AudioPacket()); @@ -164,7 +163,7 @@ scoped_ptr<AudioPacket> AudioEncoderOpus::Encode( int samples_wanted = frame_size_ + prefetch_samples; while (leftover_samples_ + samples_in_packet >= samples_wanted) { - const int16* pcm_buffer = nullptr; + const int16_t* pcm_buffer = nullptr; // Combine the packet with the leftover samples, if any. if (leftover_samples_ > 0) { @@ -188,7 +187,7 @@ scoped_ptr<AudioPacket> AudioEncoderOpus::Encode( resampler_bus_->ToInterleaved(kFrameSamples, kBytesPerSample, resample_buffer_.get()); - pcm_buffer = reinterpret_cast<int16*>(resample_buffer_.get()); + pcm_buffer = reinterpret_cast<int16_t*>(resample_buffer_.get()); } else { samples_consumed = frame_size_; } diff --git a/remoting/codec/audio_encoder_opus.h b/remoting/codec/audio_encoder_opus.h index e1c67d5..5e227a6 100644 --- a/remoting/codec/audio_encoder_opus.h +++ b/remoting/codec/audio_encoder_opus.h @@ -7,6 +7,9 @@ #include "remoting/codec/audio_encoder.h" +#include <stdint.h> + +#include "base/macros.h" #include "remoting/proto/audio.pb.h" struct OpusEncoder; @@ -52,7 +55,7 @@ class AudioEncoderOpus : public AudioEncoder { int resampling_data_pos_; // Left-over unencoded samples from the previous AudioPacket. - scoped_ptr<int16[]> leftover_buffer_; + scoped_ptr<int16_t[]> leftover_buffer_; int leftover_buffer_size_; int leftover_samples_; diff --git a/remoting/codec/audio_encoder_opus_unittest.cc b/remoting/codec/audio_encoder_opus_unittest.cc index 52fac69..db731eb 100644 --- a/remoting/codec/audio_encoder_opus_unittest.cc +++ b/remoting/codec/audio_encoder_opus_unittest.cc @@ -5,6 +5,8 @@ // MSVC++ requires this to get M_PI. #define _USE_MATH_DEFINES #include <math.h> +#include <stddef.h> +#include <stdint.h> #include "remoting/codec/audio_encoder_opus.h" @@ -51,11 +53,10 @@ class OpusAudioEncoderTest : public testing::Test { // defines frequency of the signal. |channel| is used to calculate phase shift // of the signal, so that different signals are generated for left and right // channels. - static int16 GetSampleValue( - AudioPacket::SamplingRate rate, - double frequency_hz, - double pos, - int channel) { + static int16_t GetSampleValue(AudioPacket::SamplingRate rate, + double frequency_hz, + double pos, + int channel) { double angle = pos * 2 * M_PI * frequency_hz / rate + kChannelPhaseShift * channel; return static_cast<int>(sin(angle) * kMaxSampleValue + 0.5); @@ -68,7 +69,7 @@ class OpusAudioEncoderTest : public testing::Test { AudioPacket::SamplingRate rate, double frequency_hz, int pos) { - std::vector<int16> data(samples * kChannels); + std::vector<int16_t> data(samples * kChannels); for (int i = 0; i < samples; ++i) { data[i * kChannels] = GetSampleValue(rate, frequency_hz, i + pos, 0); data[i * kChannels + 1] = GetSampleValue(rate, frequency_hz, i + pos, 1); @@ -76,7 +77,7 @@ class OpusAudioEncoderTest : public testing::Test { scoped_ptr<AudioPacket> packet(new AudioPacket()); packet->add_data(reinterpret_cast<char*>(&(data[0])), - samples * kChannels * sizeof(int16)); + samples * kChannels * sizeof(int16_t)); packet->set_encoding(AudioPacket::ENCODING_RAW); packet->set_sampling_rate(rate); packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2); @@ -87,11 +88,11 @@ class OpusAudioEncoderTest : public testing::Test { // Decoded data is normally shifted in phase relative to the original signal. // This function returns the approximate shift in samples by finding the first // point when signal goes from negative to positive. - double EstimateSignalShift(const std::vector<int16>& received_data) { + double EstimateSignalShift(const std::vector<int16_t>& received_data) { for (size_t i = kSkippedFirstSamples; i < received_data.size() / kChannels - 1; i++) { - int16 this_sample = received_data[i * kChannels]; - int16 next_sample = received_data[(i + 1) * kChannels]; + int16_t this_sample = received_data[i * kChannels]; + int16_t next_sample = received_data[(i + 1) * kChannels]; if (this_sample < 0 && next_sample > 0) { return i + static_cast<double>(-this_sample) / (next_sample - this_sample); @@ -106,7 +107,7 @@ class OpusAudioEncoderTest : public testing::Test { void ValidateReceivedData(int samples, AudioPacket::SamplingRate rate, double frequency_hz, - const std::vector<int16>& received_data) { + const std::vector<int16_t>& received_data) { double shift = EstimateSignalShift(received_data); double diff_sqare_sum = 0; for (size_t i = kSkippedFirstSamples; @@ -132,7 +133,7 @@ class OpusAudioEncoderTest : public testing::Test { encoder_.reset(new AudioEncoderOpus()); decoder_.reset(new AudioDecoderOpus()); - std::vector<int16> received_data; + std::vector<int16_t> received_data; int pos = 0; for (; pos < kTotalTestSamples; pos += packet_size) { scoped_ptr<AudioPacket> source_packet = @@ -143,11 +144,11 @@ class OpusAudioEncoderTest : public testing::Test { scoped_ptr<AudioPacket> decoded = decoder_->Decode(encoded.Pass()); EXPECT_EQ(kDefaultSamplingRate, decoded->sampling_rate()); for (int i = 0; i < decoded->data_size(); ++i) { - const int16* data = - reinterpret_cast<const int16*>(decoded->data(i).data()); + const int16_t* data = + reinterpret_cast<const int16_t*>(decoded->data(i).data()); received_data.insert( received_data.end(), data, - data + decoded->data(i).size() / sizeof(int16)); + data + decoded->data(i).size() / sizeof(int16_t)); } } } diff --git a/remoting/codec/audio_encoder_verbatim.h b/remoting/codec/audio_encoder_verbatim.h index ad14032..f546bef 100644 --- a/remoting/codec/audio_encoder_verbatim.h +++ b/remoting/codec/audio_encoder_verbatim.h @@ -5,6 +5,7 @@ #ifndef REMOTING_CODEC_AUDIO_ENCODER_VERBATIM_H_ #define REMOTING_CODEC_AUDIO_ENCODER_VERBATIM_H_ +#include "base/macros.h" #include "remoting/codec/audio_encoder.h" namespace remoting { diff --git a/remoting/codec/codec_test.cc b/remoting/codec/codec_test.cc index cec0043..bf71b6f 100644 --- a/remoting/codec/codec_test.cc +++ b/remoting/codec/codec_test.cc @@ -2,11 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <deque> +#include <stddef.h> +#include <stdint.h> #include <stdlib.h> +#include <deque> #include "base/bind.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "media/base/video_frame.h" #include "remoting/base/util.h" diff --git a/remoting/codec/video_decoder.h b/remoting/codec/video_decoder.h index 65d488e..3ed5f5a 100644 --- a/remoting/codec/video_decoder.h +++ b/remoting/codec/video_decoder.h @@ -5,7 +5,6 @@ #ifndef REMOTING_CODEC_VIDEO_DECODER_H_ #define REMOTING_CODEC_VIDEO_DECODER_H_ -#include "base/basictypes.h" namespace webrtc { class DesktopFrame; diff --git a/remoting/codec/video_decoder_verbatim.cc b/remoting/codec/video_decoder_verbatim.cc index 0d7e8da..42505bd 100644 --- a/remoting/codec/video_decoder_verbatim.cc +++ b/remoting/codec/video_decoder_verbatim.cc @@ -4,6 +4,8 @@ #include "remoting/codec/video_decoder_verbatim.h" +#include <stdint.h> + #include "base/logging.h" #include "remoting/base/util.h" #include "remoting/proto/video.pb.h" diff --git a/remoting/codec/video_decoder_verbatim.h b/remoting/codec/video_decoder_verbatim.h index cad36ca..f1d7784 100644 --- a/remoting/codec/video_decoder_verbatim.h +++ b/remoting/codec/video_decoder_verbatim.h @@ -6,6 +6,7 @@ #define REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/codec/video_decoder.h" #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" diff --git a/remoting/codec/video_decoder_vpx.cc b/remoting/codec/video_decoder_vpx.cc index 5c766a0..4d27955 100644 --- a/remoting/codec/video_decoder_vpx.cc +++ b/remoting/codec/video_decoder_vpx.cc @@ -5,6 +5,7 @@ #include "remoting/codec/video_decoder_vpx.h" #include <math.h> +#include <stdint.h> #include "base/logging.h" #include "remoting/base/util.h" @@ -82,7 +83,7 @@ bool VideoDecoderVpx::DecodePacket(const VideoPacket& packet, webrtc::DesktopFrame* frame) { // Pass the packet to the codec to process. vpx_codec_err_t ret = vpx_codec_decode( - codec_.get(), reinterpret_cast<const uint8*>(packet.data().data()), + codec_.get(), reinterpret_cast<const uint8_t*>(packet.data().data()), packet.data().size(), nullptr, 0); if (ret != VPX_CODEC_OK) { const char* error = vpx_codec_error(codec_.get()); diff --git a/remoting/codec/video_decoder_vpx.h b/remoting/codec/video_decoder_vpx.h index 81ba9e4..d002988 100644 --- a/remoting/codec/video_decoder_vpx.h +++ b/remoting/codec/video_decoder_vpx.h @@ -6,6 +6,7 @@ #define REMOTING_CODEC_VIDEO_DECODER_VPX_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/codec/scoped_vpx_codec.h" #include "remoting/codec/video_decoder.h" diff --git a/remoting/codec/video_encoder_helper.h b/remoting/codec/video_encoder_helper.h index c33fdb9..65e4acc 100644 --- a/remoting/codec/video_encoder_helper.h +++ b/remoting/codec/video_encoder_helper.h @@ -5,6 +5,7 @@ #ifndef REMOTING_CODEC_VIDEO_ENCODER_HELPER_H_ #define REMOTING_CODEC_VIDEO_ENCODER_HELPER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" diff --git a/remoting/codec/video_encoder_verbatim.cc b/remoting/codec/video_encoder_verbatim.cc index 8d1befb..ce65490 100644 --- a/remoting/codec/video_encoder_verbatim.cc +++ b/remoting/codec/video_encoder_verbatim.cc @@ -4,6 +4,9 @@ #include "remoting/codec/video_encoder_verbatim.h" +#include <stddef.h> +#include <stdint.h> + #include "base/logging.h" #include "base/stl_util.h" #include "remoting/base/util.h" diff --git a/remoting/codec/video_encoder_verbatim.h b/remoting/codec/video_encoder_verbatim.h index 1a348be..0e76b43 100644 --- a/remoting/codec/video_encoder_verbatim.h +++ b/remoting/codec/video_encoder_verbatim.h @@ -5,6 +5,7 @@ #ifndef REMOTING_CODEC_VIDEO_ENCODER_VERBATIM_H_ #define REMOTING_CODEC_VIDEO_ENCODER_VERBATIM_H_ +#include "base/macros.h" #include "remoting/codec/video_encoder.h" #include "remoting/codec/video_encoder_helper.h" diff --git a/remoting/codec/video_encoder_vpx.cc b/remoting/codec/video_encoder_vpx.cc index 0dcd456..bea9a8a 100644 --- a/remoting/codec/video_encoder_vpx.cc +++ b/remoting/codec/video_encoder_vpx.cc @@ -149,7 +149,7 @@ void SetVp9CodecOptions(vpx_codec_ctx_t* codec, bool lossless_encode) { void FreeImageIfMismatched(bool use_i444, const webrtc::DesktopSize& size, scoped_ptr<vpx_image_t>* out_image, - scoped_ptr<uint8[]>* out_image_buffer) { + scoped_ptr<uint8_t[]>* out_image_buffer) { if (*out_image) { const vpx_img_fmt_t desired_fmt = use_i444 ? VPX_IMG_FMT_I444 : VPX_IMG_FMT_I420; @@ -164,7 +164,7 @@ void FreeImageIfMismatched(bool use_i444, void CreateImage(bool use_i444, const webrtc::DesktopSize& size, scoped_ptr<vpx_image_t>* out_image, - scoped_ptr<uint8[]>* out_image_buffer) { + scoped_ptr<uint8_t[]>* out_image_buffer) { DCHECK(!size.is_empty()); DCHECK(!*out_image_buffer); DCHECK(!*out_image); @@ -207,7 +207,7 @@ void CreateImage(bool use_i444, // Allocate a YUV buffer large enough for the aligned data & padding. const int buffer_size = y_stride * y_rows + 2*uv_stride * uv_rows; - scoped_ptr<uint8[]> image_buffer(new uint8[buffer_size]); + scoped_ptr<uint8_t[]> image_buffer(new uint8_t[buffer_size]); // Reset image value to 128 so we just need to fill in the y plane. memset(image_buffer.get(), 128, buffer_size); @@ -360,7 +360,7 @@ void VideoEncoderVpx::Configure(const webrtc::DesktopSize& size) { (size.width() + kMacroBlockSize - 1) / kMacroBlockSize, (size.height() + kMacroBlockSize - 1) / kMacroBlockSize); active_map_.reset( - new uint8[active_map_size_.width() * active_map_size_.height()]); + new uint8_t[active_map_size_.width() * active_map_size_.height()]); // TODO(wez): Remove this hack once VPX can handle frame size reconfiguration. // See https://code.google.com/p/webm/issues/detail?id=912. @@ -447,14 +447,14 @@ void VideoEncoderVpx::PrepareImage(const webrtc::DesktopFrame& frame, } // Convert the updated region to YUV ready for encoding. - const uint8* rgb_data = frame.data(); + const uint8_t* rgb_data = frame.data(); const int rgb_stride = frame.stride(); const int y_stride = image_->stride[0]; DCHECK_EQ(image_->stride[1], image_->stride[2]); const int uv_stride = image_->stride[1]; - uint8* y_data = image_->planes[0]; - uint8* u_data = image_->planes[1]; - uint8* v_data = image_->planes[2]; + uint8_t* y_data = image_->planes[0]; + uint8_t* u_data = image_->planes[1]; + uint8_t* v_data = image_->planes[2]; switch (image_->fmt) { case VPX_IMG_FMT_I444: @@ -509,7 +509,7 @@ void VideoEncoderVpx::SetActiveMapFromRegion( DCHECK_LT(right, active_map_size_.width()); DCHECK_LT(bottom, active_map_size_.height()); - uint8* map = active_map_.get() + top * active_map_size_.width(); + uint8_t* map = active_map_.get() + top * active_map_size_.width(); for (int y = top; y <= bottom; ++y) { for (int x = left; x <= right; ++x) map[x] = 1; @@ -520,7 +520,7 @@ void VideoEncoderVpx::SetActiveMapFromRegion( void VideoEncoderVpx::UpdateRegionFromActiveMap( webrtc::DesktopRegion* updated_region) { - const uint8* map = active_map_.get(); + const uint8_t* map = active_map_.get(); for (int y = 0; y < active_map_size_.height(); ++y) { for (int x0 = 0; x0 < active_map_size_.width();) { int x1 = x0; diff --git a/remoting/codec/video_encoder_vpx.h b/remoting/codec/video_encoder_vpx.h index 7d80592..83c3549 100644 --- a/remoting/codec/video_encoder_vpx.h +++ b/remoting/codec/video_encoder_vpx.h @@ -5,7 +5,10 @@ #ifndef REMOTING_CODEC_VIDEO_ENCODER_VPX_H_ #define REMOTING_CODEC_VIDEO_ENCODER_VPX_H_ +#include <stdint.h> + #include "base/callback.h" +#include "base/macros.h" #include "base/time/time.h" #include "remoting/codec/scoped_vpx_codec.h" #include "remoting/codec/video_encoder.h" @@ -69,10 +72,10 @@ class VideoEncoderVpx : public VideoEncoder { // VPX image and buffer to hold the actual YUV planes. scoped_ptr<vpx_image_t> image_; - scoped_ptr<uint8[]> image_buffer_; + scoped_ptr<uint8_t[]> image_buffer_; // Active map used to optimize out processing of un-changed macroblocks. - scoped_ptr<uint8[]> active_map_; + scoped_ptr<uint8_t[]> active_map_; webrtc::DesktopSize active_map_size_; // True if the codec wants unchanged frames to finish topping-off with. diff --git a/remoting/codec/video_encoder_vpx_perftest.cc b/remoting/codec/video_encoder_vpx_perftest.cc index 3dc4ef1..0c2cf7f 100644 --- a/remoting/codec/video_encoder_vpx_perftest.cc +++ b/remoting/codec/video_encoder_vpx_perftest.cc @@ -4,10 +4,13 @@ #include "remoting/codec/video_encoder_vpx.h" +#include <stddef.h> + #include <limits> #include <vector> #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/codec/codec_test.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/remoting/codec/video_encoder_vpx_unittest.cc b/remoting/codec/video_encoder_vpx_unittest.cc index a847f03..edca813 100644 --- a/remoting/codec/video_encoder_vpx_unittest.cc +++ b/remoting/codec/video_encoder_vpx_unittest.cc @@ -4,6 +4,8 @@ #include "remoting/codec/video_encoder_vpx.h" +#include <stdint.h> + #include <limits> #include <vector> @@ -16,8 +18,8 @@ namespace remoting { // xRGB pixel colors for use by tests. -const uint32 kBlueColor = 0x0000ff; -const uint32 kGreenColor = 0x00ff00; +const uint32_t kBlueColor = 0x0000ff; +const uint32_t kGreenColor = 0x00ff00; // Creates a frame stippled between blue and red pixels, which is useful for // lossy/lossless encode and color tests. By default all pixels in the frame @@ -28,9 +30,9 @@ static scoped_ptr<webrtc::DesktopFrame> CreateTestFrame( new webrtc::BasicDesktopFrame(frame_size)); for (int x = 0; x < frame_size.width(); ++x) { for (int y = 0; y < frame_size.height(); ++y) { - uint8* pixel_u8 = frame->data() + (y * frame->stride()) + - (x * webrtc::DesktopFrame::kBytesPerPixel); - *(reinterpret_cast<uint32*>(pixel_u8)) = + uint8_t* pixel_u8 = frame->data() + (y * frame->stride()) + + (x * webrtc::DesktopFrame::kBytesPerPixel); + *(reinterpret_cast<uint32_t*>(pixel_u8)) = ((x + y) & 1) ? kGreenColor : kBlueColor; } } diff --git a/remoting/protocol/audio_reader.h b/remoting/protocol/audio_reader.h index c4bced7..9318543 100644 --- a/remoting/protocol/audio_reader.h +++ b/remoting/protocol/audio_reader.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_AUDIO_READER_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "remoting/proto/audio.pb.h" #include "remoting/protocol/audio_stub.h" #include "remoting/protocol/channel_dispatcher_base.h" diff --git a/remoting/protocol/audio_stub.h b/remoting/protocol/audio_stub.h index d32a674..d8db746 100644 --- a/remoting/protocol/audio_stub.h +++ b/remoting/protocol/audio_stub.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_AUDIO_STUB_H_ #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" namespace remoting { diff --git a/remoting/protocol/audio_writer.h b/remoting/protocol/audio_writer.h index 49dfb7f..da591df 100644 --- a/remoting/protocol/audio_writer.h +++ b/remoting/protocol/audio_writer.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 "remoting/protocol/audio_stub.h" #include "remoting/protocol/channel_dispatcher_base.h" diff --git a/remoting/protocol/auth_util.h b/remoting/protocol/auth_util.h index e73fee8..61f98cf 100644 --- a/remoting/protocol/auth_util.h +++ b/remoting/protocol/auth_util.h @@ -5,6 +5,8 @@ #ifndef REMOTING_PROTOCOL_AUTH_UTIL_H_ #define REMOTING_PROTOCOL_AUTH_UTIL_H_ +#include <stddef.h> + #include <string> #include "base/strings/string_piece.h" diff --git a/remoting/protocol/authentication_method.cc b/remoting/protocol/authentication_method.cc index e584efc..d02a19f 100644 --- a/remoting/protocol/authentication_method.cc +++ b/remoting/protocol/authentication_method.cc @@ -4,6 +4,8 @@ #include "remoting/protocol/authentication_method.h" +#include <stddef.h> + #include "base/base64.h" #include "base/logging.h" #include "crypto/hmac.h" diff --git a/remoting/protocol/authenticator_test_base.h b/remoting/protocol/authenticator_test_base.h index 12b4b32..0cd4cac 100644 --- a/remoting/protocol/authenticator_test_base.h +++ b/remoting/protocol/authenticator_test_base.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/message_loop/message_loop.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/remoting/protocol/capture_scheduler.cc b/remoting/protocol/capture_scheduler.cc index 1e8f73a..40eba9c 100644 --- a/remoting/protocol/capture_scheduler.cc +++ b/remoting/protocol/capture_scheduler.cc @@ -19,7 +19,7 @@ namespace { const int kStatisticsWindow = 3; // The hard limit is 30fps or 33ms per recording cycle. -const int64 kDefaultMinimumIntervalMs = 33; +const int64_t kDefaultMinimumIntervalMs = 33; // Controls how much CPU time we can use for encode and capture. // Range of this value is between 0 to 1. 0 means using 0% of of all CPUs diff --git a/remoting/protocol/capture_scheduler.h b/remoting/protocol/capture_scheduler.h index 0b01c63..54e2229d 100644 --- a/remoting/protocol/capture_scheduler.h +++ b/remoting/protocol/capture_scheduler.h @@ -5,6 +5,8 @@ #ifndef REMOTING_PROTOCOL_CAPTURE_SCHEDULER_H_ #define REMOTING_PROTOCOL_CAPTURE_SCHEDULER_H_ +#include <stdint.h> + #include "base/callback.h" #include "base/macros.h" #include "base/threading/thread_checker.h" diff --git a/remoting/protocol/capture_scheduler_unittest.cc b/remoting/protocol/capture_scheduler_unittest.cc index a6dcc87..f3546fa 100644 --- a/remoting/protocol/capture_scheduler_unittest.cc +++ b/remoting/protocol/capture_scheduler_unittest.cc @@ -4,6 +4,9 @@ #include "remoting/protocol/capture_scheduler.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/test/simple_test_tick_clock.h" #include "base/timer/mock_timer.h" diff --git a/remoting/protocol/channel_dispatcher_base.h b/remoting/protocol/channel_dispatcher_base.h index 9d202d8..06d2c79 100644 --- a/remoting/protocol/channel_dispatcher_base.h +++ b/remoting/protocol/channel_dispatcher_base.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 "remoting/base/buffered_socket_writer.h" #include "remoting/protocol/errors.h" diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc index ff5f990..879b60b2 100644 --- a/remoting/protocol/channel_multiplexer.cc +++ b/remoting/protocol/channel_multiplexer.cc @@ -4,12 +4,14 @@ #include "remoting/protocol/channel_multiplexer.h" +#include <stddef.h> #include <string.h> #include "base/bind.h" #include "base/callback.h" #include "base/callback_helpers.h" #include "base/location.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/stl_util.h" #include "base/thread_task_runner_handle.h" diff --git a/remoting/protocol/channel_multiplexer.h b/remoting/protocol/channel_multiplexer.h index e503df5..8f5c475 100644 --- a/remoting/protocol/channel_multiplexer.h +++ b/remoting/protocol/channel_multiplexer.h @@ -5,6 +5,7 @@ #ifndef REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ #define REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "remoting/base/buffered_socket_writer.h" #include "remoting/proto/mux.pb.h" diff --git a/remoting/protocol/channel_socket_adapter.h b/remoting/protocol/channel_socket_adapter.h index f4a339f..9da2a90 100644 --- a/remoting/protocol/channel_socket_adapter.h +++ b/remoting/protocol/channel_socket_adapter.h @@ -5,8 +5,11 @@ #ifndef REMOTING_PROTOCOL_CHANNEL_SOCKET_ADAPTER_H_ #define REMOTING_PROTOCOL_CHANNEL_SOCKET_ADAPTER_H_ +#include <stddef.h> + #include "base/callback_forward.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/threading/thread_checker.h" #include "remoting/protocol/p2p_datagram_socket.h" #include "third_party/webrtc/base/asyncpacketsocket.h" diff --git a/remoting/protocol/channel_socket_adapter_unittest.cc b/remoting/protocol/channel_socket_adapter_unittest.cc index aa1efc6..3ecab7e 100644 --- a/remoting/protocol/channel_socket_adapter_unittest.cc +++ b/remoting/protocol/channel_socket_adapter_unittest.cc @@ -4,6 +4,9 @@ #include "remoting/protocol/channel_socket_adapter.h" +#include <stddef.h> +#include <stdint.h> + #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" @@ -52,12 +55,13 @@ class MockTransportChannel : public cricket::TransportChannel { rtc::scoped_refptr<rtc::RTCCertificate>()); MOCK_CONST_METHOD1(GetRemoteSSLCertificate, bool(rtc::SSLCertificate** cert)); - MOCK_METHOD6(ExportKeyingMaterial, bool(const std::string& label, - const uint8* context, - size_t context_len, - bool use_context, - uint8* result, - size_t result_len)); + MOCK_METHOD6(ExportKeyingMaterial, + bool(const std::string& label, + const uint8_t* context, + size_t context_len, + bool use_context, + uint8_t* result, + size_t result_len)); }; class TransportChannelSocketAdapterTest : public testing::Test { diff --git a/remoting/protocol/chromium_port_allocator.cc b/remoting/protocol/chromium_port_allocator.cc index 5a5c103..a13ec88 100644 --- a/remoting/protocol/chromium_port_allocator.cc +++ b/remoting/protocol/chromium_port_allocator.cc @@ -5,6 +5,7 @@ #include "remoting/protocol/chromium_port_allocator.h" #include "base/bind.h" +#include "base/macros.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "net/http/http_status_code.h" diff --git a/remoting/protocol/chromium_port_allocator.h b/remoting/protocol/chromium_port_allocator.h index 65d5799..b3701f5 100644 --- a/remoting/protocol/chromium_port_allocator.h +++ b/remoting/protocol/chromium_port_allocator.h @@ -7,6 +7,7 @@ #include <set> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "remoting/protocol/port_allocator_factory.h" diff --git a/remoting/protocol/chromium_socket_factory.cc b/remoting/protocol/chromium_socket_factory.cc index 6b2c4fc..6f9dfeb 100644 --- a/remoting/protocol/chromium_socket_factory.cc +++ b/remoting/protocol/chromium_socket_factory.cc @@ -4,8 +4,11 @@ #include "remoting/protocol/chromium_socket_factory.h" +#include <stddef.h> + #include "base/bind.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "jingle/glue/utils.h" #include "net/base/io_buffer.h" @@ -36,7 +39,8 @@ class UdpPacketSocket : public rtc::AsyncPacketSocket { ~UdpPacketSocket() override; bool Init(const rtc::SocketAddress& local_address, - uint16 min_port, uint16 max_port); + uint16_t min_port, + uint16_t max_port); // rtc::AsyncPacketSocket interface. rtc::SocketAddress GetLocalAddress() const override; @@ -115,17 +119,18 @@ UdpPacketSocket::~UdpPacketSocket() { } bool UdpPacketSocket::Init(const rtc::SocketAddress& local_address, - uint16 min_port, uint16 max_port) { + uint16_t min_port, + uint16_t max_port) { net::IPEndPoint local_endpoint; if (!jingle_glue::SocketAddressToIPEndPoint( local_address, &local_endpoint)) { return false; } - for (uint32 port = min_port; port <= max_port; ++port) { + for (uint32_t port = min_port; port <= max_port; ++port) { socket_.reset(new net::UDPServerSocket(nullptr, net::NetLog::Source())); int result = socket_->Listen( - net::IPEndPoint(local_endpoint.address(), static_cast<uint16>(port))); + net::IPEndPoint(local_endpoint.address(), static_cast<uint16_t>(port))); if (result == net::OK) { break; } else { @@ -360,18 +365,19 @@ ChromiumPacketSocketFactory::~ChromiumPacketSocketFactory() { } rtc::AsyncPacketSocket* ChromiumPacketSocketFactory::CreateUdpSocket( - const rtc::SocketAddress& local_address, - uint16 min_port, uint16 max_port) { + const rtc::SocketAddress& local_address, + uint16_t min_port, + uint16_t max_port) { scoped_ptr<UdpPacketSocket> result(new UdpPacketSocket()); if (!result->Init(local_address, min_port, max_port)) return nullptr; return result.release(); } -rtc::AsyncPacketSocket* -ChromiumPacketSocketFactory::CreateServerTcpSocket( +rtc::AsyncPacketSocket* ChromiumPacketSocketFactory::CreateServerTcpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, uint16 max_port, + uint16_t min_port, + uint16_t max_port, int opts) { // We don't use TCP sockets for remoting connections. NOTIMPLEMENTED(); diff --git a/remoting/protocol/chromium_socket_factory.h b/remoting/protocol/chromium_socket_factory.h index 6bf7696..2503edd 100644 --- a/remoting/protocol/chromium_socket_factory.h +++ b/remoting/protocol/chromium_socket_factory.h @@ -5,7 +5,8 @@ #ifndef REMOTING_PROTOCOL_CHROMIUM_SOCKET_FACTORY_H_ #define REMOTING_PROTOCOL_CHROMIUM_SOCKET_FACTORY_H_ -#include "base/basictypes.h" +#include <stdint.h> + #include "base/compiler_specific.h" #include "base/macros.h" #include "third_party/webrtc/p2p/base/packetsocketfactory.h" @@ -20,12 +21,12 @@ class ChromiumPacketSocketFactory : public rtc::PacketSocketFactory { rtc::AsyncPacketSocket* CreateUdpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port) override; + uint16_t min_port, + uint16_t max_port) override; rtc::AsyncPacketSocket* CreateServerTcpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port, + uint16_t min_port, + uint16_t max_port, int opts) override; rtc::AsyncPacketSocket* CreateClientTcpSocket( const rtc::SocketAddress& local_address, diff --git a/remoting/protocol/chromium_socket_factory_unittest.cc b/remoting/protocol/chromium_socket_factory_unittest.cc index 1f13109..db31920 100644 --- a/remoting/protocol/chromium_socket_factory_unittest.cc +++ b/remoting/protocol/chromium_socket_factory_unittest.cc @@ -4,6 +4,9 @@ #include "remoting/protocol/chromium_socket_factory.h" +#include <stddef.h> +#include <stdint.h> + #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "testing/gmock/include/gmock/gmock.h" @@ -84,8 +87,8 @@ TEST_F(ChromiumSocketFactoryTest, SetOptions) { } TEST_F(ChromiumSocketFactoryTest, PortRange) { - const uint16 kMinPort = 12400; - const uint16 kMaxPort = 12410; + const uint16_t kMinPort = 12400; + const uint16_t kMaxPort = 12410; socket_.reset(socket_factory_->CreateUdpSocket( rtc::SocketAddress("127.0.0.1", 0), kMaxPort, kMaxPort)); ASSERT_TRUE(socket_.get() != nullptr); diff --git a/remoting/protocol/client_control_dispatcher.cc b/remoting/protocol/client_control_dispatcher.cc index f8cdc51..2005342 100644 --- a/remoting/protocol/client_control_dispatcher.cc +++ b/remoting/protocol/client_control_dispatcher.cc @@ -4,6 +4,8 @@ #include "remoting/protocol/client_control_dispatcher.h" +#include <stdint.h> + #include "base/bind_helpers.h" #include "base/callback.h" #include "base/callback_helpers.h" @@ -44,7 +46,7 @@ bool CursorShapeIsValid(const CursorShapeInfo& cursor_shape) { return false; } - uint32 cursor_total_bytes = width * height * kBytesPerPixel; + uint32_t cursor_total_bytes = width * height * kBytesPerPixel; if (cursor_shape.data().size() < cursor_total_bytes) { LOG(ERROR) << "Expected " << cursor_total_bytes << " bytes for a " << width << "x" << height << " cursor. Only received " diff --git a/remoting/protocol/client_control_dispatcher.h b/remoting/protocol/client_control_dispatcher.h index 176a20d..daf31d0 100644 --- a/remoting/protocol/client_control_dispatcher.h +++ b/remoting/protocol/client_control_dispatcher.h @@ -5,6 +5,7 @@ #ifndef REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ #define REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "remoting/protocol/channel_dispatcher_base.h" #include "remoting/protocol/clipboard_stub.h" diff --git a/remoting/protocol/client_event_dispatcher.h b/remoting/protocol/client_event_dispatcher.h index 22b1588..97c6b04 100644 --- a/remoting/protocol/client_event_dispatcher.h +++ b/remoting/protocol/client_event_dispatcher.h @@ -5,6 +5,7 @@ #ifndef REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_ #define REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "remoting/protocol/channel_dispatcher_base.h" #include "remoting/protocol/input_stub.h" diff --git a/remoting/protocol/client_stub.h b/remoting/protocol/client_stub.h index 6db7b91..79d7339 100644 --- a/remoting/protocol/client_stub.h +++ b/remoting/protocol/client_stub.h @@ -10,7 +10,7 @@ #ifndef REMOTING_PROTOCOL_CLIENT_STUB_H_ #define REMOTING_PROTOCOL_CLIENT_STUB_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "remoting/protocol/clipboard_stub.h" #include "remoting/protocol/cursor_shape_stub.h" diff --git a/remoting/protocol/client_video_dispatcher.h b/remoting/protocol/client_video_dispatcher.h index 0c01087..57f950c 100644 --- a/remoting/protocol/client_video_dispatcher.h +++ b/remoting/protocol/client_video_dispatcher.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_CLIENT_VIDEO_DISPATCHER_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "remoting/proto/video.pb.h" #include "remoting/protocol/channel_dispatcher_base.h" diff --git a/remoting/protocol/clipboard_echo_filter.h b/remoting/protocol/clipboard_echo_filter.h index 4e20d3b..e3777a6 100644 --- a/remoting/protocol/clipboard_echo_filter.h +++ b/remoting/protocol/clipboard_echo_filter.h @@ -9,6 +9,7 @@ #include <string> #include "base/compiler_specific.h" +#include "base/macros.h" #include "remoting/protocol/clipboard_stub.h" namespace remoting { diff --git a/remoting/protocol/clipboard_filter.h b/remoting/protocol/clipboard_filter.h index 5457447..c2c5215 100644 --- a/remoting/protocol/clipboard_filter.h +++ b/remoting/protocol/clipboard_filter.h @@ -5,8 +5,8 @@ #ifndef REMOTING_PROTOCOL_CLIPBOARD_FILTER_H_ #define REMOTING_PROTOCOL_CLIPBOARD_FILTER_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "remoting/protocol/clipboard_stub.h" namespace remoting { diff --git a/remoting/protocol/clipboard_stub.h b/remoting/protocol/clipboard_stub.h index e15f44a..1c6b8fb 100644 --- a/remoting/protocol/clipboard_stub.h +++ b/remoting/protocol/clipboard_stub.h @@ -8,7 +8,7 @@ #ifndef REMOTING_PROTOCOL_CLIPBOARD_STUB_H_ #define REMOTING_PROTOCOL_CLIPBOARD_STUB_H_ -#include "base/basictypes.h" +#include "base/macros.h" namespace remoting { namespace protocol { diff --git a/remoting/protocol/clipboard_thread_proxy.h b/remoting/protocol/clipboard_thread_proxy.h index bdb654d..7c4c6e3 100644 --- a/remoting/protocol/clipboard_thread_proxy.h +++ b/remoting/protocol/clipboard_thread_proxy.h @@ -8,6 +8,7 @@ #ifndef REMOTING_PROTOCOL_CLIPBOARD_THREAD_PROXY_H_ #define REMOTING_PROTOCOL_CLIPBOARD_THREAD_PROXY_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/task_runner.h" #include "remoting/protocol/clipboard_stub.h" diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h index 966e80d..3cdca44 100644 --- a/remoting/protocol/connection_to_client.h +++ b/remoting/protocol/connection_to_client.h @@ -5,6 +5,8 @@ #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ +#include <stdint.h> + #include <string> #include "remoting/protocol/transport.h" diff --git a/remoting/protocol/connection_unittest.cc b/remoting/protocol/connection_unittest.cc index e95abcc..30ff451 100644 --- a/remoting/protocol/connection_unittest.cc +++ b/remoting/protocol/connection_unittest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/bind.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "remoting/base/constants.h" diff --git a/remoting/protocol/cursor_shape_stub.h b/remoting/protocol/cursor_shape_stub.h index 3c96cbe..b59d2ad 100644 --- a/remoting/protocol/cursor_shape_stub.h +++ b/remoting/protocol/cursor_shape_stub.h @@ -7,7 +7,7 @@ #ifndef REMOTING_PROTOCOL_CURSOR_SHAPE_STUB_H_ #define REMOTING_PROTOCOL_CURSOR_SHAPE_STUB_H_ -#include "base/basictypes.h" +#include "base/macros.h" namespace remoting { namespace protocol { diff --git a/remoting/protocol/datagram_channel_factory.h b/remoting/protocol/datagram_channel_factory.h index a175b30..2e19fc2 100644 --- a/remoting/protocol/datagram_channel_factory.h +++ b/remoting/protocol/datagram_channel_factory.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" namespace remoting { diff --git a/remoting/protocol/fake_authenticator.h b/remoting/protocol/fake_authenticator.h index 6c153df..d041395 100644 --- a/remoting/protocol/fake_authenticator.h +++ b/remoting/protocol/fake_authenticator.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_FAKE_AUTHENTICATOR_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "remoting/protocol/authenticator.h" #include "remoting/protocol/channel_authenticator.h" diff --git a/remoting/protocol/fake_connection_to_client.h b/remoting/protocol/fake_connection_to_client.h index 1176a68..bce93aa 100644 --- a/remoting/protocol/fake_connection_to_client.h +++ b/remoting/protocol/fake_connection_to_client.h @@ -5,6 +5,8 @@ #ifndef REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_ #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_ +#include <stdint.h> + #include "base/callback.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" diff --git a/remoting/protocol/fake_connection_to_host.h b/remoting/protocol/fake_connection_to_host.h index 508d1ea..668196e 100644 --- a/remoting/protocol/fake_connection_to_host.h +++ b/remoting/protocol/fake_connection_to_host.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "remoting/protocol/connection_to_host.h" #include "remoting/protocol/protocol_mock_objects.h" diff --git a/remoting/protocol/fake_datagram_socket.h b/remoting/protocol/fake_datagram_socket.h index a22751d..49735b6 100644 --- a/remoting/protocol/fake_datagram_socket.h +++ b/remoting/protocol/fake_datagram_socket.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "net/base/completion_callback.h" diff --git a/remoting/protocol/fake_desktop_capturer.cc b/remoting/protocol/fake_desktop_capturer.cc index bfa34f1..01c6bdd 100644 --- a/remoting/protocol/fake_desktop_capturer.cc +++ b/remoting/protocol/fake_desktop_capturer.cc @@ -4,8 +4,11 @@ #include "remoting/protocol/fake_desktop_capturer.h" +#include <stdint.h> + #include "base/bind.h" #include "base/logging.h" +#include "base/macros.h" #include "base/time/time.h" #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" @@ -89,8 +92,8 @@ scoped_ptr<webrtc::DesktopFrame> DefaultFrameGenerator::GenerateFrame( // cyan....yellow // .............. // blue.......red - uint8* row = frame->data() + - (box_pos_y_ * size_.width() + box_pos_x_) * kBytesPerPixel; + uint8_t* row = frame->data() + + (box_pos_y_ * size_.width() + box_pos_x_) * kBytesPerPixel; for (int y = 0; y < kBoxHeight; ++y) { for (int x = 0; x < kBoxWidth; ++x) { int r = x * 255 / kBoxWidth; diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h index 7301840..ef0aea4 100644 --- a/remoting/protocol/fake_session.h +++ b/remoting/protocol/fake_session.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "remoting/protocol/fake_stream_socket.h" diff --git a/remoting/protocol/fake_stream_socket.h b/remoting/protocol/fake_stream_socket.h index bfa3fc9..8b80785 100644 --- a/remoting/protocol/fake_stream_socket.h +++ b/remoting/protocol/fake_stream_socket.h @@ -8,6 +8,7 @@ #include <map> #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "net/base/completion_callback.h" diff --git a/remoting/protocol/host_control_dispatcher.h b/remoting/protocol/host_control_dispatcher.h index 9e74889..50cdf6e 100644 --- a/remoting/protocol/host_control_dispatcher.h +++ b/remoting/protocol/host_control_dispatcher.h @@ -5,6 +5,7 @@ #ifndef REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_ #define REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_ +#include "base/macros.h" #include "remoting/protocol/channel_dispatcher_base.h" #include "remoting/protocol/client_stub.h" #include "remoting/protocol/clipboard_stub.h" diff --git a/remoting/protocol/host_event_dispatcher.h b/remoting/protocol/host_event_dispatcher.h index 8fa3564..b8c5c93 100644 --- a/remoting/protocol/host_event_dispatcher.h +++ b/remoting/protocol/host_event_dispatcher.h @@ -5,6 +5,9 @@ #ifndef REMOTING_PROTOCOL_HOST_EVENT_DISPATCHER_H_ #define REMOTING_PROTOCOL_HOST_EVENT_DISPATCHER_H_ +#include <stdint.h> + +#include "base/macros.h" #include "remoting/protocol/channel_dispatcher_base.h" #include "remoting/protocol/protobuf_message_parser.h" diff --git a/remoting/protocol/host_stub.h b/remoting/protocol/host_stub.h index cf9fa0b..89bacfa 100644 --- a/remoting/protocol/host_stub.h +++ b/remoting/protocol/host_stub.h @@ -9,7 +9,7 @@ #ifndef REMOTING_PROTOCOL_HOST_STUB_H_ #define REMOTING_PROTOCOL_HOST_STUB_H_ -#include "base/basictypes.h" +#include "base/macros.h" namespace remoting { namespace protocol { diff --git a/remoting/protocol/host_video_dispatcher.h b/remoting/protocol/host_video_dispatcher.h index 79d1585..47eb7f9 100644 --- a/remoting/protocol/host_video_dispatcher.h +++ b/remoting/protocol/host_video_dispatcher.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_HOST_VIDEO_DISPATCHER_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "remoting/proto/video.pb.h" #include "remoting/protocol/channel_dispatcher_base.h" #include "remoting/protocol/protobuf_message_parser.h" diff --git a/remoting/protocol/ice_connection_to_client.h b/remoting/protocol/ice_connection_to_client.h index 72d7691..cf03496 100644 --- a/remoting/protocol/ice_connection_to_client.h +++ b/remoting/protocol/ice_connection_to_client.h @@ -5,6 +5,8 @@ #ifndef REMOTING_PROTOCOL_ICE_CONNECTION_TO_CLIENT_H_ #define REMOTING_PROTOCOL_ICE_CONNECTION_TO_CLIENT_H_ +#include <stdint.h> + #include <string> #include "base/macros.h" diff --git a/remoting/protocol/ice_connection_to_host.h b/remoting/protocol/ice_connection_to_host.h index 73823de..2ebc584 100644 --- a/remoting/protocol/ice_connection_to_host.h +++ b/remoting/protocol/ice_connection_to_host.h @@ -9,6 +9,7 @@ #include <string> #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/threading/non_thread_safe.h" diff --git a/remoting/protocol/ice_transport_unittest.cc b/remoting/protocol/ice_transport_unittest.cc index 1f881a6..4ba8ece 100644 --- a/remoting/protocol/ice_transport_unittest.cc +++ b/remoting/protocol/ice_transport_unittest.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/location.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" diff --git a/remoting/protocol/input_event_tracker.h b/remoting/protocol/input_event_tracker.h index 2c27fce..ff19b1d 100644 --- a/remoting/protocol/input_event_tracker.h +++ b/remoting/protocol/input_event_tracker.h @@ -5,10 +5,12 @@ #ifndef REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ #define REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ +#include <stdint.h> + #include <set> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "remoting/protocol/input_stub.h" #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" #include "ui/events/keycodes/dom/dom_code.h" @@ -52,9 +54,9 @@ class InputEventTracker : public InputStub { std::set<ui::DomCode> pressed_keys_; webrtc::DesktopVector mouse_pos_; - uint32 mouse_button_state_; + uint32_t mouse_button_state_; - std::set<uint32> touch_point_ids_; + std::set<uint32_t> touch_point_ids_; DISALLOW_COPY_AND_ASSIGN(InputEventTracker); }; diff --git a/remoting/protocol/input_event_tracker_unittest.cc b/remoting/protocol/input_event_tracker_unittest.cc index 5a455ca..47a4ed4 100644 --- a/remoting/protocol/input_event_tracker_unittest.cc +++ b/remoting/protocol/input_event_tracker_unittest.cc @@ -4,6 +4,8 @@ #include "remoting/protocol/input_event_tracker.h" +#include <stdint.h> + #include "remoting/proto/event.pb.h" #include "remoting/protocol/protocol_mock_objects.h" #include "remoting/protocol/test_event_matchers.h" @@ -30,14 +32,14 @@ MATCHER_P2(TouchPointIdsAndTypeEqual, ids, type, "") { if (arg.event_type() != type) return false; - std::set<uint32> touch_ids; + std::set<uint32_t> touch_ids; for (const TouchEventPoint& point : arg.touch_points()) { touch_ids.insert(point.id()); } return touch_ids == ids; } -static KeyEvent NewUsbEvent(uint32 usb_keycode, bool pressed) { +static KeyEvent NewUsbEvent(uint32_t usb_keycode, bool pressed) { KeyEvent event; event.set_usb_keycode(usb_keycode); event.set_pressed(pressed); @@ -46,7 +48,7 @@ static KeyEvent NewUsbEvent(uint32 usb_keycode, bool pressed) { return event; } -static void PressAndReleaseUsb(InputStub* input_stub, uint32 usb_keycode) { +static void PressAndReleaseUsb(InputStub* input_stub, uint32_t usb_keycode) { input_stub->InjectKeyEvent(NewUsbEvent(usb_keycode, true)); input_stub->InjectKeyEvent(NewUsbEvent(usb_keycode, false)); } @@ -63,7 +65,7 @@ static MouseEvent NewMouseEvent(int x, return event; } -void AddTouchPoint(uint32 id, TouchEvent* event) { +void AddTouchPoint(uint32_t id, TouchEvent* event) { TouchEventPoint* p = event->add_touch_points(); p->set_id(id); } @@ -260,15 +262,15 @@ TEST(InputEventTrackerTest, ReleaseAllTouchPoints) { MockInputStub mock_stub; InputEventTracker input_tracker(&mock_stub); - std::set<uint32> expected_ids1; + std::set<uint32_t> expected_ids1; expected_ids1.insert(1); expected_ids1.insert(2); - std::set<uint32> expected_ids2; + std::set<uint32_t> expected_ids2; expected_ids2.insert(3); expected_ids2.insert(5); expected_ids2.insert(8); - std::set<uint32> all_touch_point_ids; + std::set<uint32_t> all_touch_point_ids; all_touch_point_ids.insert(expected_ids1.begin(), expected_ids1.end()); all_touch_point_ids.insert(expected_ids2.begin(), expected_ids2.end()); @@ -304,17 +306,17 @@ TEST(InputEventTrackerTest, ReleaseAllRemainingTouchPoints) { MockInputStub mock_stub; InputEventTracker input_tracker(&mock_stub); - std::set<uint32> start_expected_ids; + std::set<uint32_t> start_expected_ids; start_expected_ids.insert(1); start_expected_ids.insert(2); start_expected_ids.insert(3); - std::set<uint32> end_expected_ids; + std::set<uint32_t> end_expected_ids; end_expected_ids.insert(1); - std::set<uint32> cancel_expected_ids; + std::set<uint32_t> cancel_expected_ids; cancel_expected_ids.insert(3); - std::set<uint32> all_remaining_touch_point_ids; + std::set<uint32_t> all_remaining_touch_point_ids; all_remaining_touch_point_ids.insert(2); InSequence s; diff --git a/remoting/protocol/input_filter.h b/remoting/protocol/input_filter.h index de032f2..8bb9aa8 100644 --- a/remoting/protocol/input_filter.h +++ b/remoting/protocol/input_filter.h @@ -5,8 +5,8 @@ #ifndef REMOTING_PROTOCOL_INPUT_FILTER_H_ #define REMOTING_PROTOCOL_INPUT_FILTER_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "remoting/protocol/input_stub.h" namespace remoting { diff --git a/remoting/protocol/input_filter_unittest.cc b/remoting/protocol/input_filter_unittest.cc index 25b02ee..952a1eb 100644 --- a/remoting/protocol/input_filter_unittest.cc +++ b/remoting/protocol/input_filter_unittest.cc @@ -4,6 +4,8 @@ #include "remoting/protocol/input_filter.h" +#include <stdint.h> + #include "remoting/proto/event.pb.h" #include "remoting/protocol/protocol_mock_objects.h" #include "remoting/protocol/test_event_matchers.h" @@ -19,7 +21,7 @@ using test::EqualsKeyEvent; using test::EqualsMouseMoveEvent; using test::EqualsTextEvent; -static KeyEvent NewKeyEvent(uint32 usb_keycode, bool pressed) { +static KeyEvent NewKeyEvent(uint32_t usb_keycode, bool pressed) { KeyEvent event; event.set_usb_keycode(usb_keycode); event.set_pressed(pressed); diff --git a/remoting/protocol/input_stub.h b/remoting/protocol/input_stub.h index 4277713..d73d3ff 100644 --- a/remoting/protocol/input_stub.h +++ b/remoting/protocol/input_stub.h @@ -8,7 +8,7 @@ #ifndef REMOTING_PROTOCOL_INPUT_STUB_H_ #define REMOTING_PROTOCOL_INPUT_STUB_H_ -#include "base/basictypes.h" +#include "base/macros.h" namespace remoting { namespace protocol { diff --git a/remoting/protocol/it2me_host_authenticator_factory.h b/remoting/protocol/it2me_host_authenticator_factory.h index 6d19434..ee16c84 100644 --- a/remoting/protocol/it2me_host_authenticator_factory.h +++ b/remoting/protocol/it2me_host_authenticator_factory.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 "remoting/protocol/authenticator.h" diff --git a/remoting/protocol/jingle_messages_unittest.cc b/remoting/protocol/jingle_messages_unittest.cc index 7175277..c45f7b2 100644 --- a/remoting/protocol/jingle_messages_unittest.cc +++ b/remoting/protocol/jingle_messages_unittest.cc @@ -4,7 +4,10 @@ #include "remoting/protocol/jingle_messages.h" +#include <stddef.h> + #include "base/logging.h" +#include "base/macros.h" #include "remoting/protocol/content_description.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h index 25d5c43..ba1172d 100644 --- a/remoting/protocol/jingle_session.h +++ b/remoting/protocol/jingle_session.h @@ -9,6 +9,7 @@ #include <set> #include <string> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/threading/non_thread_safe.h" #include "base/timer/timer.h" diff --git a/remoting/protocol/jingle_session_manager.h b/remoting/protocol/jingle_session_manager.h index d3db735..f52f7c5 100644 --- a/remoting/protocol/jingle_session_manager.h +++ b/remoting/protocol/jingle_session_manager.h @@ -8,6 +8,7 @@ #include <map> #include <string> +#include "base/macros.h" #include "remoting/protocol/jingle_messages.h" #include "remoting/protocol/session_manager.h" #include "remoting/signaling/signal_strategy.h" diff --git a/remoting/protocol/me2me_host_authenticator_factory.h b/remoting/protocol/me2me_host_authenticator_factory.h index 13b8346..c3140b3 100644 --- a/remoting/protocol/me2me_host_authenticator_factory.h +++ b/remoting/protocol/me2me_host_authenticator_factory.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 "remoting/protocol/authentication_method.h" diff --git a/remoting/protocol/message_decoder.cc b/remoting/protocol/message_decoder.cc index 20d79bf..3da1b1b 100644 --- a/remoting/protocol/message_decoder.cc +++ b/remoting/protocol/message_decoder.cc @@ -4,6 +4,8 @@ #include "remoting/protocol/message_decoder.h" +#include <stdint.h> + #include "base/logging.h" #include "net/base/io_buffer.h" #include "remoting/base/compound_buffer.h" @@ -52,7 +54,7 @@ CompoundBuffer* MessageDecoder::GetNextMessage() { bool MessageDecoder::GetPayloadSize(int* size) { // The header has a size of 4 bytes. - const int kHeaderSize = sizeof(int32); + const int kHeaderSize = sizeof(int32_t); if (buffer_.total_bytes() < kHeaderSize) return false; diff --git a/remoting/protocol/message_decoder_unittest.cc b/remoting/protocol/message_decoder_unittest.cc index 2c1c56a..44c7764 100644 --- a/remoting/protocol/message_decoder_unittest.cc +++ b/remoting/protocol/message_decoder_unittest.cc @@ -2,8 +2,11 @@ // 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 "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" @@ -27,7 +30,7 @@ static void AppendMessage(const EventMessage& msg, } // Construct and prepare data in the |output_stream|. -static void PrepareData(uint8** buffer, int* size) { +static void PrepareData(uint8_t** buffer, int* size) { // Contains all encoded messages. std::string encoded_data; @@ -41,16 +44,16 @@ static void PrepareData(uint8** buffer, int* size) { } *size = encoded_data.length(); - *buffer = new uint8[*size]; + *buffer = new uint8_t[*size]; memcpy(*buffer, encoded_data.c_str(), *size); } void SimulateReadSequence(const int read_sequence[], int sequence_size) { // Prepare encoded data for testing. int size; - uint8* test_data; + uint8_t* test_data; PrepareData(&test_data, &size); - scoped_ptr<uint8[]> memory_deleter(test_data); + scoped_ptr<uint8_t[]> memory_deleter(test_data); // Then simulate using MessageDecoder to decode variable // size of encoded data. diff --git a/remoting/protocol/message_reader.h b/remoting/protocol/message_reader.h index 30e425d..20da39e 100644 --- a/remoting/protocol/message_reader.h +++ b/remoting/protocol/message_reader.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_MESSAGE_READER_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/threading/non_thread_safe.h" diff --git a/remoting/protocol/message_serialization.cc b/remoting/protocol/message_serialization.cc index 435baf9..9dab710 100644 --- a/remoting/protocol/message_serialization.cc +++ b/remoting/protocol/message_serialization.cc @@ -4,7 +4,8 @@ #include "remoting/protocol/message_serialization.h" -#include "base/basictypes.h" +#include <stdint.h> + #include "base/containers/hash_tables.h" #include "base/logging.h" #include "net/base/io_buffer.h" @@ -16,13 +17,13 @@ namespace protocol { scoped_refptr<net::IOBufferWithSize> SerializeAndFrameMessage( const google::protobuf::MessageLite& msg) { // Create a buffer with 4 extra bytes. This is used as prefix to write an - // int32 of the serialized message size for framing. - const int kExtraBytes = sizeof(int32); + // int32_t of the serialized message size for framing. + const int kExtraBytes = sizeof(int32_t); int size = msg.ByteSize() + kExtraBytes; scoped_refptr<net::IOBufferWithSize> buffer(new net::IOBufferWithSize(size)); rtc::SetBE32(buffer->data(), msg.GetCachedSize()); msg.SerializeWithCachedSizesToArray( - reinterpret_cast<uint8*>(buffer->data()) + kExtraBytes); + reinterpret_cast<uint8_t*>(buffer->data()) + kExtraBytes); return buffer; } diff --git a/remoting/protocol/monitored_video_stub.h b/remoting/protocol/monitored_video_stub.h index ea94010..a451d98 100644 --- a/remoting/protocol/monitored_video_stub.h +++ b/remoting/protocol/monitored_video_stub.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_MONITORED_VIDEO_STUB_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/threading/thread_checker.h" #include "base/timer/timer.h" #include "remoting/protocol/video_stub.h" diff --git a/remoting/protocol/monitored_video_stub_unittest.cc b/remoting/protocol/monitored_video_stub_unittest.cc index 58db106..33a5937 100644 --- a/remoting/protocol/monitored_video_stub_unittest.cc +++ b/remoting/protocol/monitored_video_stub_unittest.cc @@ -4,6 +4,8 @@ #include "remoting/protocol/monitored_video_stub.h" +#include <stdint.h> + #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/test/test_timeouts.h" @@ -19,7 +21,7 @@ using ::testing::InvokeWithoutArgs; namespace remoting { namespace protocol { -static const int64 kTestOverrideDelayMilliseconds = 1; +static const int64_t kTestOverrideDelayMilliseconds = 1; class MonitoredVideoStubTest : public testing::Test { protected: diff --git a/remoting/protocol/mouse_input_filter.h b/remoting/protocol/mouse_input_filter.h index 334474a..1d4ffa1 100644 --- a/remoting/protocol/mouse_input_filter.h +++ b/remoting/protocol/mouse_input_filter.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_MOUSE_INPUT_FILTER_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "remoting/protocol/input_filter.h" #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" diff --git a/remoting/protocol/mouse_input_filter_unittest.cc b/remoting/protocol/mouse_input_filter_unittest.cc index db9624f..42e3b89 100644 --- a/remoting/protocol/mouse_input_filter_unittest.cc +++ b/remoting/protocol/mouse_input_filter_unittest.cc @@ -4,6 +4,7 @@ #include "remoting/protocol/mouse_input_filter.h" +#include "base/macros.h" #include "remoting/proto/event.pb.h" #include "remoting/protocol/protocol_mock_objects.h" #include "remoting/protocol/test_event_matchers.h" diff --git a/remoting/protocol/negotiating_authenticator_base.h b/remoting/protocol/negotiating_authenticator_base.h index 1f7e7c1..72481e3 100644 --- a/remoting/protocol/negotiating_authenticator_base.h +++ b/remoting/protocol/negotiating_authenticator_base.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/scoped_ptr.h" #include "remoting/protocol/authentication_method.h" diff --git a/remoting/protocol/negotiating_authenticator_unittest.cc b/remoting/protocol/negotiating_authenticator_unittest.cc index 2c56882..8c570ca 100644 --- a/remoting/protocol/negotiating_authenticator_unittest.cc +++ b/remoting/protocol/negotiating_authenticator_unittest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/bind.h" +#include "base/macros.h" #include "net/base/net_errors.h" #include "remoting/base/rsa_key_pair.h" #include "remoting/protocol/authenticator_test_base.h" diff --git a/remoting/protocol/negotiating_client_authenticator.h b/remoting/protocol/negotiating_client_authenticator.h index 699f4d3..1c03afd9 100644 --- a/remoting/protocol/negotiating_client_authenticator.h +++ b/remoting/protocol/negotiating_client_authenticator.h @@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "remoting/protocol/authentication_method.h" diff --git a/remoting/protocol/negotiating_host_authenticator.h b/remoting/protocol/negotiating_host_authenticator.h index 16d45e7..569d15a 100644 --- a/remoting/protocol/negotiating_host_authenticator.h +++ b/remoting/protocol/negotiating_host_authenticator.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/scoped_ptr.h" #include "remoting/protocol/authentication_method.h" diff --git a/remoting/protocol/network_settings.h b/remoting/protocol/network_settings.h index 83d7507..8648528 100644 --- a/remoting/protocol/network_settings.h +++ b/remoting/protocol/network_settings.h @@ -5,9 +5,10 @@ #ifndef REMOTING_PROTOCOL_NETWORK_SETTINGS_H_ #define REMOTING_PROTOCOL_NETWORK_SETTINGS_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/logging.h" #include "remoting/protocol/port_range.h" @@ -19,8 +20,8 @@ struct NetworkSettings { // When hosts are configured with NAT traversal disabled they will // typically also limit their P2P ports to this range, so that // sessions may be blocked or un-blocked via firewall rules. - static const uint16 kDefaultMinPort = 12400; - static const uint16 kDefaultMaxPort = 12409; + static const uint16_t kDefaultMinPort = 12400; + static const uint16_t kDefaultMaxPort = 12409; enum Flags { // Don't use STUN or relay servers. Accept incoming P2P connection @@ -48,9 +49,9 @@ struct NetworkSettings { (flags & NAT_TRAVERSAL_OUTGOING)); } - explicit NetworkSettings(uint32 flags) : flags(flags) {} + explicit NetworkSettings(uint32_t flags) : flags(flags) {} - uint32 flags; + uint32_t flags; // Range of ports used by P2P sessions. PortRange port_range; diff --git a/remoting/protocol/pairing_authenticator_base.h b/remoting/protocol/pairing_authenticator_base.h index 2928656d..e241f0a 100644 --- a/remoting/protocol/pairing_authenticator_base.h +++ b/remoting/protocol/pairing_authenticator_base.h @@ -5,6 +5,7 @@ #ifndef REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_BASE_H_ #define REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_BASE_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "remoting/protocol/authenticator.h" #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" diff --git a/remoting/protocol/pairing_client_authenticator.h b/remoting/protocol/pairing_client_authenticator.h index 1696073..50ff3e7 100644 --- a/remoting/protocol/pairing_client_authenticator.h +++ b/remoting/protocol/pairing_client_authenticator.h @@ -5,6 +5,7 @@ #ifndef REMOTING_PROTOCOL_PAIRING_CLIENT_AUTHENTICATOR_H_ #define REMOTING_PROTOCOL_PAIRING_CLIENT_AUTHENTICATOR_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "remoting/protocol/pairing_authenticator_base.h" diff --git a/remoting/protocol/pairing_host_authenticator.h b/remoting/protocol/pairing_host_authenticator.h index 164bcd2..bb814f1 100644 --- a/remoting/protocol/pairing_host_authenticator.h +++ b/remoting/protocol/pairing_host_authenticator.h @@ -5,6 +5,7 @@ #ifndef REMOTING_PROTOCOL_PAIRING_HOST_AUTHENTICATOR_H_ #define REMOTING_PROTOCOL_PAIRING_HOST_AUTHENTICATOR_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "remoting/protocol/pairing_authenticator_base.h" #include "remoting/protocol/pairing_registry.h" diff --git a/remoting/protocol/pairing_registry.cc b/remoting/protocol/pairing_registry.cc index edf085c..6fdddf0 100644 --- a/remoting/protocol/pairing_registry.cc +++ b/remoting/protocol/pairing_registry.cc @@ -4,11 +4,14 @@ #include "remoting/protocol/pairing_registry.h" +#include <stddef.h> + #include "base/base64.h" #include "base/bind.h" #include "base/guid.h" #include "base/json/json_string_value_serializer.h" #include "base/location.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/strings/string_number_conversions.h" #include "base/thread_task_runner_handle.h" diff --git a/remoting/protocol/pairing_registry.h b/remoting/protocol/pairing_registry.h index e9ff1ff..00cae7f 100644 --- a/remoting/protocol/pairing_registry.h +++ b/remoting/protocol/pairing_registry.h @@ -12,6 +12,7 @@ #include "base/callback.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" diff --git a/remoting/protocol/pairing_registry_unittest.cc b/remoting/protocol/pairing_registry_unittest.cc index f0aa251..ed6745d 100644 --- a/remoting/protocol/pairing_registry_unittest.cc +++ b/remoting/protocol/pairing_registry_unittest.cc @@ -10,6 +10,7 @@ #include "base/bind.h" #include "base/compiler_specific.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/remoting/protocol/performance_tracker.h b/remoting/protocol/performance_tracker.h index 95b365b..3e5bf2c 100644 --- a/remoting/protocol/performance_tracker.h +++ b/remoting/protocol/performance_tracker.h @@ -5,9 +5,12 @@ #ifndef REMOTING_PROTOCOL_PERFORMANCE_TRACKER_H_ #define REMOTING_PROTOCOL_PERFORMANCE_TRACKER_H_ +#include <stdint.h> + #include <map> #include "base/callback.h" +#include "base/macros.h" #include "base/timer/timer.h" #include "remoting/base/rate_counter.h" #include "remoting/base/running_average.h" diff --git a/remoting/protocol/port_range.cc b/remoting/protocol/port_range.cc index ca64089..4ea0266 100644 --- a/remoting/protocol/port_range.cc +++ b/remoting/protocol/port_range.cc @@ -5,6 +5,7 @@ #include "remoting/protocol/port_range.h" #include <limits.h> +#include <stddef.h> #include <stdlib.h> #include "base/strings/string_number_conversions.h" @@ -40,8 +41,8 @@ bool PortRange::Parse(const std::string& port_range, PortRange* result) { if (min_port == 0 || min_port > max_port || max_port > USHRT_MAX) return false; - result->min_port = static_cast<uint16>(min_port); - result->max_port = static_cast<uint16>(max_port); + result->min_port = static_cast<uint16_t>(min_port); + result->max_port = static_cast<uint16_t>(max_port); return true; } diff --git a/remoting/protocol/port_range.h b/remoting/protocol/port_range.h index 1ec5b20..ba1f710 100644 --- a/remoting/protocol/port_range.h +++ b/remoting/protocol/port_range.h @@ -5,18 +5,19 @@ #ifndef REMOTING_PROTOCOL_PORT_RANGE_H_ #define REMOTING_PROTOCOL_PORT_RANGE_H_ +#include <stdint.h> + #include <ostream> #include <string> -#include "base/basictypes.h" namespace remoting { // Wrapper for a value of UdpPortRange policy. struct PortRange { // Both |min_port| and |max_port| are inclusive. - uint16 min_port; - uint16 max_port; + uint16_t min_port; + uint16_t max_port; // Returns true if |port_range| passed to Parse was an empty string // (or if |this| has been initialized by the default constructor below). diff --git a/remoting/protocol/protocol_mock_objects.h b/remoting/protocol/protocol_mock_objects.h index 6132488..0351ed6 100644 --- a/remoting/protocol/protocol_mock_objects.h +++ b/remoting/protocol/protocol_mock_objects.h @@ -5,10 +5,13 @@ #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ +#include <stdint.h> + #include <map> #include <string> #include "base/location.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/values.h" #include "net/base/ip_endpoint.h" diff --git a/remoting/protocol/pseudotcp_adapter.cc b/remoting/protocol/pseudotcp_adapter.cc index 2ed9cb7..30bf9f9 100644 --- a/remoting/protocol/pseudotcp_adapter.cc +++ b/remoting/protocol/pseudotcp_adapter.cc @@ -4,8 +4,11 @@ #include "remoting/protocol/pseudotcp_adapter.h" +#include <stddef.h> + #include "base/compiler_specific.h" #include "base/logging.h" +#include "base/macros.h" #include "base/time/time.h" #include "base/timer/timer.h" #include "net/base/address_list.h" @@ -19,7 +22,7 @@ using cricket::PseudoTcp; namespace { const int kReadBufferSize = 65536; // Maximum size of a packet. -const uint16 kDefaultMtu = 1280; +const uint16_t kDefaultMtu = 1280; } // namespace namespace remoting { @@ -43,7 +46,7 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify, void OnTcpReadable(cricket::PseudoTcp* tcp) override; void OnTcpWriteable(cricket::PseudoTcp* tcp) override; // This is triggered by NotifyClock or NotifyPacket. - void OnTcpClosed(cricket::PseudoTcp* tcp, uint32 error) override; + void OnTcpClosed(cricket::PseudoTcp* tcp, uint32_t error) override; // This is triggered by NotifyClock, NotifyPacket, Recv and Send. WriteResult TcpWritePacket(cricket::PseudoTcp* tcp, const char* buffer, @@ -51,8 +54,8 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify, void SetAckDelay(int delay_ms); void SetNoDelay(bool no_delay); - void SetReceiveBufferSize(int32 size); - void SetSendBufferSize(int32 size); + void SetReceiveBufferSize(int32_t size); + void SetSendBufferSize(int32_t size); void SetWriteWaitsForSend(bool write_waits_for_send); void DeleteSocket(); @@ -277,7 +280,7 @@ void PseudoTcpAdapter::Core::OnTcpWriteable(PseudoTcp* tcp) { callback.Run(result); } -void PseudoTcpAdapter::Core::OnTcpClosed(PseudoTcp* tcp, uint32 error) { +void PseudoTcpAdapter::Core::OnTcpClosed(PseudoTcp* tcp, uint32_t error) { DCHECK_EQ(tcp, &pseudo_tcp_); if (!connect_callback_.is_null()) { @@ -307,11 +310,11 @@ void PseudoTcpAdapter::Core::SetNoDelay(bool no_delay) { pseudo_tcp_.SetOption(cricket::PseudoTcp::OPT_NODELAY, no_delay ? 1 : 0); } -void PseudoTcpAdapter::Core::SetReceiveBufferSize(int32 size) { +void PseudoTcpAdapter::Core::SetReceiveBufferSize(int32_t size) { pseudo_tcp_.SetOption(cricket::PseudoTcp::OPT_RCVBUF, size); } -void PseudoTcpAdapter::Core::SetSendBufferSize(int32 size) { +void PseudoTcpAdapter::Core::SetSendBufferSize(int32_t size) { pseudo_tcp_.SetOption(cricket::PseudoTcp::OPT_SNDBUF, size); } @@ -471,13 +474,13 @@ int PseudoTcpAdapter::Write(const scoped_refptr<net::IOBuffer>& buffer, return core_->Write(buffer, buffer_size, callback); } -int PseudoTcpAdapter::SetReceiveBufferSize(int32 size) { +int PseudoTcpAdapter::SetReceiveBufferSize(int32_t size) { DCHECK(CalledOnValidThread()); core_->SetReceiveBufferSize(size); return net::OK; } -int PseudoTcpAdapter::SetSendBufferSize(int32 size) { +int PseudoTcpAdapter::SetSendBufferSize(int32_t size) { DCHECK(CalledOnValidThread()); core_->SetSendBufferSize(size); return net::OK; diff --git a/remoting/protocol/pseudotcp_adapter.h b/remoting/protocol/pseudotcp_adapter.h index a297dd7..0d630e1 100644 --- a/remoting/protocol/pseudotcp_adapter.h +++ b/remoting/protocol/pseudotcp_adapter.h @@ -5,8 +5,10 @@ #ifndef REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_ #define REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_ -#include "base/basictypes.h" +#include <stdint.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/non_thread_safe.h" @@ -38,8 +40,8 @@ class PseudoTcpAdapter : public P2PStreamSocket, base::NonThreadSafe { int Connect(const net::CompletionCallback& callback); // Set receive and send buffer sizes. - int SetReceiveBufferSize(int32 size); - int SetSendBufferSize(int32 size); + int SetReceiveBufferSize(int32_t size); + int SetSendBufferSize(int32_t size); // Set the delay for sending ACK. void SetAckDelay(int delay_ms); diff --git a/remoting/protocol/pseudotcp_channel_factory.h b/remoting/protocol/pseudotcp_channel_factory.h index 2d2dd89..37a1c60 100644 --- a/remoting/protocol/pseudotcp_channel_factory.h +++ b/remoting/protocol/pseudotcp_channel_factory.h @@ -7,7 +7,7 @@ #include <map> -#include "base/basictypes.h" +#include "base/macros.h" #include "remoting/protocol/stream_channel_factory.h" namespace remoting { diff --git a/remoting/protocol/secure_channel_factory.h b/remoting/protocol/secure_channel_factory.h index 86a2046..f78aba0 100644 --- a/remoting/protocol/secure_channel_factory.h +++ b/remoting/protocol/secure_channel_factory.h @@ -7,7 +7,7 @@ #include <map> -#include "base/basictypes.h" +#include "base/macros.h" #include "net/base/net_errors.h" #include "remoting/protocol/stream_channel_factory.h" diff --git a/remoting/protocol/session.h b/remoting/protocol/session.h index fb462e0..a87375f 100644 --- a/remoting/protocol/session.h +++ b/remoting/protocol/session.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "remoting/protocol/errors.h" #include "remoting/protocol/session_config.h" diff --git a/remoting/protocol/session_config.h b/remoting/protocol/session_config.h index 83b711e..67f0336 100644 --- a/remoting/protocol/session_config.h +++ b/remoting/protocol/session_config.h @@ -8,7 +8,6 @@ #include <list> #include <string> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" namespace remoting { diff --git a/remoting/protocol/session_manager.h b/remoting/protocol/session_manager.h index b4972e7..6d706ad 100644 --- a/remoting/protocol/session_manager.h +++ b/remoting/protocol/session_manager.h @@ -56,6 +56,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/threading/non_thread_safe.h" #include "remoting/protocol/session.h" diff --git a/remoting/protocol/ssl_hmac_channel_authenticator.cc b/remoting/protocol/ssl_hmac_channel_authenticator.cc index b444ade..51782ed 100644 --- a/remoting/protocol/ssl_hmac_channel_authenticator.cc +++ b/remoting/protocol/ssl_hmac_channel_authenticator.cc @@ -4,10 +4,13 @@ #include "remoting/protocol/ssl_hmac_channel_authenticator.h" +#include <stdint.h> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/callback_helpers.h" #include "base/logging.h" +#include "build/build_config.h" #include "crypto/secure_util.h" #include "net/base/host_port_pair.h" #include "net/base/io_buffer.h" diff --git a/remoting/protocol/ssl_hmac_channel_authenticator.h b/remoting/protocol/ssl_hmac_channel_authenticator.h index b5d869b..e1da9ca 100644 --- a/remoting/protocol/ssl_hmac_channel_authenticator.h +++ b/remoting/protocol/ssl_hmac_channel_authenticator.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 "base/threading/non_thread_safe.h" diff --git a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc index 5b50fc5..53d2587 100644 --- a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc +++ b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc @@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/test/test_timeouts.h" #include "base/timer/timer.h" diff --git a/remoting/protocol/stream_channel_factory.h b/remoting/protocol/stream_channel_factory.h index cbfef25..fe4a1e5 100644 --- a/remoting/protocol/stream_channel_factory.h +++ b/remoting/protocol/stream_channel_factory.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/threading/non_thread_safe.h" diff --git a/remoting/protocol/test_event_matchers.h b/remoting/protocol/test_event_matchers.h index a8e4afc..2961a67 100644 --- a/remoting/protocol/test_event_matchers.h +++ b/remoting/protocol/test_event_matchers.h @@ -5,6 +5,8 @@ #ifndef REMOTING_PROTOCOL_TEST_EVENT_MATCHERS_H_ #define REMOTING_PROTOCOL_TEST_EVENT_MATCHERS_H_ +#include <stdint.h> + #include <cmath> #include "remoting/proto/event.pb.h" @@ -16,26 +18,25 @@ namespace protocol { namespace test { MATCHER_P2(EqualsKeyEvent, usb_keycode, pressed, "") { - return arg.usb_keycode() == static_cast<uint32>(usb_keycode) && + return arg.usb_keycode() == static_cast<uint32_t>(usb_keycode) && arg.pressed() == pressed; } MATCHER_P2(EqualsKeyEventWithCapsLock, usb_keycode, pressed, "") { - return arg.usb_keycode() == static_cast<uint32>(usb_keycode) && + return arg.usb_keycode() == static_cast<uint32_t>(usb_keycode) && arg.pressed() == pressed && arg.lock_states() == KeyEvent::LOCK_STATES_CAPSLOCK; } MATCHER_P2(EqualsKeyEventWithNumLock, usb_keycode, pressed, "") { - return arg.usb_keycode() == static_cast<uint32>(usb_keycode) && + return arg.usb_keycode() == static_cast<uint32_t>(usb_keycode) && arg.pressed() == pressed && arg.lock_states() == KeyEvent::LOCK_STATES_NUMLOCK; } MATCHER_P2(EqualsKeyEventWithoutLockStates, usb_keycode, pressed, "") { - return arg.usb_keycode() == static_cast<uint32>(usb_keycode) && - arg.pressed() == pressed && - !arg.has_lock_states(); + return arg.usb_keycode() == static_cast<uint32_t>(usb_keycode) && + arg.pressed() == pressed && !arg.has_lock_states(); } MATCHER_P(EqualsTextEvent, text, "") { diff --git a/remoting/protocol/third_party_authenticator_base.h b/remoting/protocol/third_party_authenticator_base.h index 4f952cb..e990907 100644 --- a/remoting/protocol/third_party_authenticator_base.h +++ b/remoting/protocol/third_party_authenticator_base.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/protocol/authenticator.h" #include "third_party/webrtc/libjingle/xmllite/qname.h" diff --git a/remoting/protocol/third_party_authenticator_unittest.cc b/remoting/protocol/third_party_authenticator_unittest.cc index 9f6dde1..3fb867a 100644 --- a/remoting/protocol/third_party_authenticator_unittest.cc +++ b/remoting/protocol/third_party_authenticator_unittest.cc @@ -4,6 +4,7 @@ #include "base/bind.h" #include "base/callback_helpers.h" +#include "base/macros.h" #include "net/base/net_errors.h" #include "remoting/base/rsa_key_pair.h" #include "remoting/protocol/authenticator_test_base.h" diff --git a/remoting/protocol/third_party_client_authenticator.h b/remoting/protocol/third_party_client_authenticator.h index 53dcde8..823aad4 100644 --- a/remoting/protocol/third_party_client_authenticator.h +++ b/remoting/protocol/third_party_client_authenticator.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "remoting/protocol/third_party_authenticator_base.h" diff --git a/remoting/protocol/third_party_host_authenticator.h b/remoting/protocol/third_party_host_authenticator.h index ad68309..ff2036a 100644 --- a/remoting/protocol/third_party_host_authenticator.h +++ b/remoting/protocol/third_party_host_authenticator.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/protocol/third_party_authenticator_base.h" diff --git a/remoting/protocol/transport.h b/remoting/protocol/transport.h index 055381a..99aab7b 100644 --- a/remoting/protocol/transport.h +++ b/remoting/protocol/transport.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/threading/non_thread_safe.h" #include "net/base/ip_endpoint.h" diff --git a/remoting/protocol/v2_authenticator.h b/remoting/protocol/v2_authenticator.h index faa79a4..77a72a5 100644 --- a/remoting/protocol/v2_authenticator.h +++ b/remoting/protocol/v2_authenticator.h @@ -5,11 +5,12 @@ #ifndef REMOTING_PROTOCOL_V2_AUTHENTICATOR_H_ #define REMOTING_PROTOCOL_V2_AUTHENTICATOR_H_ -#include <string> #include <queue> +#include <string> #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "crypto/p224_spake.h" #include "remoting/protocol/authenticator.h" diff --git a/remoting/protocol/v2_authenticator_unittest.cc b/remoting/protocol/v2_authenticator_unittest.cc index e9eac66..73f86d3 100644 --- a/remoting/protocol/v2_authenticator_unittest.cc +++ b/remoting/protocol/v2_authenticator_unittest.cc @@ -5,6 +5,7 @@ #include "remoting/protocol/v2_authenticator.h" #include "base/bind.h" +#include "base/macros.h" #include "net/base/net_errors.h" #include "remoting/base/rsa_key_pair.h" #include "remoting/protocol/authenticator_test_base.h" diff --git a/remoting/protocol/video_feedback_stub.h b/remoting/protocol/video_feedback_stub.h index 0bb5557..edad73e 100644 --- a/remoting/protocol/video_feedback_stub.h +++ b/remoting/protocol/video_feedback_stub.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_VIDEO_FEEDBACK_STUB_H_ #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" namespace remoting { diff --git a/remoting/protocol/video_frame_pump.h b/remoting/protocol/video_frame_pump.h index b2af08c..c8aa4b8 100644 --- a/remoting/protocol/video_frame_pump.h +++ b/remoting/protocol/video_frame_pump.h @@ -5,7 +5,10 @@ #ifndef REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ #define REMOTING_PROTOCOL_VIDEO_FRAME_PUMP_H_ -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/threading/thread_checker.h" diff --git a/remoting/protocol/video_frame_pump_unittest.cc b/remoting/protocol/video_frame_pump_unittest.cc index 01aedb3..e5ac4ac 100644 --- a/remoting/protocol/video_frame_pump_unittest.cc +++ b/remoting/protocol/video_frame_pump_unittest.cc @@ -5,6 +5,7 @@ #include "remoting/protocol/video_frame_pump.h" #include "base/bind.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" diff --git a/remoting/protocol/video_stream.h b/remoting/protocol/video_stream.h index 31da0f7..f81db85 100644 --- a/remoting/protocol/video_stream.h +++ b/remoting/protocol/video_stream.h @@ -5,6 +5,8 @@ #ifndef REMOTING_PROTOCOL_VIDEO_STREAM_H_ #define REMOTING_PROTOCOL_VIDEO_STREAM_H_ +#include <stdint.h> + #include <cstdint> #include "base/callback_forward.h" diff --git a/remoting/protocol/video_stub.h b/remoting/protocol/video_stub.h index 59c231e..3c47a91 100644 --- a/remoting/protocol/video_stub.h +++ b/remoting/protocol/video_stub.h @@ -6,6 +6,7 @@ #define REMOTING_PROTOCOL_VIDEO_STUB_H_ #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" namespace remoting { diff --git a/remoting/protocol/webrtc_connection_to_client.h b/remoting/protocol/webrtc_connection_to_client.h index 02919db..2902db9 100644 --- a/remoting/protocol/webrtc_connection_to_client.h +++ b/remoting/protocol/webrtc_connection_to_client.h @@ -5,6 +5,8 @@ #ifndef REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_CLIENT_H_ #define REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_CLIENT_H_ +#include <stdint.h> + #include <string> #include "base/macros.h" diff --git a/remoting/protocol/webrtc_connection_to_host.h b/remoting/protocol/webrtc_connection_to_host.h index 046aeae..3e3e4bc 100644 --- a/remoting/protocol/webrtc_connection_to_host.h +++ b/remoting/protocol/webrtc_connection_to_host.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/protocol/channel_dispatcher_base.h" #include "remoting/protocol/clipboard_filter.h" diff --git a/remoting/protocol/webrtc_data_stream_adapter.cc b/remoting/protocol/webrtc_data_stream_adapter.cc index b53800f..8658f56 100644 --- a/remoting/protocol/webrtc_data_stream_adapter.cc +++ b/remoting/protocol/webrtc_data_stream_adapter.cc @@ -4,9 +4,12 @@ #include "remoting/protocol/webrtc_data_stream_adapter.h" +#include <stdint.h> + #include "base/callback.h" #include "base/callback_helpers.h" #include "base/location.h" +#include "base/macros.h" #include "base/thread_task_runner_handle.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" diff --git a/remoting/protocol/webrtc_transport.cc b/remoting/protocol/webrtc_transport.cc index e4fd5c8f..20a7cca 100644 --- a/remoting/protocol/webrtc_transport.cc +++ b/remoting/protocol/webrtc_transport.cc @@ -5,6 +5,7 @@ #include "remoting/protocol/webrtc_transport.h" #include "base/callback_helpers.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/strings/string_number_conversions.h" #include "base/task_runner_util.h" diff --git a/remoting/protocol/webrtc_transport_unittest.cc b/remoting/protocol/webrtc_transport_unittest.cc index 82fb6d3..0651522 100644 --- a/remoting/protocol/webrtc_transport_unittest.cc +++ b/remoting/protocol/webrtc_transport_unittest.cc @@ -4,6 +4,7 @@ #include "remoting/protocol/webrtc_transport.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "jingle/glue/thread_wrapper.h" diff --git a/remoting/protocol/webrtc_video_capturer_adapter.cc b/remoting/protocol/webrtc_video_capturer_adapter.cc index 42442b3..15dc46a 100644 --- a/remoting/protocol/webrtc_video_capturer_adapter.cc +++ b/remoting/protocol/webrtc_video_capturer_adapter.cc @@ -77,7 +77,8 @@ cricket::CaptureState WebrtcVideoCapturerAdapter::Start( const cricket::VideoFormat& capture_format) { DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(!capture_timer_); - DCHECK_EQ(capture_format.fourcc, (static_cast<uint32>(cricket::FOURCC_ARGB))); + DCHECK_EQ(capture_format.fourcc, + (static_cast<uint32_t>(cricket::FOURCC_ARGB))); if (!desktop_capturer_) { VLOG(1) << "WebrtcVideoCapturerAdapter failed to start."; @@ -176,7 +177,7 @@ bool WebrtcVideoCapturerAdapter::IsScreencast() const { } bool WebrtcVideoCapturerAdapter::GetPreferredFourccs( - std::vector<uint32>* fourccs) { + std::vector<uint32_t>* fourccs) { DCHECK(thread_checker_.CalledOnValidThread()); if (!fourccs) return false; diff --git a/remoting/protocol/webrtc_video_capturer_adapter.h b/remoting/protocol/webrtc_video_capturer_adapter.h index 9c46178..4a373e9 100644 --- a/remoting/protocol/webrtc_video_capturer_adapter.h +++ b/remoting/protocol/webrtc_video_capturer_adapter.h @@ -5,6 +5,9 @@ #ifndef REMOTING_PROTOCOL_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ #define REMOTING_PROTOCOL_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ +#include <stddef.h> +#include <stdint.h> + #include <vector> #include "base/macros.h" @@ -54,7 +57,7 @@ class WebrtcVideoCapturerAdapter : public cricket::VideoCapturer, void Stop() override; bool IsRunning() override; bool IsScreencast() const override; - bool GetPreferredFourccs(std::vector<uint32>* fourccs) override; + bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) override; private: // Kicks off the next frame capture using |desktop_capturer_|. diff --git a/remoting/protocol/webrtc_video_stream.h b/remoting/protocol/webrtc_video_stream.h index ffb0791..bb52ab8 100644 --- a/remoting/protocol/webrtc_video_stream.h +++ b/remoting/protocol/webrtc_video_stream.h @@ -5,6 +5,8 @@ #ifndef REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_ #define REMOTING_PROTOCOL_WEBRTC_VIDEO_STREAM_H_ +#include <stdint.h> + #include "base/macros.h" #include "remoting/protocol/video_stream.h" #include "third_party/webrtc/base/scoped_ref_ptr.h" diff --git a/remoting/signaling/fake_signal_strategy.h b/remoting/signaling/fake_signal_strategy.h index d0fb99a..659f1c0 100644 --- a/remoting/signaling/fake_signal_strategy.h +++ b/remoting/signaling/fake_signal_strategy.h @@ -9,6 +9,7 @@ #include <queue> #include <string> +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/threading/non_thread_safe.h" diff --git a/remoting/signaling/iq_sender.h b/remoting/signaling/iq_sender.h index c79f924..e98ed97 100644 --- a/remoting/signaling/iq_sender.h +++ b/remoting/signaling/iq_sender.h @@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "remoting/signaling/signal_strategy.h" diff --git a/remoting/signaling/jid_util.cc b/remoting/signaling/jid_util.cc index 08e525d..b06ae2b 100644 --- a/remoting/signaling/jid_util.cc +++ b/remoting/signaling/jid_util.cc @@ -4,6 +4,8 @@ #include "remoting/signaling/jid_util.h" +#include <stddef.h> + #include "base/strings/string_util.h" namespace remoting { diff --git a/remoting/signaling/jingle_info_request.h b/remoting/signaling/jingle_info_request.h index cfe9959..81a5a81 100644 --- a/remoting/signaling/jingle_info_request.h +++ b/remoting/signaling/jingle_info_request.h @@ -9,8 +9,8 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/signaling/iq_sender.h" diff --git a/remoting/signaling/log_to_server.h b/remoting/signaling/log_to_server.h index fd03235..ca46a8e 100644 --- a/remoting/signaling/log_to_server.h +++ b/remoting/signaling/log_to_server.h @@ -9,6 +9,7 @@ #include <map> #include <string> +#include "base/macros.h" #include "base/threading/non_thread_safe.h" #include "remoting/signaling/server_log_entry.h" #include "remoting/signaling/signal_strategy.h" diff --git a/remoting/signaling/push_notification_subscriber.h b/remoting/signaling/push_notification_subscriber.h index 19b8c09a0..9731e6a 100644 --- a/remoting/signaling/push_notification_subscriber.h +++ b/remoting/signaling/push_notification_subscriber.h @@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/signaling/signal_strategy.h" diff --git a/remoting/signaling/signal_strategy.h b/remoting/signaling/signal_strategy.h index 276dcb9..499159c 100644 --- a/remoting/signaling/signal_strategy.h +++ b/remoting/signaling/signal_strategy.h @@ -7,7 +7,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" namespace buzz { diff --git a/remoting/signaling/xmpp_login_handler.h b/remoting/signaling/xmpp_login_handler.h index 61f978a..33d87e6 100644 --- a/remoting/signaling/xmpp_login_handler.h +++ b/remoting/signaling/xmpp_login_handler.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/signaling/signal_strategy.h" diff --git a/remoting/signaling/xmpp_signal_strategy.cc b/remoting/signaling/xmpp_signal_strategy.cc index e107ec8..7577df7 100644 --- a/remoting/signaling/xmpp_signal_strategy.cc +++ b/remoting/signaling/xmpp_signal_strategy.cc @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/observer_list.h" #include "base/rand_util.h" #include "base/single_thread_task_runner.h" diff --git a/remoting/signaling/xmpp_signal_strategy.h b/remoting/signaling/xmpp_signal_strategy.h index 62a8c18..8878547 100644 --- a/remoting/signaling/xmpp_signal_strategy.h +++ b/remoting/signaling/xmpp_signal_strategy.h @@ -8,6 +8,7 @@ #include "remoting/signaling/signal_strategy.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" diff --git a/remoting/signaling/xmpp_stream_parser.cc b/remoting/signaling/xmpp_stream_parser.cc index 7c207cb..22cbbee 100644 --- a/remoting/signaling/xmpp_stream_parser.cc +++ b/remoting/signaling/xmpp_stream_parser.cc @@ -6,6 +6,7 @@ #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" #include "third_party/webrtc/libjingle/xmllite/xmlbuilder.h" diff --git a/remoting/signaling/xmpp_stream_parser.h b/remoting/signaling/xmpp_stream_parser.h index 1ac5027..d98bf0e 100644 --- a/remoting/signaling/xmpp_stream_parser.h +++ b/remoting/signaling/xmpp_stream_parser.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" namespace buzz { class XmlElement; diff --git a/remoting/test/access_token_fetcher.h b/remoting/test/access_token_fetcher.h index 50062f7..65301a9 100644 --- a/remoting/test/access_token_fetcher.h +++ b/remoting/test/access_token_fetcher.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 "google_apis/gaia/gaia_oauth_client.h" diff --git a/remoting/test/access_token_fetcher_unittest.cc b/remoting/test/access_token_fetcher_unittest.cc index 6ab9c82..4ada637 100644 --- a/remoting/test/access_token_fetcher_unittest.cc +++ b/remoting/test/access_token_fetcher_unittest.cc @@ -7,6 +7,7 @@ #include <string> #include "base/bind.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "google_apis/gaia/gaia_urls.h" diff --git a/remoting/test/app_remoting_connected_client_fixture.h b/remoting/test/app_remoting_connected_client_fixture.h index 6d8547c..2b9e209 100644 --- a/remoting/test/app_remoting_connected_client_fixture.h +++ b/remoting/test/app_remoting_connected_client_fixture.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" diff --git a/remoting/test/app_remoting_connection_helper.h b/remoting/test/app_remoting_connection_helper.h index 04269a3..985995d 100644 --- a/remoting/test/app_remoting_connection_helper.h +++ b/remoting/test/app_remoting_connection_helper.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" #include "remoting/test/remote_connection_observer.h" diff --git a/remoting/test/app_remoting_latency_test_fixture.h b/remoting/test/app_remoting_latency_test_fixture.h index 643260d..f13c293 100644 --- a/remoting/test/app_remoting_latency_test_fixture.h +++ b/remoting/test/app_remoting_latency_test_fixture.h @@ -8,6 +8,7 @@ #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "remoting/test/remote_connection_observer.h" diff --git a/remoting/test/app_remoting_report_issue_request.h b/remoting/test/app_remoting_report_issue_request.h index 43548e5..bcb02c5 100644 --- a/remoting/test/app_remoting_report_issue_request.h +++ b/remoting/test/app_remoting_report_issue_request.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 "net/url_request/url_fetcher_delegate.h" diff --git a/remoting/test/app_remoting_report_issue_request_unittest.cc b/remoting/test/app_remoting_report_issue_request_unittest.cc index 245988b..3924746 100644 --- a/remoting/test/app_remoting_report_issue_request_unittest.cc +++ b/remoting/test/app_remoting_report_issue_request_unittest.cc @@ -5,6 +5,7 @@ #include "remoting/test/app_remoting_report_issue_request.h" #include "base/bind.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/timer/timer.h" diff --git a/remoting/test/app_remoting_test_driver_environment.h b/remoting/test/app_remoting_test_driver_environment.h index 3ed22d7..4a989c0 100644 --- a/remoting/test/app_remoting_test_driver_environment.h +++ b/remoting/test/app_remoting_test_driver_environment.h @@ -10,6 +10,7 @@ #include <vector> #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/test/remote_application_details.h" #include "remoting/test/remote_host_info_fetcher.h" diff --git a/remoting/test/app_remoting_test_driver_environment_unittest.cc b/remoting/test/app_remoting_test_driver_environment_unittest.cc index cf9a4cc..3efe396 100644 --- a/remoting/test/app_remoting_test_driver_environment_unittest.cc +++ b/remoting/test/app_remoting_test_driver_environment_unittest.cc @@ -4,9 +4,12 @@ #include "remoting/test/app_remoting_test_driver_environment.h" +#include <stddef.h> + #include <algorithm> #include "base/files/file_path.h" +#include "base/macros.h" #include "remoting/test/fake_access_token_fetcher.h" #include "remoting/test/fake_app_remoting_report_issue_request.h" #include "remoting/test/fake_refresh_token_store.h" diff --git a/remoting/test/chromoting_test_driver_environment.h b/remoting/test/chromoting_test_driver_environment.h index 81a66c9..c894ba7 100644 --- a/remoting/test/chromoting_test_driver_environment.h +++ b/remoting/test/chromoting_test_driver_environment.h @@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "remoting/test/host_info.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/remoting/test/chromoting_test_driver_environment_unittest.cc b/remoting/test/chromoting_test_driver_environment_unittest.cc index 8e7f7f8..93d1732 100644 --- a/remoting/test/chromoting_test_driver_environment_unittest.cc +++ b/remoting/test/chromoting_test_driver_environment_unittest.cc @@ -5,6 +5,7 @@ #include "remoting/test/chromoting_test_driver_environment.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "remoting/test/fake_access_token_fetcher.h" #include "remoting/test/fake_host_list_fetcher.h" #include "remoting/test/fake_refresh_token_store.h" diff --git a/remoting/test/chromoting_test_fixture.h b/remoting/test/chromoting_test_fixture.h index d680422..c6a9fc5 100644 --- a/remoting/test/chromoting_test_fixture.h +++ b/remoting/test/chromoting_test_fixture.h @@ -5,6 +5,7 @@ #ifndef REMOTING_TEST_CHROMOTING_TEST_FIXTURE_H_ #define REMOTING_TEST_CHROMOTING_TEST_FIXTURE_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/remoting/test/connection_time_observer.h b/remoting/test/connection_time_observer.h index e5d83b8..233dc4c 100644 --- a/remoting/test/connection_time_observer.h +++ b/remoting/test/connection_time_observer.h @@ -7,6 +7,7 @@ #include <map> +#include "base/macros.h" #include "remoting/test/remote_connection_observer.h" namespace base { diff --git a/remoting/test/connection_time_observer_unittest.cc b/remoting/test/connection_time_observer_unittest.cc index 3a4929a..8e52e59 100644 --- a/remoting/test/connection_time_observer_unittest.cc +++ b/remoting/test/connection_time_observer_unittest.cc @@ -6,6 +6,7 @@ #include <utility> +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/time/time.h" diff --git a/remoting/test/fake_access_token_fetcher.h b/remoting/test/fake_access_token_fetcher.h index b2d74de..521db86 100644 --- a/remoting/test/fake_access_token_fetcher.h +++ b/remoting/test/fake_access_token_fetcher.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "remoting/test/access_token_fetcher.h" namespace remoting { diff --git a/remoting/test/fake_app_remoting_report_issue_request.h b/remoting/test/fake_app_remoting_report_issue_request.h index 2502040..11ecdcc 100644 --- a/remoting/test/fake_app_remoting_report_issue_request.h +++ b/remoting/test/fake_app_remoting_report_issue_request.h @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "remoting/test/app_remoting_report_issue_request.h" namespace remoting { diff --git a/remoting/test/fake_host_list_fetcher.h b/remoting/test/fake_host_list_fetcher.h index be77ca0..0b67535 100644 --- a/remoting/test/fake_host_list_fetcher.h +++ b/remoting/test/fake_host_list_fetcher.h @@ -5,6 +5,7 @@ #ifndef REMOTING_TEST_FAKE_HOST_LIST_FETCHER_H_ #define REMOTING_TEST_FAKE_HOST_LIST_FETCHER_H_ +#include "base/macros.h" #include "remoting/test/host_list_fetcher.h" namespace remoting { diff --git a/remoting/test/fake_network_dispatcher.cc b/remoting/test/fake_network_dispatcher.cc index d2076ab..dad459f 100644 --- a/remoting/test/fake_network_dispatcher.cc +++ b/remoting/test/fake_network_dispatcher.cc @@ -4,6 +4,8 @@ #include "remoting/test/fake_network_dispatcher.h" +#include <stddef.h> + #include "base/bind.h" #include "base/location.h" #include "base/single_thread_task_runner.h" diff --git a/remoting/test/fake_network_dispatcher.h b/remoting/test/fake_network_dispatcher.h index 7ecbee9..e5fe112 100644 --- a/remoting/test/fake_network_dispatcher.h +++ b/remoting/test/fake_network_dispatcher.h @@ -8,6 +8,7 @@ #include <map> #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/synchronization/lock.h" #include "third_party/webrtc/p2p/base/packetsocketfactory.h" diff --git a/remoting/test/fake_port_allocator.cc b/remoting/test/fake_port_allocator.cc index 972ded5..04047e6 100644 --- a/remoting/test/fake_port_allocator.cc +++ b/remoting/test/fake_port_allocator.cc @@ -4,6 +4,7 @@ #include "remoting/test/fake_port_allocator.h" +#include "base/macros.h" #include "remoting/test/fake_network_dispatcher.h" #include "remoting/test/fake_network_manager.h" #include "remoting/test/fake_socket_factory.h" diff --git a/remoting/test/fake_port_allocator.h b/remoting/test/fake_port_allocator.h index d848dfd..dfab4a5 100644 --- a/remoting/test/fake_port_allocator.h +++ b/remoting/test/fake_port_allocator.h @@ -7,6 +7,7 @@ #include <set> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "remoting/protocol/port_allocator_factory.h" diff --git a/remoting/test/fake_refresh_token_store.h b/remoting/test/fake_refresh_token_store.h index 9513537..6884751 100644 --- a/remoting/test/fake_refresh_token_store.h +++ b/remoting/test/fake_refresh_token_store.h @@ -5,6 +5,7 @@ #ifndef REMOTING_TEST_FAKE_REFRESH_TOKEN_STORE_H_ #define REMOTING_TEST_FAKE_REFRESH_TOKEN_STORE_H_ +#include "base/macros.h" #include "remoting/test/refresh_token_store.h" namespace remoting { diff --git a/remoting/test/fake_remote_host_info_fetcher.h b/remoting/test/fake_remote_host_info_fetcher.h index af8b0b4..bdabbe4 100644 --- a/remoting/test/fake_remote_host_info_fetcher.h +++ b/remoting/test/fake_remote_host_info_fetcher.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "remoting/test/remote_host_info_fetcher.h" namespace remoting { diff --git a/remoting/test/fake_socket_factory.cc b/remoting/test/fake_socket_factory.cc index 0f0d418..0e576cf 100644 --- a/remoting/test/fake_socket_factory.cc +++ b/remoting/test/fake_socket_factory.cc @@ -8,10 +8,12 @@ #include "remoting/test/fake_socket_factory.h" #include <math.h> +#include <stddef.h> #include "base/bind.h" #include "base/callback.h" #include "base/location.h" +#include "base/macros.h" #include "base/rand_util.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" @@ -200,12 +202,13 @@ void FakePacketSocketFactory::SetLatency(base::TimeDelta average, rtc::AsyncPacketSocket* FakePacketSocketFactory::CreateUdpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, uint16 max_port) { + uint16_t min_port, + uint16_t max_port) { DCHECK(task_runner_->BelongsToCurrentThread()); int port = -1; if (min_port > 0 && max_port > 0) { - for (uint16 i = min_port; i <= max_port; ++i) { + for (uint16_t i = min_port; i <= max_port; ++i) { if (udp_sockets_.find(i) == udp_sockets_.end()) { port = i; break; @@ -235,7 +238,8 @@ rtc::AsyncPacketSocket* FakePacketSocketFactory::CreateUdpSocket( rtc::AsyncPacketSocket* FakePacketSocketFactory::CreateServerTcpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, uint16 max_port, + uint16_t min_port, + uint16_t max_port, int opts) { return nullptr; } diff --git a/remoting/test/fake_socket_factory.h b/remoting/test/fake_socket_factory.h index 9a4366d..c49198f 100644 --- a/remoting/test/fake_socket_factory.h +++ b/remoting/test/fake_socket_factory.h @@ -5,10 +5,13 @@ #ifndef REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ #define REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ +#include <stdint.h> + #include <list> #include "base/callback_forward.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "remoting/test/fake_network_dispatcher.h" #include "third_party/webrtc/p2p/base/packetsocketfactory.h" @@ -52,12 +55,12 @@ class FakePacketSocketFactory : public rtc::PacketSocketFactory, // rtc::PacketSocketFactory interface. rtc::AsyncPacketSocket* CreateUdpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port) override; + uint16_t min_port, + uint16_t max_port) override; rtc::AsyncPacketSocket* CreateServerTcpSocket( const rtc::SocketAddress& local_address, - uint16 min_port, - uint16 max_port, + uint16_t min_port, + uint16_t max_port, int opts) override; rtc::AsyncPacketSocket* CreateClientTcpSocket( const rtc::SocketAddress& local_address, diff --git a/remoting/test/host_list_fetcher.h b/remoting/test/host_list_fetcher.h index af014d2..7b7cc3a 100644 --- a/remoting/test/host_list_fetcher.h +++ b/remoting/test/host_list_fetcher.h @@ -9,6 +9,7 @@ #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "net/url_request/url_fetcher_delegate.h" diff --git a/remoting/test/host_list_fetcher_unittest.cc b/remoting/test/host_list_fetcher_unittest.cc index a0db3817..47dcf89 100644 --- a/remoting/test/host_list_fetcher_unittest.cc +++ b/remoting/test/host_list_fetcher_unittest.cc @@ -5,6 +5,7 @@ #include "remoting/test/host_list_fetcher.h" #include "base/bind.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" diff --git a/remoting/test/leaky_bucket.h b/remoting/test/leaky_bucket.h index 5b54b40..505986f 100644 --- a/remoting/test/leaky_bucket.h +++ b/remoting/test/leaky_bucket.h @@ -5,7 +5,7 @@ #ifndef REMOTING_TEST_LEAKY_BUCKET_H_ #define REMOTING_TEST_LEAKY_BUCKET_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/time/time.h" namespace remoting { diff --git a/remoting/test/mock_access_token_fetcher.h b/remoting/test/mock_access_token_fetcher.h index 9486a36..85b430e 100644 --- a/remoting/test/mock_access_token_fetcher.h +++ b/remoting/test/mock_access_token_fetcher.h @@ -5,10 +5,11 @@ #ifndef REMOTING_TEST_MOCK_ACCESS_TOKEN_FETCHER_H_ #define REMOTING_TEST_MOCK_ACCESS_TOKEN_FETCHER_H_ -#include <string> - #include "remoting/test/access_token_fetcher.h" +#include <string> + +#include "base/macros.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/remoting/test/protocol_perftest.cc b/remoting/test/protocol_perftest.cc index fc12ad5..86cb161 100644 --- a/remoting/test/protocol_perftest.cc +++ b/remoting/test/protocol_perftest.cc @@ -4,6 +4,7 @@ #include "base/base64.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/rand_util.h" #include "base/run_loop.h" diff --git a/remoting/test/refresh_token_store.cc b/remoting/test/refresh_token_store.cc index c7ef0e7..dfe3964 100644 --- a/remoting/test/refresh_token_store.cc +++ b/remoting/test/refresh_token_store.cc @@ -9,6 +9,7 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/logging.h" +#include "base/macros.h" #include "base/values.h" namespace { diff --git a/remoting/test/remote_connection_observer.h b/remoting/test/remote_connection_observer.h index 99da8be..528debf 100644 --- a/remoting/test/remote_connection_observer.h +++ b/remoting/test/remote_connection_observer.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "remoting/proto/control.pb.h" #include "remoting/protocol/connection_to_host.h" #include "remoting/protocol/errors.h" diff --git a/remoting/test/remote_host_info_fetcher.h b/remoting/test/remote_host_info_fetcher.h index 984e375..4fc9d4c 100644 --- a/remoting/test/remote_host_info_fetcher.h +++ b/remoting/test/remote_host_info_fetcher.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 "net/url_request/url_fetcher_delegate.h" diff --git a/remoting/test/remote_host_info_fetcher_unittest.cc b/remoting/test/remote_host_info_fetcher_unittest.cc index 1c5bd83..e088a6b 100644 --- a/remoting/test/remote_host_info_fetcher_unittest.cc +++ b/remoting/test/remote_host_info_fetcher_unittest.cc @@ -5,6 +5,7 @@ #include "remoting/test/remote_host_info_fetcher.h" #include "base/bind.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "net/url_request/test_url_fetcher_factory.h" diff --git a/remoting/test/test_chromoting_client.h b/remoting/test/test_chromoting_client.h index ce9f9ac..15c5db1 100644 --- a/remoting/test/test_chromoting_client.h +++ b/remoting/test/test_chromoting_client.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" diff --git a/remoting/test/test_chromoting_client_unittest.cc b/remoting/test/test_chromoting_client_unittest.cc index 6d2522d..6a4d2cb 100644 --- a/remoting/test/test_chromoting_client_unittest.cc +++ b/remoting/test/test_chromoting_client_unittest.cc @@ -4,6 +4,7 @@ #include <string> +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "remoting/protocol/fake_connection_to_host.h" #include "remoting/signaling/fake_signal_strategy.h" diff --git a/remoting/test/test_video_renderer.cc b/remoting/test/test_video_renderer.cc index c0dbac6..5355772 100644 --- a/remoting/test/test_video_renderer.cc +++ b/remoting/test/test_video_renderer.cc @@ -4,9 +4,12 @@ #include "remoting/test/test_video_renderer.h" +#include <stdint.h> + #include "base/bind.h" #include "base/callback_helpers.h" #include "base/logging.h" +#include "base/macros.h" #include "base/synchronization/lock.h" #include "base/thread_task_runner_handle.h" #include "base/threading/thread.h" diff --git a/remoting/test/test_video_renderer.h b/remoting/test/test_video_renderer.h index 7e66e9d..d58266b 100644 --- a/remoting/test/test_video_renderer.h +++ b/remoting/test/test_video_renderer.h @@ -5,6 +5,7 @@ #ifndef REMOTING_TEST_TEST_VIDEO_RENDERER_H_ #define REMOTING_TEST_TEST_VIDEO_RENDERER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" diff --git a/remoting/test/test_video_renderer_unittest.cc b/remoting/test/test_video_renderer_unittest.cc index 54dc761..bf55954 100644 --- a/remoting/test/test_video_renderer_unittest.cc +++ b/remoting/test/test_video_renderer_unittest.cc @@ -4,8 +4,11 @@ #include "remoting/test/test_video_renderer.h" +#include <stdint.h> + #include <cmath> +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" @@ -343,7 +346,7 @@ scoped_ptr<webrtc::DesktopFrame> void TestVideoRendererTest::FillFrameWithGradient( webrtc::DesktopFrame* frame) const { for (int y = 0; y < frame->size().height(); ++y) { - uint8* p = frame->data() + y * frame->stride(); + uint8_t* p = frame->data() + y * frame->stride(); for (int x = 0; x < frame->size().width(); ++x) { *p++ = (255.0 * x) / frame->size().width(); *p++ = (164.0 * y) / frame->size().height(); diff --git a/remoting/test/video_frame_writer.cc b/remoting/test/video_frame_writer.cc index 2cee01c..6bd2cee 100644 --- a/remoting/test/video_frame_writer.cc +++ b/remoting/test/video_frame_writer.cc @@ -4,6 +4,8 @@ #include "remoting/test/video_frame_writer.h" +#include <stdint.h> + #include <vector> #include "base/files/file_path.h" diff --git a/remoting/test/video_frame_writer.h b/remoting/test/video_frame_writer.h index 479cb01..afedab2 100644 --- a/remoting/test/video_frame_writer.h +++ b/remoting/test/video_frame_writer.h @@ -5,6 +5,7 @@ #ifndef REMOTING_TEST_VIDEO_FRAME_WRITER_H_ #define REMOTING_TEST_VIDEO_FRAME_WRITER_H_ +#include "base/macros.h" #include "base/time/time.h" namespace base { |