move helper function into namespace

pull/17019/head
yang-g 6 years ago
parent 83d74bf6fc
commit a35f55fd70
  1. 6
      src/core/lib/security/credentials/google_default/google_default_credentials.cc
  2. 6
      src/core/lib/security/credentials/google_default/google_default_credentials.h
  3. 1
      test/core/security/credentials_test.cc

@ -255,9 +255,6 @@ void set_gce_tenancy_checker_for_testing(grpc_gce_tenancy_checker checker) {
g_gce_tenancy_checker = checker;
}
} // namespace internal
} // namespace grpc_core
void grpc_flush_cached_google_default_credentials(void) {
grpc_core::ExecCtx exec_ctx;
gpr_once_init(&g_once, init_default_credentials);
@ -266,6 +263,9 @@ void grpc_flush_cached_google_default_credentials(void) {
gpr_mu_unlock(&g_state_mu);
}
} // namespace internal
} // namespace grpc_core
/* -- Well known credentials path. -- */
static grpc_well_known_credentials_path_getter creds_path_getter = nullptr;

@ -45,9 +45,6 @@ typedef struct {
grpc_channel_credentials* ssl_creds;
} grpc_google_default_channel_credentials;
// TEST-ONLY. Reset the internal global state.
void grpc_flush_cached_google_default_credentials(void);
namespace grpc_core {
namespace internal {
@ -55,6 +52,9 @@ typedef bool (*grpc_gce_tenancy_checker)(void);
void set_gce_tenancy_checker_for_testing(grpc_gce_tenancy_checker checker);
// TEST-ONLY. Reset the internal global state.
void grpc_flush_cached_google_default_credentials(void);
} // namespace internal
} // namespace grpc_core

@ -43,6 +43,7 @@
#include "src/core/lib/security/transport/auth_filters.h"
#include "test/core/util/test_config.h"
using grpc_core::internal::grpc_flush_cached_google_default_credentials;
using grpc_core::internal::set_gce_tenancy_checker_for_testing;
/* -- Mock channel credentials. -- */

Loading…
Cancel
Save