Skip to content

Commit

Permalink
Switch to standard integer types in ipc/.
Browse files Browse the repository at this point in the history
BUG=138542
TBR=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1546533002

Cr-Commit-Position: refs/heads/master@{#366527}
  • Loading branch information
avi authored and Commit bot committed Dec 22, 2015
1 parent fed50a6 commit 246998d
Show file tree
Hide file tree
Showing 84 changed files with 184 additions and 16 deletions.
1 change: 1 addition & 0 deletions ipc/attachment_broker.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/process/process_handle.h"
#include "base/synchronization/lock.h"
#include "build/build_config.h"
#include "ipc/brokerable_attachment.h"
#include "ipc/ipc_export.h"
#include "ipc/ipc_listener.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/attachment_broker_mac_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <fcntl.h>
#include <mach/mach_vm.h>
#include <stddef.h>
#include <sys/mman.h>

#include "base/command_line.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/attachment_broker_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Multiply-included message file, hence no include guard.

#include "base/process/process_handle.h"
#include "build/build_config.h"
#include "ipc/brokerable_attachment.h"
#include "ipc/ipc_export.h"
#include "ipc/ipc_message_macros.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/attachment_broker_privileged.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "base/lazy_instance.h"
#include "base/metrics/histogram_macros.h"
#include "build/build_config.h"
#include "ipc/ipc_endpoint.h"

#if defined(OS_WIN)
Expand Down
2 changes: 2 additions & 0 deletions ipc/attachment_broker_privileged.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

#include <vector>

#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
#include "ipc/attachment_broker.h"
#include "ipc/ipc_export.h"

Expand Down
2 changes: 2 additions & 0 deletions ipc/attachment_broker_privileged_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ipc/attachment_broker_privileged_mac.h"

#include <stdint.h>

#include "base/mac/scoped_mach_port.h"
#include "base/memory/shared_memory.h"
#include "base/process/port_provider_mac.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/attachment_broker_privileged_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_

#include <mach/mach.h>
#include <stdint.h>

#include <map>

Expand Down
3 changes: 3 additions & 0 deletions ipc/attachment_broker_privileged_mac_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@

#include <mach/mach.h>
#include <mach/mach_vm.h>
#include <stddef.h>
#include <stdint.h>

#include <map>

#include "base/command_line.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#include "base/macros.h"
#include "base/memory/shared_memory.h"
#include "base/process/port_provider_mac.h"
#include "base/process/process_handle.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/attachment_broker_privileged_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_
#define IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_

#include "base/macros.h"
#include "ipc/attachment_broker_privileged.h"
#include "ipc/handle_attachment_win.h"
#include "ipc/ipc_export.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/attachment_broker_unprivileged.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ipc/attachment_broker_unprivileged.h"

#include "base/metrics/histogram_macros.h"
#include "build/build_config.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_endpoint.h"

Expand Down
1 change: 1 addition & 0 deletions ipc/attachment_broker_unprivileged.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_
#define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_

#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ipc/attachment_broker.h"
#include "ipc/ipc_export.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/attachment_broker_unprivileged_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_MAC_H_
#define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_MAC_H_

#include "base/macros.h"
#include "ipc/attachment_broker_unprivileged.h"
#include "ipc/ipc_export.h"
#include "ipc/mach_port_attachment_mac.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/attachment_broker_unprivileged_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_WIN_H_
#define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_WIN_H_

#include "base/macros.h"
#include "ipc/attachment_broker_unprivileged.h"
#include "ipc/handle_attachment_win.h"
#include "ipc/ipc_export.h"
Expand Down
3 changes: 3 additions & 0 deletions ipc/brokerable_attachment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "ipc/brokerable_attachment.h"

#include <stddef.h>

#include "build/build_config.h"
#include "ipc/attachment_broker.h"

namespace IPC {
Expand Down
2 changes: 2 additions & 0 deletions ipc/brokerable_attachment.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
#ifndef IPC_BROKERABLE_ATTACHMENT_H_
#define IPC_BROKERABLE_ATTACHMENT_H_

#include <stddef.h>
#include <stdint.h>

#include <algorithm>

#include "base/macros.h"
#include "build/build_config.h"
#include "ipc/ipc_export.h"
#include "ipc/ipc_message_attachment.h"

Expand Down
2 changes: 2 additions & 0 deletions ipc/ipc_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

#include "ipc/ipc_channel.h"

#include <stddef.h>
#include <stdint.h>

#include <limits>

#include "base/atomic_sequence_num.h"
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"

namespace {

Expand Down
12 changes: 7 additions & 5 deletions ipc/ipc_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
#ifndef IPC_IPC_CHANNEL_H_
#define IPC_IPC_CHANNEL_H_

#include <stddef.h>
#include <stdint.h>

#include <string>

#if defined(OS_POSIX)
#include <sys/types.h>
#endif

#include "base/compiler_specific.h"
#include "base/files/scoped_file.h"
#include "base/process/process.h"
#include "build/build_config.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_endpoint.h"
#include "ipc/ipc_message.h"

#if defined(OS_POSIX)
#include <sys/types.h>
#endif

namespace IPC {

class Listener;
Expand Down Expand Up @@ -73,7 +75,7 @@ class IPC_EXPORT Channel : public Endpoint {
};

// Messages internal to the IPC implementation are defined here.
// Uses Maximum value of message type (uint16), to avoid conflicting
// Uses Maximum value of message type (uint16_t), to avoid conflicting
// with normal message types, which are enumeration constants starting from 0.
enum {
// The Hello message is sent by the peer when the channel is connected.
Expand Down
1 change: 1 addition & 0 deletions ipc/ipc_channel_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "build/build_config.h"
#include "ipc/ipc_channel.h"

namespace IPC {
Expand Down
1 change: 1 addition & 0 deletions ipc/ipc_channel_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/macros.h"
#include "ipc/ipc_channel_factory.h"

namespace IPC {
Expand Down
1 change: 1 addition & 0 deletions ipc/ipc_channel_nacl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "base/bind.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/task_runner_util.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/ipc_channel_nacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <deque>
#include <string>

#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/ipc_channel_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/synchronization/lock.h"
#include "build/build_config.h"
#include "ipc/attachment_broker.h"
#include "ipc/ipc_descriptors.h"
#include "ipc/ipc_listener.h"
Expand Down
3 changes: 3 additions & 0 deletions ipc/ipc_channel_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "ipc/ipc_channel.h"

#include <stddef.h>
#include <sys/socket.h> // for CMSG macros

#include <queue>
Expand All @@ -15,8 +16,10 @@
#include <vector>

#include "base/files/scoped_file.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/process/process.h"
#include "build/build_config.h"
#include "ipc/ipc_channel_reader.h"
#include "ipc/ipc_message_attachment_set.h"

Expand Down
2 changes: 2 additions & 0 deletions ipc/ipc_channel_posix_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <sys/socket.h>
Expand All @@ -24,6 +25,7 @@
#include "base/single_thread_task_runner.h"
#include "base/test/multiprocess_test.h"
#include "base/test/test_timeouts.h"
#include "build/build_config.h"
#include "ipc/ipc_listener.h"
#include "ipc/unix_domain_socket_util.h"
#include "testing/multiprocess_func_list.h"
Expand Down
4 changes: 4 additions & 0 deletions ipc/ipc_channel_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "ipc/ipc_channel_proxy.h"

#include <stddef.h>
#include <stdint.h>

#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/location.h"
Expand All @@ -12,6 +15,7 @@
#include "base/profiler/scoped_tracker.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "ipc/ipc_channel_factory.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_logging.h"
Expand Down
3 changes: 3 additions & 0 deletions ipc/ipc_channel_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
#ifndef IPC_IPC_CHANNEL_PROXY_H_
#define IPC_IPC_CHANNEL_PROXY_H_

#include <stdint.h>

#include <vector>

#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "base/threading/non_thread_safe.h"
#include "build/build_config.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_endpoint.h"
Expand Down
3 changes: 3 additions & 0 deletions ipc/ipc_channel_proxy_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "build/build_config.h"

#include <stddef.h>
#include <stdint.h>

#include "base/pickle.h"
#include "base/threading/thread.h"
#include "ipc/ipc_message.h"
Expand Down
2 changes: 2 additions & 0 deletions ipc/ipc_channel_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ipc/ipc_channel_reader.h"

#include <stddef.h>

#include <algorithm>

#include "base/message_loop/message_loop.h"
Expand Down
2 changes: 2 additions & 0 deletions ipc/ipc_channel_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef IPC_IPC_CHANNEL_READER_H_
#define IPC_IPC_CHANNEL_READER_H_

#include <stddef.h>

#include <set>

#include "base/gtest_prod_util.h"
Expand Down
5 changes: 4 additions & 1 deletion ipc/ipc_channel_reader_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "build/build_config.h"

#include <stddef.h>
#include <stdint.h>

#include <limits>
#include <set>

Expand Down Expand Up @@ -216,7 +219,7 @@ TEST(ChannelReaderTest, InvalidMessageSize) {
reinterpret_cast<const char*>(&header), sizeof(header)));
EXPECT_LE(reader.input_overflow_buf_.capacity(), capacity_before);

// Payload size is maximum int32 value
// Payload size is maximum int32_t value
header.payload_size = std::numeric_limits<int32_t>::max();
EXPECT_FALSE(reader.TranslateInputData(
reinterpret_cast<const char*>(&header), sizeof(header)));
Expand Down
2 changes: 2 additions & 0 deletions ipc/ipc_channel_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <windows.h>
#endif

#include <stdint.h>

#include <string>

#include "base/pickle.h"
Expand Down
3 changes: 2 additions & 1 deletion ipc/ipc_channel_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

#include "ipc/ipc_channel_win.h"

#include <stdint.h>
#include <windows.h>
#include <stddef.h>
#include <stdint.h>

#include "base/auto_reset.h"
#include "base/bind.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/ipc_channel_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <queue>
#include <string>

#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
Expand Down
1 change: 1 addition & 0 deletions ipc/ipc_fuzzing_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#include "ipc/ipc_test_base.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down
Loading

0 comments on commit 246998d

Please sign in to comment.