aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/client_channel/client_channel_plugin.cc
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2018-02-08 10:26:46 -0800
committerGravatar Mark D. Roth <roth@google.com>2018-02-08 10:26:46 -0800
commit209f644f047ccf8ab13b207ebb145dadc0d37a42 (patch)
tree60e67580c734d75a4761e2a0b300a1a976b226cb /src/core/ext/filters/client_channel/client_channel_plugin.cc
parent7bd5e18fea0201fed3edd74e3c3d7caf9040609c (diff)
Convert resolver API to C++.
Diffstat (limited to 'src/core/ext/filters/client_channel/client_channel_plugin.cc')
-rw-r--r--src/core/ext/filters/client_channel/client_channel_plugin.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/ext/filters/client_channel/client_channel_plugin.cc b/src/core/ext/filters/client_channel/client_channel_plugin.cc
index ea630d2917..d756d9cc05 100644
--- a/src/core/ext/filters/client_channel/client_channel_plugin.cc
+++ b/src/core/ext/filters/client_channel/client_channel_plugin.cc
@@ -49,14 +49,14 @@ static bool set_default_host_if_unset(grpc_channel_stack_builder* builder,
return true;
}
}
- char* default_authority = grpc_get_default_authority(
- grpc_channel_stack_builder_get_target(builder));
- if (default_authority != nullptr) {
+ grpc_core::UniquePtr<char> default_authority =
+ grpc_core::ResolverRegistry::GetDefaultAuthority(
+ grpc_channel_stack_builder_get_target(builder));
+ if (default_authority.get() != nullptr) {
grpc_arg arg = grpc_channel_arg_string_create(
- (char*)GRPC_ARG_DEFAULT_AUTHORITY, default_authority);
+ (char*)GRPC_ARG_DEFAULT_AUTHORITY, default_authority.get());
grpc_channel_args* new_args = grpc_channel_args_copy_and_add(args, &arg, 1);
grpc_channel_stack_builder_set_channel_arguments(builder, new_args);
- gpr_free(default_authority);
grpc_channel_args_destroy(new_args);
}
return true;
@@ -64,7 +64,7 @@ static bool set_default_host_if_unset(grpc_channel_stack_builder* builder,
void grpc_client_channel_init(void) {
grpc_lb_policy_registry_init();
- grpc_resolver_registry_init();
+ grpc_core::ResolverRegistry::Builder::InitRegistry();
grpc_retry_throttle_map_init();
grpc_proxy_mapper_registry_init();
grpc_register_http_proxy_mapper();
@@ -82,6 +82,6 @@ void grpc_client_channel_shutdown(void) {
grpc_channel_init_shutdown();
grpc_proxy_mapper_registry_shutdown();
grpc_retry_throttle_map_shutdown();
- grpc_resolver_registry_shutdown();
+ grpc_core::ResolverRegistry::Builder::ShutdownRegistry();
grpc_lb_policy_registry_shutdown();
}