diff options
author | amistry <amistry@chromium.org> | 2016-03-10 22:32:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-11 06:34:21 +0000 |
commit | ecd73b09cccaaab72c859fef403ed489b7d1f174 (patch) | |
tree | 2b8d4166e1d64c0f2c8503e097494eada69f73a0 | |
parent | c7b3190c0ecd5b88688aa5e55d3085f0fbd40e11 (diff) | |
download | chromium_src-ecd73b09cccaaab72c859fef403ed489b7d1f174.zip chromium_src-ecd73b09cccaaab72c859fef403ed489b7d1f174.tar.gz chromium_src-ecd73b09cccaaab72c859fef403ed489b7d1f174.tar.bz2 |
[mojo-sdk] Remove mojo_ignore_result and move C++ macros.h to bindings internal code.
The one macro remaining in macros.h is only used by generated C++ code.
BUG=534695
Review URL: https://codereview.chromium.org/1784743003
Cr-Commit-Position: refs/heads/master@{#380556}
63 files changed, 32 insertions, 81 deletions
diff --git a/components/mus/common/window_tracker.h b/components/mus/common/window_tracker.h index 8446bbf..7113f3d 100644 --- a/components/mus/common/window_tracker.h +++ b/components/mus/common/window_tracker.h @@ -7,8 +7,8 @@ #include <vector> +#include "base/macros.h" #include "base/stl_util.h" -#include "mojo/public/cpp/system/macros.h" namespace mus { diff --git a/components/mus/public/cpp/tests/window_server_test_suite.h b/components/mus/public/cpp/tests/window_server_test_suite.h index 43565bb..45104b7 100644 --- a/components/mus/public/cpp/tests/window_server_test_suite.h +++ b/components/mus/public/cpp/tests/window_server_test_suite.h @@ -7,7 +7,6 @@ #include "base/macros.h" #include "base/test/test_suite.h" -#include "mojo/public/cpp/system/macros.h" namespace mus { diff --git a/components/mus/public/cpp/window.h b/components/mus/public/cpp/window.h index e3bda59..3c3e460 100644 --- a/components/mus/public/cpp/window.h +++ b/components/mus/public/cpp/window.h @@ -16,7 +16,6 @@ #include "components/mus/public/interfaces/surface_id.mojom.h" #include "components/mus/public/interfaces/window_tree.mojom.h" #include "mojo/public/cpp/bindings/array.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/shell/public/interfaces/interface_provider.mojom.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/geometry/rect.h" diff --git a/components/mus/public/cpp/window_tracker.h b/components/mus/public/cpp/window_tracker.h index 38ea000..9cbafeb 100644 --- a/components/mus/public/cpp/window_tracker.h +++ b/components/mus/public/cpp/window_tracker.h @@ -11,7 +11,6 @@ #include "base/macros.h" #include "components/mus/common/window_tracker.h" #include "components/mus/public/cpp/window_observer.h" -#include "mojo/public/cpp/system/macros.h" namespace mus { diff --git a/components/resource_provider/resource_provider_apptest.cc b/components/resource_provider/resource_provider_apptest.cc index 1632a2a..a4c84ad 100644 --- a/components/resource_provider/resource_provider_apptest.cc +++ b/components/resource_provider/resource_provider_apptest.cc @@ -14,7 +14,6 @@ #include "mojo/common/common_type_converters.h" #include "mojo/platform_handle/platform_handle_functions.h" #include "mojo/public/cpp/bindings/array.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/shell/public/cpp/application_test_base.h" namespace resource_provider { diff --git a/mojo/edk/embedder/embedder_unittest.cc b/mojo/edk/embedder/embedder_unittest.cc index 9b96c1f..b5927b3 100644 --- a/mojo/edk/embedder/embedder_unittest.cc +++ b/mojo/edk/embedder/embedder_unittest.cc @@ -24,7 +24,6 @@ #include "mojo/message_pump/message_pump_mojo.h" #include "mojo/public/c/system/core.h" #include "mojo/public/cpp/system/handle.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/public/cpp/system/message_pipe.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/mojo/edk/embedder/platform_channel_pair.h b/mojo/edk/embedder/platform_channel_pair.h index 596ed2e..591592b 100644 --- a/mojo/edk/embedder/platform_channel_pair.h +++ b/mojo/edk/embedder/platform_channel_pair.h @@ -11,7 +11,6 @@ #include "build/build_config.h" #include "mojo/edk/embedder/scoped_platform_handle.h" #include "mojo/edk/system/system_impl_export.h" -#include "mojo/public/cpp/system/macros.h" namespace base { class CommandLine; diff --git a/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc b/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc index 45a6dce..e05cd79 100644 --- a/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc +++ b/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc @@ -27,7 +27,6 @@ #include "mojo/edk/embedder/platform_handle_vector.h" #include "mojo/edk/embedder/scoped_platform_handle.h" #include "mojo/edk/test/test_utils.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/edk/embedder/platform_shared_buffer.h b/mojo/edk/embedder/platform_shared_buffer.h index 7ca596a..dfe91651 100644 --- a/mojo/edk/embedder/platform_shared_buffer.h +++ b/mojo/edk/embedder/platform_shared_buffer.h @@ -15,7 +15,6 @@ #include "base/synchronization/lock.h" #include "mojo/edk/embedder/scoped_platform_handle.h" #include "mojo/edk/system/system_impl_export.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace edk { diff --git a/mojo/edk/embedder/platform_shared_buffer_unittest.cc b/mojo/edk/embedder/platform_shared_buffer_unittest.cc index 5c12f85..098ff26 100644 --- a/mojo/edk/embedder/platform_shared_buffer_unittest.cc +++ b/mojo/edk/embedder/platform_shared_buffer_unittest.cc @@ -12,7 +12,6 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/shared_memory.h" #include "base/sys_info.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_WIN) diff --git a/mojo/edk/js/tests/js_to_cpp_tests.cc b/mojo/edk/js/tests/js_to_cpp_tests.cc index 08f3a0c..6d3426d 100644 --- a/mojo/edk/js/tests/js_to_cpp_tests.cc +++ b/mojo/edk/js/tests/js_to_cpp_tests.cc @@ -24,7 +24,6 @@ #include "mojo/edk/test/test_utils.h" #include "mojo/public/cpp/bindings/binding.h" #include "mojo/public/cpp/system/core.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/edk/system/core_test_base.cc b/mojo/edk/system/core_test_base.cc index dd1473a..635501a 100644 --- a/mojo/edk/system/core_test_base.cc +++ b/mojo/edk/system/core_test_base.cc @@ -16,7 +16,6 @@ #include "mojo/edk/system/configuration.h" #include "mojo/edk/system/core.h" #include "mojo/edk/system/dispatcher.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace edk { diff --git a/mojo/edk/system/core_test_base.h b/mojo/edk/system/core_test_base.h index 665b9a0..3d2346a 100644 --- a/mojo/edk/system/core_test_base.h +++ b/mojo/edk/system/core_test_base.h @@ -12,7 +12,6 @@ #include "mojo/edk/embedder/embedder_internal.h" #include "mojo/edk/system/test_utils.h" #include "mojo/public/c/system/types.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/edk/system/core_unittest.cc b/mojo/edk/system/core_unittest.cc index a339767..7eeabc0 100644 --- a/mojo/edk/system/core_unittest.cc +++ b/mojo/edk/system/core_unittest.cc @@ -13,7 +13,6 @@ #include "mojo/edk/system/awakable.h" #include "mojo/edk/system/core_test_base.h" #include "mojo/edk/system/test_utils.h" -#include "mojo/public/cpp/system/macros.h" #if defined(OS_WIN) #include "base/win/windows_version.h" diff --git a/mojo/edk/system/data_pipe.h b/mojo/edk/system/data_pipe.h index d2b90bf..2428189 100644 --- a/mojo/edk/system/data_pipe.h +++ b/mojo/edk/system/data_pipe.h @@ -13,7 +13,6 @@ #include "mojo/edk/system/system_impl_export.h" #include "mojo/public/c/system/data_pipe.h" #include "mojo/public/c/system/types.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace edk { diff --git a/mojo/edk/system/data_pipe_unittest.cc b/mojo/edk/system/data_pipe_unittest.cc index a343282..944340b 100644 --- a/mojo/edk/system/data_pipe_unittest.cc +++ b/mojo/edk/system/data_pipe_unittest.cc @@ -19,7 +19,6 @@ #include "mojo/public/c/system/data_pipe.h" #include "mojo/public/c/system/functions.h" #include "mojo/public/c/system/message_pipe.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/edk/system/mapping_table.h b/mojo/edk/system/mapping_table.h index ed0a0f6..120f9ca 100644 --- a/mojo/edk/system/mapping_table.h +++ b/mojo/edk/system/mapping_table.h @@ -10,10 +10,10 @@ #include <vector> #include "base/containers/hash_tables.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "mojo/edk/system/system_impl_export.h" #include "mojo/public/c/system/types.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { diff --git a/mojo/edk/system/options_validation.h b/mojo/edk/system/options_validation.h index ac81954..e1b337d 100644 --- a/mojo/edk/system/options_validation.h +++ b/mojo/edk/system/options_validation.h @@ -20,7 +20,6 @@ #include "base/macros.h" #include "mojo/edk/system/system_impl_export.h" #include "mojo/public/c/system/types.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace edk { diff --git a/mojo/edk/system/shared_buffer_dispatcher_unittest.cc b/mojo/edk/system/shared_buffer_dispatcher_unittest.cc index 902f786..5605264 100644 --- a/mojo/edk/system/shared_buffer_dispatcher_unittest.cc +++ b/mojo/edk/system/shared_buffer_dispatcher_unittest.cc @@ -9,10 +9,10 @@ #include <limits> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "mojo/edk/embedder/platform_shared_buffer.h" #include "mojo/edk/system/dispatcher.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/edk/system/test_utils.h b/mojo/edk/system/test_utils.h index b576f81..1c90dc1 100644 --- a/mojo/edk/system/test_utils.h +++ b/mojo/edk/system/test_utils.h @@ -8,7 +8,6 @@ #include "base/macros.h" #include "base/time/time.h" #include "mojo/public/c/system/types.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/edk/system/wait_set_dispatcher_unittest.cc b/mojo/edk/system/wait_set_dispatcher_unittest.cc index 1034705..a90a356 100644 --- a/mojo/edk/system/wait_set_dispatcher_unittest.cc +++ b/mojo/edk/system/wait_set_dispatcher_unittest.cc @@ -16,7 +16,6 @@ #include "mojo/edk/system/message_pipe_dispatcher.h" #include "mojo/edk/system/test_utils.h" #include "mojo/edk/system/waiter.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/edk/system/waiter_test_utils.h b/mojo/edk/system/waiter_test_utils.h index 016b295..eda1396 100644 --- a/mojo/edk/system/waiter_test_utils.h +++ b/mojo/edk/system/waiter_test_utils.h @@ -7,13 +7,13 @@ #include <stdint.h> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/threading/simple_thread.h" #include "mojo/edk/system/dispatcher.h" #include "mojo/edk/system/handle_signals_state.h" #include "mojo/edk/system/waiter.h" #include "mojo/public/c/system/types.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace edk { diff --git a/mojo/edk/system/waiter_unittest.cc b/mojo/edk/system/waiter_unittest.cc index 16250cc..aa928ffe 100644 --- a/mojo/edk/system/waiter_unittest.cc +++ b/mojo/edk/system/waiter_unittest.cc @@ -11,10 +11,10 @@ #include <stdint.h> +#include "base/macros.h" #include "base/synchronization/lock.h" #include "base/threading/simple_thread.h" #include "mojo/edk/system/test_utils.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/edk/test/scoped_ipc_support.h b/mojo/edk/test/scoped_ipc_support.h index ff2f558..04173d3 100644 --- a/mojo/edk/test/scoped_ipc_support.h +++ b/mojo/edk/test/scoped_ipc_support.h @@ -11,7 +11,6 @@ #include "base/task_runner.h" #include "mojo/edk/embedder/process_delegate.h" #include "mojo/edk/embedder/scoped_platform_handle.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace edk { diff --git a/mojo/mojo_edk_tests.gyp b/mojo/mojo_edk_tests.gyp index b67857a..b8ff828 100644 --- a/mojo/mojo_edk_tests.gyp +++ b/mojo/mojo_edk_tests.gyp @@ -70,6 +70,7 @@ 'public/cpp/bindings/tests/equals_unittest.cc', 'public/cpp/bindings/tests/handle_passing_unittest.cc', 'public/cpp/bindings/tests/interface_ptr_unittest.cc', + 'public/cpp/bindings/tests/macros_unittest.cc', 'public/cpp/bindings/tests/map_unittest.cc', 'public/cpp/bindings/tests/message_queue.cc', 'public/cpp/bindings/tests/message_queue.h', diff --git a/mojo/mojo_public.gyp b/mojo/mojo_public.gyp index ca5ff13..2844195 100644 --- a/mojo/mojo_public.gyp +++ b/mojo/mojo_public.gyp @@ -81,7 +81,6 @@ 'public/cpp/system/data_pipe.h', 'public/cpp/system/functions.h', 'public/cpp/system/handle.h', - 'public/cpp/system/macros.h', 'public/cpp/system/message_pipe.h', 'public/cpp/system/watcher.cc', 'public/cpp/system/watcher.h', @@ -139,6 +138,7 @@ 'public/cpp/bindings/lib/interface_endpoint_client.cc', 'public/cpp/bindings/lib/interface_endpoint_client.h', 'public/cpp/bindings/lib/interface_ptr_state.h', + 'public/cpp/bindings/lib/macros.h', 'public/cpp/bindings/lib/map_data_internal.h', 'public/cpp/bindings/lib/map_internal.h', 'public/cpp/bindings/lib/map_serialization.h', diff --git a/mojo/mojo_variables.gypi b/mojo/mojo_variables.gypi index 66ec138..e19aa95 100644 --- a/mojo/mojo_variables.gypi +++ b/mojo/mojo_variables.gypi @@ -44,7 +44,6 @@ '<(DEPTH)/mojo/public/c/system/tests/core_unittest_pure_c.c', '<(DEPTH)/mojo/public/c/system/tests/macros_unittest.cc', '<(DEPTH)/mojo/public/cpp/system/tests/core_unittest.cc', - '<(DEPTH)/mojo/public/cpp/system/tests/macros_unittest.cc', '<(DEPTH)/mojo/public/cpp/system/tests/watcher_unittest.cc', ], }, diff --git a/mojo/public/c/system/macros.h b/mojo/public/c/system/macros.h index ce84170..917c69c 100644 --- a/mojo/public/c/system/macros.h +++ b/mojo/public/c/system/macros.h @@ -7,20 +7,6 @@ #include <stddef.h> -#ifdef __cplusplus -// Used to explicitly mark the return value of a function as unused. If you are -// really sure you don't want to do anything with the return value of a function -// that has been marked WARN_UNUSED_RESULT, wrap it with this. Example: -// -// scoped_ptr<MyType> my_var = ...; -// if (TakeOwnership(my_var.get()) == SUCCESS) -// mojo_ignore_result(my_var.release()); -// -template <typename T> -inline void mojo_ignore_result(const T&) { -} -#endif - // Assert things at compile time. (|msg| should be a valid identifier name.) // This macro is currently C++-only, but we want to use it in the C core.h. // Use like: diff --git a/mojo/public/c/system/tests/core_perftest.cc b/mojo/public/c/system/tests/core_perftest.cc index 80734d30..5d4e56b 100644 --- a/mojo/public/c/system/tests/core_perftest.cc +++ b/mojo/public/c/system/tests/core_perftest.cc @@ -10,8 +10,8 @@ #include <stdint.h> #include <stdio.h> +#include "base/macros.h" #include "base/threading/simple_thread.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/public/cpp/test_support/test_support.h" #include "mojo/public/cpp/test_support/test_utils.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/mojo/public/cpp/bindings/BUILD.gn b/mojo/public/cpp/bindings/BUILD.gn index 137d8d3..0486a52 100644 --- a/mojo/public/cpp/bindings/BUILD.gn +++ b/mojo/public/cpp/bindings/BUILD.gn @@ -43,6 +43,7 @@ source_set("bindings") { "lib/interface_endpoint_client.h", "lib/interface_id.h", "lib/interface_ptr_state.h", + "lib/macros.h", "lib/map_data_internal.h", "lib/map_internal.h", "lib/map_serialization.h", diff --git a/mojo/public/cpp/bindings/interface_ptr_info.h b/mojo/public/cpp/bindings/interface_ptr_info.h index 4d559f5..014410d 100644 --- a/mojo/public/cpp/bindings/interface_ptr_info.h +++ b/mojo/public/cpp/bindings/interface_ptr_info.h @@ -8,7 +8,7 @@ #include <stdint.h> #include <utility> -#include "mojo/public/cpp/system/macros.h" +#include "base/move.h" #include "mojo/public/cpp/system/message_pipe.h" namespace mojo { diff --git a/mojo/public/cpp/bindings/lib/connector.cc b/mojo/public/cpp/bindings/lib/connector.cc index c7378f0..c84a93d 100644 --- a/mojo/public/cpp/bindings/lib/connector.cc +++ b/mojo/public/cpp/bindings/lib/connector.cc @@ -108,7 +108,7 @@ bool Connector::WaitForIncomingMessage(MojoDeadline deadline) { HandleError(rv != MOJO_RESULT_FAILED_PRECONDITION, false); return false; } - mojo_ignore_result(ReadSingleMessage(&rv)); + ignore_result(ReadSingleMessage(&rv)); return (rv == MOJO_RESULT_OK); } diff --git a/mojo/public/cpp/bindings/lib/control_message_handler.h b/mojo/public/cpp/bindings/lib/control_message_handler.h index 225dfec..27acde8c 100644 --- a/mojo/public/cpp/bindings/lib/control_message_handler.h +++ b/mojo/public/cpp/bindings/lib/control_message_handler.h @@ -7,8 +7,8 @@ #include <stdint.h> +#include "base/macros.h" #include "mojo/public/cpp/bindings/message.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace internal { diff --git a/mojo/public/cpp/bindings/lib/control_message_proxy.cc b/mojo/public/cpp/bindings/lib/control_message_proxy.cc index d450355..6208065 100644 --- a/mojo/public/cpp/bindings/lib/control_message_proxy.cc +++ b/mojo/public/cpp/bindings/lib/control_message_proxy.cc @@ -8,9 +8,9 @@ #include <stdint.h> #include <utility> +#include "base/macros.h" #include "mojo/public/cpp/bindings/lib/message_builder.h" #include "mojo/public/cpp/bindings/message.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h" namespace mojo { diff --git a/mojo/public/cpp/bindings/lib/control_message_proxy.h b/mojo/public/cpp/bindings/lib/control_message_proxy.h index 57b871e..33aaf82 100644 --- a/mojo/public/cpp/bindings/lib/control_message_proxy.h +++ b/mojo/public/cpp/bindings/lib/control_message_proxy.h @@ -7,8 +7,8 @@ #include <stdint.h> +#include "base/macros.h" #include "mojo/public/cpp/bindings/callback.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { diff --git a/mojo/public/cpp/bindings/lib/filter_chain.h b/mojo/public/cpp/bindings/lib/filter_chain.h index 99e8e73..689a7fa 100644 --- a/mojo/public/cpp/bindings/lib/filter_chain.h +++ b/mojo/public/cpp/bindings/lib/filter_chain.h @@ -7,9 +7,9 @@ #include <vector> +#include "base/move.h" #include "mojo/public/cpp/bindings/message.h" #include "mojo/public/cpp/bindings/message_filter.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace internal { diff --git a/mojo/public/cpp/system/macros.h b/mojo/public/cpp/bindings/lib/macros.h index 931c978..62f4292 100644 --- a/mojo/public/cpp/system/macros.h +++ b/mojo/public/cpp/bindings/lib/macros.h @@ -2,16 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Define a set of C++ specific macros. -// Mojo C++ API users can assume that mojo/public/cpp/system/macros.h -// includes mojo/public/c/system/macros.h. +#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MACROS_H_ +#define MOJO_PUBLIC_CPP_BINDINGS_LIB_MACROS_H_ -#ifndef MOJO_PUBLIC_CPP_SYSTEM_MACROS_H_ -#define MOJO_PUBLIC_CPP_SYSTEM_MACROS_H_ - -#include <stddef.h> - -#include "mojo/public/c/system/macros.h" // Symbols exposed. +// This file defines macros that are only used by generated bindings. // The C++ standard requires that static const members have an out-of-class // definition (in a single compilation unit), but MSVC chokes on this (when @@ -36,4 +30,4 @@ #define MOJO_STATIC_CONST_MEMBER_DEFINITION #endif -#endif // MOJO_PUBLIC_CPP_SYSTEM_MACROS_H_ +#endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MACROS_H_ diff --git a/mojo/public/cpp/bindings/lib/shared_data.h b/mojo/public/cpp/bindings/lib/shared_data.h index 0afd892..8e93300 100644 --- a/mojo/public/cpp/bindings/lib/shared_data.h +++ b/mojo/public/cpp/bindings/lib/shared_data.h @@ -8,7 +8,6 @@ #include "base/logging.h" #include "base/macros.h" #include "base/threading/thread_checker.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace internal { diff --git a/mojo/public/cpp/bindings/lib/validate_params.h b/mojo/public/cpp/bindings/lib/validate_params.h index 4f4735a..78c0589 100644 --- a/mojo/public/cpp/bindings/lib/validate_params.h +++ b/mojo/public/cpp/bindings/lib/validate_params.h @@ -7,7 +7,7 @@ #include <stdint.h> -#include "mojo/public/cpp/system/macros.h" +#include "base/macros.h" namespace mojo { namespace internal { diff --git a/mojo/public/cpp/bindings/lib/validation_errors.h b/mojo/public/cpp/bindings/lib/validation_errors.h index 1fcd335..bdace6c 100644 --- a/mojo/public/cpp/bindings/lib/validation_errors.h +++ b/mojo/public/cpp/bindings/lib/validation_errors.h @@ -6,8 +6,8 @@ #define MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_ERRORS_H_ #include "base/logging.h" +#include "base/macros.h" #include "mojo/public/cpp/bindings/callback.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace internal { diff --git a/mojo/public/cpp/bindings/message_filter.h b/mojo/public/cpp/bindings/message_filter.h index 8e10f6b..638c53b 100644 --- a/mojo/public/cpp/bindings/message_filter.h +++ b/mojo/public/cpp/bindings/message_filter.h @@ -6,7 +6,6 @@ #define MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_FILTER_H_ #include "mojo/public/cpp/bindings/message.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { diff --git a/mojo/public/cpp/bindings/struct_ptr.h b/mojo/public/cpp/bindings/struct_ptr.h index 3e907e0..e3b072d 100644 --- a/mojo/public/cpp/bindings/struct_ptr.h +++ b/mojo/public/cpp/bindings/struct_ptr.h @@ -8,8 +8,8 @@ #include <new> #include "base/logging.h" +#include "base/move.h" #include "mojo/public/cpp/bindings/type_converter.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { namespace internal { diff --git a/mojo/public/cpp/bindings/tests/BUILD.gn b/mojo/public/cpp/bindings/tests/BUILD.gn index 7fdb6d2..c689fe31 100644 --- a/mojo/public/cpp/bindings/tests/BUILD.gn +++ b/mojo/public/cpp/bindings/tests/BUILD.gn @@ -21,6 +21,7 @@ source_set("tests") { "equals_unittest.cc", "handle_passing_unittest.cc", "interface_ptr_unittest.cc", + "macros_unittest.cc", "map_unittest.cc", "message_queue.cc", "message_queue.h", diff --git a/mojo/public/cpp/bindings/tests/binding_unittest.cc b/mojo/public/cpp/bindings/tests/binding_unittest.cc index 6e8e578..15b899d 100644 --- a/mojo/public/cpp/bindings/tests/binding_unittest.cc +++ b/mojo/public/cpp/bindings/tests/binding_unittest.cc @@ -10,11 +10,11 @@ #include <stdint.h> #include <utility> +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "mojo/message_pump/message_pump_mojo.h" #include "mojo/public/cpp/bindings/strong_binding.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.h" #include "mojo/public/interfaces/bindings/tests/sample_service.mojom.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/mojo/public/cpp/bindings/tests/connector_unittest.cc b/mojo/public/cpp/bindings/tests/connector_unittest.cc index a57459d..04e6bc9 100644 --- a/mojo/public/cpp/bindings/tests/connector_unittest.cc +++ b/mojo/public/cpp/bindings/tests/connector_unittest.cc @@ -14,7 +14,6 @@ #include "mojo/message_pump/message_pump_mojo.h" #include "mojo/public/cpp/bindings/lib/message_builder.h" #include "mojo/public/cpp/bindings/tests/message_queue.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/public/cpp/bindings/tests/container_test_util.h b/mojo/public/cpp/bindings/tests/container_test_util.h index ff46b8f..b2038ba 100644 --- a/mojo/public/cpp/bindings/tests/container_test_util.h +++ b/mojo/public/cpp/bindings/tests/container_test_util.h @@ -8,7 +8,6 @@ #include <stddef.h> #include "base/move.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { diff --git a/mojo/public/cpp/system/tests/macros_unittest.cc b/mojo/public/cpp/bindings/tests/macros_unittest.cc index 30d7c84..73d6a80 100644 --- a/mojo/public/cpp/system/tests/macros_unittest.cc +++ b/mojo/public/cpp/bindings/tests/macros_unittest.cc @@ -10,7 +10,7 @@ // TODO(vtl): Fix no-compile tests (which are all disabled; crbug.com/105388) // and write some "negative" tests. -#include "mojo/public/cpp/system/macros.h" +#include "mojo/public/cpp/bindings/lib/macros.h" #include <assert.h> #include <stdint.h> diff --git a/mojo/public/cpp/bindings/tests/router_unittest.cc b/mojo/public/cpp/bindings/tests/router_unittest.cc index 1f7160e..804e497 100644 --- a/mojo/public/cpp/bindings/tests/router_unittest.cc +++ b/mojo/public/cpp/bindings/tests/router_unittest.cc @@ -11,7 +11,6 @@ #include "mojo/message_pump/message_pump_mojo.h" #include "mojo/public/cpp/bindings/tests/message_queue.h" #include "mojo/public/cpp/bindings/tests/router_test_util.h" -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/public/cpp/bindings/tests/validation_unittest.cc b/mojo/public/cpp/bindings/tests/validation_unittest.cc index 252a31a..d234d66 100644 --- a/mojo/public/cpp/bindings/tests/validation_unittest.cc +++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc @@ -175,7 +175,7 @@ void RunValidationTests(const std::string& prefix, base::RunLoop run_loop; mojo::internal::ValidationErrorObserverForTesting observer( run_loop.QuitClosure()); - mojo_ignore_result(test_message_receiver->Accept(&message)); + ignore_result(test_message_receiver->Accept(&message)); if (expected != "PASS") // Observer only gets called on errors. run_loop.Run(); if (observer.last_error() == mojo::internal::VALIDATION_ERROR_NONE) diff --git a/mojo/public/cpp/bindings/tests/versioning_apptest.cc b/mojo/public/cpp/bindings/tests/versioning_apptest.cc index e3d63e1..6eb57cf 100644 --- a/mojo/public/cpp/bindings/tests/versioning_apptest.cc +++ b/mojo/public/cpp/bindings/tests/versioning_apptest.cc @@ -5,7 +5,7 @@ #include <stddef.h> #include <stdint.h> -#include "mojo/public/cpp/system/macros.h" +#include "base/macros.h" #include "mojo/public/interfaces/bindings/tests/versioning_test_client.mojom.h" #include "mojo/shell/public/cpp/application_test_base.h" #include "mojo/shell/public/cpp/connector.h" diff --git a/mojo/public/cpp/bindings/tests/versioning_test_service.cc b/mojo/public/cpp/bindings/tests/versioning_test_service.cc index bf3ca87..30296d0 100644 --- a/mojo/public/cpp/bindings/tests/versioning_test_service.cc +++ b/mojo/public/cpp/bindings/tests/versioning_test_service.cc @@ -7,9 +7,9 @@ #include <map> #include <utility> +#include "base/macros.h" #include "mojo/public/c/system/main.h" #include "mojo/public/cpp/bindings/strong_binding.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/public/interfaces/bindings/tests/versioning_test_service.mojom.h" #include "mojo/shell/public/cpp/application_runner.h" #include "mojo/shell/public/cpp/interface_factory.h" diff --git a/mojo/public/cpp/system/BUILD.gn b/mojo/public/cpp/system/BUILD.gn index dc2d28c..0aef01d 100644 --- a/mojo/public/cpp/system/BUILD.gn +++ b/mojo/public/cpp/system/BUILD.gn @@ -9,7 +9,6 @@ source_set("system") { "data_pipe.h", "functions.h", "handle.h", - "macros.h", "message_pipe.h", "watcher.cc", "watcher.h", diff --git a/mojo/public/cpp/system/buffer.h b/mojo/public/cpp/system/buffer.h index 607aea1e1..a2d524e 100644 --- a/mojo/public/cpp/system/buffer.h +++ b/mojo/public/cpp/system/buffer.h @@ -18,7 +18,6 @@ #include "base/logging.h" #include "mojo/public/c/system/buffer.h" #include "mojo/public/cpp/system/handle.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { diff --git a/mojo/public/cpp/system/core.h b/mojo/public/cpp/system/core.h index b08a5a6..f1d18d9 100644 --- a/mojo/public/cpp/system/core.h +++ b/mojo/public/cpp/system/core.h @@ -9,7 +9,6 @@ #include "mojo/public/cpp/system/data_pipe.h" #include "mojo/public/cpp/system/functions.h" #include "mojo/public/cpp/system/handle.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/public/cpp/system/message_pipe.h" #endif // MOJO_PUBLIC_CPP_SYSTEM_CORE_H_ diff --git a/mojo/public/cpp/system/data_pipe.h b/mojo/public/cpp/system/data_pipe.h index c5f9707..0dbc3c7 100644 --- a/mojo/public/cpp/system/data_pipe.h +++ b/mojo/public/cpp/system/data_pipe.h @@ -18,7 +18,6 @@ #include "base/logging.h" #include "mojo/public/c/system/data_pipe.h" #include "mojo/public/cpp/system/handle.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { diff --git a/mojo/public/cpp/system/handle.h b/mojo/public/cpp/system/handle.h index 4df86af..a0c162a 100644 --- a/mojo/public/cpp/system/handle.h +++ b/mojo/public/cpp/system/handle.h @@ -14,7 +14,6 @@ #include "base/move.h" #include "mojo/public/c/system/functions.h" #include "mojo/public/c/system/types.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { diff --git a/mojo/public/cpp/system/message_pipe.h b/mojo/public/cpp/system/message_pipe.h index fab23e4..94818e8 100644 --- a/mojo/public/cpp/system/message_pipe.h +++ b/mojo/public/cpp/system/message_pipe.h @@ -18,7 +18,6 @@ #include "base/logging.h" #include "mojo/public/c/system/message_pipe.h" #include "mojo/public/cpp/system/handle.h" -#include "mojo/public/cpp/system/macros.h" namespace mojo { diff --git a/mojo/public/cpp/system/tests/BUILD.gn b/mojo/public/cpp/system/tests/BUILD.gn index b6664af..8f98b92 100644 --- a/mojo/public/cpp/system/tests/BUILD.gn +++ b/mojo/public/cpp/system/tests/BUILD.gn @@ -7,7 +7,6 @@ source_set("tests") { sources = [ "core_unittest.cc", - "macros_unittest.cc", "watcher_unittest.cc", ] diff --git a/mojo/public/cpp/system/tests/core_unittest.cc b/mojo/public/cpp/system/tests/core_unittest.cc index 927c554..7a52ab5 100644 --- a/mojo/public/cpp/system/tests/core_unittest.cc +++ b/mojo/public/cpp/system/tests/core_unittest.cc @@ -13,7 +13,6 @@ #include <map> #include <utility> -#include "mojo/public/cpp/system/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace mojo { diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl index b22f8530..8c9c0fb 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl @@ -28,6 +28,7 @@ #include "base/trace_event/trace_event.h" #include "mojo/public/cpp/bindings/lib/bindings_serialization.h" #include "mojo/public/cpp/bindings/lib/bounds_checker.h" +#include "mojo/public/cpp/bindings/lib/macros.h" #include "mojo/public/cpp/bindings/lib/map_data_internal.h" #include "mojo/public/cpp/bindings/lib/message_builder.h" #include "mojo/public/cpp/bindings/lib/validate_params.h" diff --git a/mojo/shell/public/cpp/application_test_base.h b/mojo/shell/public/cpp/application_test_base.h index 4358c6f..54d073a 100644 --- a/mojo/shell/public/cpp/application_test_base.h +++ b/mojo/shell/public/cpp/application_test_base.h @@ -5,10 +5,10 @@ #ifndef MOJO_SHELL_PUBLIC_CPP_APPLICATION_TEST_BASE_H_ #define MOJO_SHELL_PUBLIC_CPP_APPLICATION_TEST_BASE_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "mojo/public/cpp/bindings/array.h" #include "mojo/public/cpp/bindings/string.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/shell/public/cpp/connector.h" #include "mojo/shell/public/cpp/shell_client.h" #include "mojo/shell/public/cpp/shell_connection.h" diff --git a/mojo/shell/public/cpp/shell_client.h b/mojo/shell/public/cpp/shell_client.h index 5f60316..d6fca12 100644 --- a/mojo/shell/public/cpp/shell_client.h +++ b/mojo/shell/public/cpp/shell_client.h @@ -8,7 +8,7 @@ #include <stdint.h> #include <string> -#include "mojo/public/cpp/system/macros.h" +#include "base/macros.h" #include "mojo/shell/public/cpp/connection.h" #include "mojo/shell/public/cpp/identity.h" diff --git a/mojo/shell/public/cpp/shell_test.h b/mojo/shell/public/cpp/shell_test.h index c3ed59a..9157b676 100644 --- a/mojo/shell/public/cpp/shell_test.h +++ b/mojo/shell/public/cpp/shell_test.h @@ -5,8 +5,8 @@ #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ #define MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" -#include "mojo/public/cpp/system/macros.h" #include "mojo/shell/public/cpp/connector.h" #include "mojo/shell/public/cpp/shell_client.h" #include "mojo/shell/public/cpp/shell_connection.h" |