Skip to content
Snippets Groups Projects
Commit f6b622c0 authored by Muxi Yan's avatar Muxi Yan
Browse files

Take grpc_workaround_list as parameter

parent 7aa3a7fb
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <grpc/compression.h> #include <grpc/compression.h>
#include <grpc/support/cpu.h> #include <grpc/support/cpu.h>
#include <grpc/support/useful.h> #include <grpc/support/useful.h>
#include <grpc/support/workaround_list.h>
struct grpc_resource_quota; struct grpc_resource_quota;
...@@ -187,7 +188,7 @@ class ServerBuilder { ...@@ -187,7 +188,7 @@ class ServerBuilder {
/// Enable a server workaround. Do not use unless you know what the workaround /// Enable a server workaround. Do not use unless you know what the workaround
/// does. For explanation and detailed descriptions of workarounds, see /// does. For explanation and detailed descriptions of workarounds, see
/// doc/workarounds.md. /// doc/workarounds.md.
ServerBuilder& EnableWorkaround(uint32_t id); ServerBuilder& EnableWorkaround(grpc_workaround_list id);
private: private:
friend class ::grpc::testing::ServerBuilderPluginTest; friend class ::grpc::testing::ServerBuilderPluginTest;
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <grpc/support/cpu.h> #include <grpc/support/cpu.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/useful.h> #include <grpc/support/useful.h>
#include <grpc/support/workaround_list.h>
#include "src/cpp/server/thread_pool_interface.h" #include "src/cpp/server/thread_pool_interface.h"
...@@ -359,7 +358,7 @@ void ServerBuilder::InternalAddPluginFactory( ...@@ -359,7 +358,7 @@ void ServerBuilder::InternalAddPluginFactory(
(*g_plugin_factory_list).push_back(CreatePlugin); (*g_plugin_factory_list).push_back(CreatePlugin);
} }
ServerBuilder& ServerBuilder::EnableWorkaround(uint32_t id) { ServerBuilder& ServerBuilder::EnableWorkaround(grpc_workaround_list id) {
switch (id) { switch (id) {
case GRPC_WORKAROUND_ID_CRONET_COMPRESSION: case GRPC_WORKAROUND_ID_CRONET_COMPRESSION:
return AddChannelArgument(GRPC_ARG_WORKAROUND_CRONET_COMPRESSION, 1); return AddChannelArgument(GRPC_ARG_WORKAROUND_CRONET_COMPRESSION, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment