Skip to content

Commit

Permalink
Merge pull request grpc#21211 from veblush/headers
Browse files Browse the repository at this point in the history
Clean up headers
  • Loading branch information
veblush authored Nov 15, 2019
2 parents 1c44efb + 6dd92a4 commit cbe12f8
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion include/grpcpp/channel_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#define GRPCPP_CHANNEL_IMPL_H

#include <memory>
#include <mutex>

#include <grpc/grpc.h>
#include <grpcpp/impl/call.h>
Expand Down
1 change: 0 additions & 1 deletion include/grpcpp/impl/codegen/client_context_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

#include <map>
#include <memory>
#include <mutex>
#include <string>

#include <grpc/impl/codegen/compression_types.h>
Expand Down
2 changes: 0 additions & 2 deletions include/grpcpp/server_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
#ifndef GRPCPP_SERVER_IMPL_H
#define GRPCPP_SERVER_IMPL_H

#include <condition_variable>
#include <list>
#include <memory>
#include <mutex>
#include <vector>

#include <grpc/compression.h>
Expand Down
1 change: 0 additions & 1 deletion src/cpp/client/channel_cc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include <cstring>
#include <memory>
#include <mutex>

#include <grpc/grpc.h>
#include <grpc/slice.h>
Expand Down
2 changes: 0 additions & 2 deletions src/cpp/server/dynamic_thread_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

#include "src/cpp/server/dynamic_thread_pool.h"

#include <mutex>

#include <grpc/support/log.h>
#include <grpcpp/impl/codegen/sync.h>

Expand Down
2 changes: 0 additions & 2 deletions src/cpp/server/dynamic_thread_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
#ifndef GRPC_INTERNAL_CPP_DYNAMIC_THREAD_POOL_H
#define GRPC_INTERNAL_CPP_DYNAMIC_THREAD_POOL_H

#include <condition_variable>
#include <list>
#include <memory>
#include <mutex>
#include <queue>

#include <grpcpp/support/config.h>
Expand Down
1 change: 0 additions & 1 deletion src/cpp/server/health/default_health_check_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

#include <memory>
#include <mutex>

#include <grpc/slice.h>
#include <grpc/support/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/cpp/server/health/default_health_check_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#define GRPC_INTERNAL_CPP_SERVER_DEFAULT_HEALTH_CHECK_SERVICE_H

#include <atomic>
#include <mutex>
#include <set>

#include <grpc/support/log.h>
Expand Down
1 change: 0 additions & 1 deletion src/cpp/server/server_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <grpcpp/impl/codegen/server_context_impl.h>

#include <algorithm>
#include <mutex>
#include <utility>

#include <grpc/compression.h>
Expand Down
1 change: 0 additions & 1 deletion src/cpp/thread_manager/thread_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "src/cpp/thread_manager/thread_manager.h"

#include <climits>
#include <mutex>

#include <grpc/support/log.h>
#include "src/core/lib/gprpp/thd.h"
Expand Down
2 changes: 0 additions & 2 deletions src/cpp/thread_manager/thread_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
#ifndef GRPC_INTERNAL_CPP_THREAD_MANAGER_H
#define GRPC_INTERNAL_CPP_THREAD_MANAGER_H

#include <condition_variable>
#include <list>
#include <memory>
#include <mutex>

#include <grpcpp/support/config.h>

Expand Down
1 change: 1 addition & 0 deletions test/cpp/end2end/message_allocator_end2end_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include <algorithm>
#include <condition_variable>
#include <functional>
#include <memory>
#include <mutex>
Expand Down
9 changes: 9 additions & 0 deletions tools/run_tests/sanity/cpp_banned_constructs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ egrep -Irn \
egrep -v include/grpcpp/impl/codegen/sync.h | \
diff - /dev/null

#
# Prevent the include of disallowed C++ headers.
#

egrep -Irn \
'^#include (<mutex>|<condition_variable>|<thread>|<ratio>|<filesystem>|<future>|<system_error>)' \
include/grpc include/grpcpp src/core src/cpp | \
egrep -v include/grpcpp/impl/codegen/sync.h | \
diff - /dev/null

0 comments on commit cbe12f8

Please sign in to comment.