clang-format

pull/8602/head
Vijay Pai 9 years ago
parent c0b2acb1a0
commit 713c7b87e1
  1. 6
      include/grpc++/channel.h
  2. 3
      include/grpc++/impl/codegen/async_unary_call.h
  3. 13
      include/grpc++/impl/codegen/core_codegen.h
  4. 3
      include/grpc++/server.h
  5. 25
      src/compiler/cpp_generator.cc
  6. 4
      src/cpp/client/cronet_credentials.cc
  7. 4
      src/cpp/client/insecure_credentials.cc
  8. 3
      src/cpp/common/secure_auth_context.h
  9. 3
      src/cpp/server/insecure_server_credentials.cc
  10. 3
      src/cpp/server/secure_server_credentials.h
  11. 4
      test/cpp/end2end/async_end2end_test.cc
  12. 9
      test/cpp/end2end/client_crash_test_server.cc
  13. 8
      test/cpp/end2end/end2end_test.cc
  14. 18
      test/cpp/end2end/hybrid_end2end_test.cc
  15. 12
      test/cpp/end2end/mock_test.cc
  16. 4
      test/cpp/end2end/server_builder_plugin_test.cc
  17. 9
      test/cpp/end2end/server_crash_test.cc
  18. 6
      test/cpp/end2end/streaming_throughput_test.cc
  19. 6
      test/cpp/end2end/test_service_impl.h
  20. 6
      test/cpp/end2end/thread_stress_test.cc
  21. 3
      test/cpp/qps/client_async.cc
  22. 12
      test/cpp/qps/qps_worker.cc
  23. 8
      test/cpp/qps/server_async.cc
  24. 3
      test/cpp/thread_manager/thread_manager_test.cc
  25. 3
      test/cpp/util/grpc_tool_test.cc
  26. 3
      test/cpp/util/proto_reflection_descriptor_database.h
  27. 6
      test/cpp/util/test_credentials_provider.cc

@ -47,9 +47,9 @@ struct grpc_channel;
namespace grpc { namespace grpc {
/// Channels represent a connection to an endpoint. Created by \a CreateChannel. /// Channels represent a connection to an endpoint. Created by \a CreateChannel.
class Channel final : public ChannelInterface, class Channel final : public ChannelInterface,
public CallHook, public CallHook,
public std::enable_shared_from_this<Channel>, public std::enable_shared_from_this<Channel>,
private GrpcLibraryCodegen { private GrpcLibraryCodegen {
public: public:
~Channel(); ~Channel();

@ -113,8 +113,7 @@ class ClientAsyncResponseReader final
}; };
template <class W> template <class W>
class ServerAsyncResponseWriter final class ServerAsyncResponseWriter final : public ServerAsyncStreamingInterface {
: public ServerAsyncStreamingInterface {
public: public:
explicit ServerAsyncResponseWriter(ServerContext* ctx) explicit ServerAsyncResponseWriter(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {} : call_(nullptr, nullptr, nullptr), ctx_(ctx) {}

@ -45,8 +45,7 @@ namespace grpc {
/// Implementation of the core codegen interface. /// Implementation of the core codegen interface.
class CoreCodegen : public CoreCodegenInterface { class CoreCodegen : public CoreCodegenInterface {
private: private:
grpc_completion_queue* grpc_completion_queue_create(void* reserved) grpc_completion_queue* grpc_completion_queue_create(void* reserved) override;
override;
void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; void grpc_completion_queue_destroy(grpc_completion_queue* cq) override;
grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag,
gpr_timespec deadline, gpr_timespec deadline,
@ -61,8 +60,7 @@ class CoreCodegen : public CoreCodegenInterface {
void gpr_mu_unlock(gpr_mu* mu) override; void gpr_mu_unlock(gpr_mu* mu) override;
void gpr_cv_init(gpr_cv* cv) override; void gpr_cv_init(gpr_cv* cv) override;
void gpr_cv_destroy(gpr_cv* cv) override; void gpr_cv_destroy(gpr_cv* cv) override;
int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu, int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu, gpr_timespec abs_deadline) override;
gpr_timespec abs_deadline) override;
void gpr_cv_signal(gpr_cv* cv) override; void gpr_cv_signal(gpr_cv* cv) override;
void gpr_cv_broadcast(gpr_cv* cv) override; void gpr_cv_broadcast(gpr_cv* cv) override;
@ -70,8 +68,8 @@ class CoreCodegen : public CoreCodegenInterface {
int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
grpc_byte_buffer* buffer) override; grpc_byte_buffer* buffer) override;
void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader* reader) void grpc_byte_buffer_reader_destroy(
override; grpc_byte_buffer_reader* reader) override;
int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader,
gpr_slice* slice) override; gpr_slice* slice) override;
@ -81,8 +79,7 @@ class CoreCodegen : public CoreCodegenInterface {
gpr_slice gpr_slice_malloc(size_t length) override; gpr_slice gpr_slice_malloc(size_t length) override;
void gpr_slice_unref(gpr_slice slice) override; void gpr_slice_unref(gpr_slice slice) override;
gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) override; gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) override;
void gpr_slice_buffer_add(gpr_slice_buffer* sb, void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) override;
gpr_slice slice) override;
void gpr_slice_buffer_pop(gpr_slice_buffer* sb) override; void gpr_slice_buffer_pop(gpr_slice_buffer* sb) override;
void grpc_metadata_array_init(grpc_metadata_array* array) override; void grpc_metadata_array_init(grpc_metadata_array* array) override;

@ -143,8 +143,7 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
/// Register a service. This call does not take ownership of the service. /// Register a service. This call does not take ownership of the service.
/// The service must exist for the lifetime of the Server instance. /// The service must exist for the lifetime of the Server instance.
bool RegisterService(const grpc::string* host, bool RegisterService(const grpc::string* host, Service* service) override;
Service* service) override;
/// Register a generic service. This call does not take ownership of the /// Register a generic service. This call does not take ownership of the
/// service. The service must exist for the lifetime of the Server instance. /// service. The service must exist for the lifetime of the Server instance.

@ -423,11 +423,10 @@ void PrintHeaderClientMethod(Printer *printer, const Method *method,
"::grpc::ClientWriter< $Request$>* $Method$Raw(" "::grpc::ClientWriter< $Request$>* $Method$Raw("
"::grpc::ClientContext* context, $Response$* response) " "::grpc::ClientContext* context, $Response$* response) "
"override;\n"); "override;\n");
printer->Print( printer->Print(*vars,
*vars, "::grpc::ClientAsyncWriter< $Request$>* Async$Method$Raw("
"::grpc::ClientAsyncWriter< $Request$>* Async$Method$Raw(" "::grpc::ClientContext* context, $Response$* response, "
"::grpc::ClientContext* context, $Response$* response, " "::grpc::CompletionQueue* cq, void* tag) override;\n");
"::grpc::CompletionQueue* cq, void* tag) override;\n");
} else if (method->ServerOnlyStreaming()) { } else if (method->ServerOnlyStreaming()) {
printer->Print(*vars, printer->Print(*vars,
"::grpc::ClientReader< $Response$>* $Method$Raw(" "::grpc::ClientReader< $Response$>* $Method$Raw("
@ -439,15 +438,13 @@ void PrintHeaderClientMethod(Printer *printer, const Method *method,
"::grpc::ClientContext* context, const $Request$& request, " "::grpc::ClientContext* context, const $Request$& request, "
"::grpc::CompletionQueue* cq, void* tag) override;\n"); "::grpc::CompletionQueue* cq, void* tag) override;\n");
} else if (method->BidiStreaming()) { } else if (method->BidiStreaming()) {
printer->Print( printer->Print(*vars,
*vars, "::grpc::ClientReaderWriter< $Request$, $Response$>* "
"::grpc::ClientReaderWriter< $Request$, $Response$>* " "$Method$Raw(::grpc::ClientContext* context) override;\n");
"$Method$Raw(::grpc::ClientContext* context) override;\n"); printer->Print(*vars,
printer->Print( "::grpc::ClientAsyncReaderWriter< $Request$, $Response$>* "
*vars, "Async$Method$Raw(::grpc::ClientContext* context, "
"::grpc::ClientAsyncReaderWriter< $Request$, $Response$>* " "::grpc::CompletionQueue* cq, void* tag) override;\n");
"Async$Method$Raw(::grpc::ClientContext* context, "
"::grpc::CompletionQueue* cq, void* tag) override;\n");
} }
} }
} }

@ -53,9 +53,7 @@ class CronetChannelCredentialsImpl final : public ChannelCredentials {
&channel_args, nullptr)); &channel_args, nullptr));
} }
SecureChannelCredentials* AsSecureCredentials() override { SecureChannelCredentials* AsSecureCredentials() override { return nullptr; }
return nullptr;
}
private: private:
void* engine_; void* engine_;

@ -54,9 +54,7 @@ class InsecureChannelCredentialsImpl final : public ChannelCredentials {
grpc_insecure_channel_create(target.c_str(), &channel_args, nullptr)); grpc_insecure_channel_create(target.c_str(), &channel_args, nullptr));
} }
SecureChannelCredentials* AsSecureCredentials() override { SecureChannelCredentials* AsSecureCredentials() override { return nullptr; }
return nullptr;
}
}; };
} // namespace } // namespace

@ -62,8 +62,7 @@ class SecureAuthContext final : public AuthContext {
void AddProperty(const grpc::string& key, void AddProperty(const grpc::string& key,
const grpc::string_ref& value) override; const grpc::string_ref& value) override;
virtual bool SetPeerIdentityPropertyName(const grpc::string& name) virtual bool SetPeerIdentityPropertyName(const grpc::string& name) override;
override;
private: private:
grpc_auth_context* ctx_; grpc_auth_context* ctx_;

@ -40,8 +40,7 @@ namespace grpc {
namespace { namespace {
class InsecureServerCredentialsImpl final : public ServerCredentials { class InsecureServerCredentialsImpl final : public ServerCredentials {
public: public:
int AddPortToServer(const grpc::string& addr, int AddPortToServer(const grpc::string& addr, grpc_server* server) override {
grpc_server* server) override {
return grpc_server_add_insecure_http2_port(server, addr.c_str()); return grpc_server_add_insecure_http2_port(server, addr.c_str());
} }
void SetAuthMetadataProcessor( void SetAuthMetadataProcessor(

@ -72,8 +72,7 @@ class SecureServerCredentials final : public ServerCredentials {
grpc_server_credentials_release(creds_); grpc_server_credentials_release(creds_);
} }
int AddPortToServer(const grpc::string& addr, int AddPortToServer(const grpc::string& addr, grpc_server* server) override;
grpc_server* server) override;
void SetAuthMetadataProcessor( void SetAuthMetadataProcessor(
const std::shared_ptr<AuthMetadataProcessor>& processor) override; const std::shared_ptr<AuthMetadataProcessor>& processor) override;

@ -213,8 +213,8 @@ class ServerBuilderSyncPluginDisabler : public ::grpc::ServerBuilderOption {
public: public:
void UpdateArguments(ChannelArguments* arg) override {} void UpdateArguments(ChannelArguments* arg) override {}
void UpdatePlugins(std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) void UpdatePlugins(
override { std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) override {
plugins->erase(std::remove_if(plugins->begin(), plugins->end(), plugins->erase(std::remove_if(plugins->begin(), plugins->end(),
plugin_has_sync_methods), plugin_has_sync_methods),
plugins->end()); plugins->end());

@ -58,11 +58,10 @@ using namespace gflags;
namespace grpc { namespace grpc {
namespace testing { namespace testing {
class ServiceImpl final class ServiceImpl final : public ::grpc::testing::EchoTestService::Service {
: public ::grpc::testing::EchoTestService::Service { Status BidiStream(
Status BidiStream(ServerContext* context, ServerContext* context,
ServerReaderWriter<EchoResponse, EchoRequest>* stream) ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
override {
EchoRequest request; EchoRequest request;
EchoResponse response; EchoResponse response;
while (stream->Read(&request)) { while (stream->Read(&request)) {

@ -94,10 +94,10 @@ class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin {
bool IsBlocking() const override { return is_blocking_; } bool IsBlocking() const override { return is_blocking_; }
Status GetMetadata(grpc::string_ref service_url, grpc::string_ref method_name, Status GetMetadata(
const grpc::AuthContext& channel_auth_context, grpc::string_ref service_url, grpc::string_ref method_name,
std::multimap<grpc::string, grpc::string>* metadata) const grpc::AuthContext& channel_auth_context,
override { std::multimap<grpc::string, grpc::string>* metadata) override {
EXPECT_GT(service_url.length(), 0UL); EXPECT_GT(service_url.length(), 0UL);
EXPECT_GT(method_name.length(), 0UL); EXPECT_GT(method_name.length(), 0UL);
EXPECT_TRUE(channel_auth_context.IsPeerAuthenticated()); EXPECT_TRUE(channel_auth_context.IsPeerAuthenticated());

@ -449,9 +449,9 @@ class StreamedUnaryDupPkg
: public duplicate::EchoTestService::WithStreamedUnaryMethod_Echo< : public duplicate::EchoTestService::WithStreamedUnaryMethod_Echo<
TestServiceImplDupPkg> { TestServiceImplDupPkg> {
public: public:
Status StreamedEcho(ServerContext* context, Status StreamedEcho(
ServerUnaryStreamer<EchoRequest, EchoResponse>* stream) ServerContext* context,
override { ServerUnaryStreamer<EchoRequest, EchoResponse>* stream) override {
EchoRequest req; EchoRequest req;
EchoResponse resp; EchoResponse resp;
uint32_t next_msg_sz; uint32_t next_msg_sz;
@ -487,9 +487,9 @@ TEST_F(HybridEnd2endTest,
class FullyStreamedUnaryDupPkg class FullyStreamedUnaryDupPkg
: public duplicate::EchoTestService::StreamedUnaryService { : public duplicate::EchoTestService::StreamedUnaryService {
public: public:
Status StreamedEcho(ServerContext* context, Status StreamedEcho(
ServerUnaryStreamer<EchoRequest, EchoResponse>* stream) ServerContext* context,
override { ServerUnaryStreamer<EchoRequest, EchoResponse>* stream) override {
EchoRequest req; EchoRequest req;
EchoResponse resp; EchoResponse resp;
uint32_t next_msg_sz; uint32_t next_msg_sz;
@ -605,9 +605,9 @@ TEST_F(HybridEnd2endTest,
// Add a second service that is fully server streamed // Add a second service that is fully server streamed
class FullyStreamedDupPkg : public duplicate::EchoTestService::StreamedService { class FullyStreamedDupPkg : public duplicate::EchoTestService::StreamedService {
public: public:
Status StreamedEcho(ServerContext* context, Status StreamedEcho(
ServerUnaryStreamer<EchoRequest, EchoResponse>* stream) ServerContext* context,
override { ServerUnaryStreamer<EchoRequest, EchoResponse>* stream) override {
EchoRequest req; EchoRequest req;
EchoResponse resp; EchoResponse resp;
uint32_t next_msg_sz; uint32_t next_msg_sz;

@ -61,8 +61,7 @@ namespace testing {
namespace { namespace {
template <class W, class R> template <class W, class R>
class MockClientReaderWriter final class MockClientReaderWriter final : public ClientReaderWriterInterface<W, R> {
: public ClientReaderWriterInterface<W, R> {
public: public:
void WaitForInitialMetadata() override {} void WaitForInitialMetadata() override {}
bool NextMessageSize(uint32_t* sz) override { bool NextMessageSize(uint32_t* sz) override {
@ -90,8 +89,7 @@ class MockClientReaderWriter<EchoRequest, EchoResponse> final
return true; return true;
} }
bool Write(const EchoRequest& msg, bool Write(const EchoRequest& msg, const WriteOptions& options) override {
const WriteOptions& options) override {
gpr_log(GPR_INFO, "mock recv msg %s", msg.message().c_str()); gpr_log(GPR_INFO, "mock recv msg %s", msg.message().c_str());
last_message_ = msg.message(); last_message_ = msg.message();
return true; return true;
@ -221,9 +219,9 @@ class TestServiceImpl : public EchoTestService::Service {
return Status::OK; return Status::OK;
} }
Status BidiStream(ServerContext* context, Status BidiStream(
ServerReaderWriter<EchoResponse, EchoRequest>* stream) ServerContext* context,
override { ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
EchoRequest request; EchoRequest request;
EchoResponse response; EchoResponse response;
while (stream->Read(&request)) { while (stream->Read(&request)) {

@ -114,8 +114,8 @@ class InsertPluginServerBuilderOption : public ServerBuilderOption {
void UpdateArguments(ChannelArguments* arg) override {} void UpdateArguments(ChannelArguments* arg) override {}
void UpdatePlugins(std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) void UpdatePlugins(
override { std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) override {
plugins->clear(); plugins->clear();
std::unique_ptr<TestServerBuilderPlugin> plugin( std::unique_ptr<TestServerBuilderPlugin> plugin(

@ -60,14 +60,13 @@ namespace testing {
namespace { namespace {
class ServiceImpl final class ServiceImpl final : public ::grpc::testing::EchoTestService::Service {
: public ::grpc::testing::EchoTestService::Service {
public: public:
ServiceImpl() : bidi_stream_count_(0), response_stream_count_(0) {} ServiceImpl() : bidi_stream_count_(0), response_stream_count_(0) {}
Status BidiStream(ServerContext* context, Status BidiStream(
ServerReaderWriter<EchoResponse, EchoRequest>* stream) ServerContext* context,
override { ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
bidi_stream_count_++; bidi_stream_count_++;
EchoRequest request; EchoRequest request;
EchoResponse response; EchoResponse response;

@ -121,9 +121,9 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
} }
// Only implement the one method we will be calling for brevity. // Only implement the one method we will be calling for brevity.
Status BidiStream(ServerContext* context, Status BidiStream(
ServerReaderWriter<EchoResponse, EchoRequest>* stream) ServerContext* context,
override { ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
EchoRequest request; EchoRequest request;
gpr_atm should_exit; gpr_atm should_exit;
gpr_atm_rel_store(&should_exit, static_cast<gpr_atm>(0)); gpr_atm_rel_store(&should_exit, static_cast<gpr_atm>(0));

@ -74,9 +74,9 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
Status ResponseStream(ServerContext* context, const EchoRequest* request, Status ResponseStream(ServerContext* context, const EchoRequest* request,
ServerWriter<EchoResponse>* writer) override; ServerWriter<EchoResponse>* writer) override;
Status BidiStream(ServerContext* context, Status BidiStream(
ServerReaderWriter<EchoResponse, EchoRequest>* stream) ServerContext* context,
override; ServerReaderWriter<EchoResponse, EchoRequest>* stream) override;
bool signal_client() { bool signal_client() {
std::unique_lock<std::mutex> lock(mu_); std::unique_lock<std::mutex> lock(mu_);

@ -142,9 +142,9 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
return Status::OK; return Status::OK;
} }
Status BidiStream(ServerContext* context, Status BidiStream(
ServerReaderWriter<EchoResponse, EchoRequest>* stream) ServerContext* context,
override { ServerReaderWriter<EchoResponse, EchoRequest>* stream) override {
EchoRequest request; EchoRequest request;
EchoResponse response; EchoResponse response;
while (stream->Read(&request)) { while (stream->Read(&request)) {

@ -228,8 +228,7 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
this->EndThreads(); // this needed for resolution this->EndThreads(); // this needed for resolution
} }
bool ThreadFunc(HistogramEntry* entry, bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) override final {
size_t thread_idx) override final {
void* got_tag; void* got_tag;
bool ok; bool ok;

@ -118,9 +118,9 @@ class WorkerServiceImpl final : public WorkerService::Service {
WorkerServiceImpl(int server_port, QpsWorker* worker) WorkerServiceImpl(int server_port, QpsWorker* worker)
: acquired_(false), server_port_(server_port), worker_(worker) {} : acquired_(false), server_port_(server_port), worker_(worker) {}
Status RunClient(ServerContext* ctx, Status RunClient(
ServerReaderWriter<ClientStatus, ClientArgs>* stream) ServerContext* ctx,
override { ServerReaderWriter<ClientStatus, ClientArgs>* stream) override {
InstanceGuard g(this); InstanceGuard g(this);
if (!g.Acquired()) { if (!g.Acquired()) {
return Status(StatusCode::RESOURCE_EXHAUSTED, "Client worker busy"); return Status(StatusCode::RESOURCE_EXHAUSTED, "Client worker busy");
@ -132,9 +132,9 @@ class WorkerServiceImpl final : public WorkerService::Service {
return ret; return ret;
} }
Status RunServer(ServerContext* ctx, Status RunServer(
ServerReaderWriter<ServerStatus, ServerArgs>* stream) ServerContext* ctx,
override { ServerReaderWriter<ServerStatus, ServerArgs>* stream) override {
InstanceGuard g(this); InstanceGuard g(this);
if (!g.Acquired()) { if (!g.Acquired()) {
return Status(StatusCode::RESOURCE_EXHAUSTED, "Server worker busy"); return Status(StatusCode::RESOURCE_EXHAUSTED, "Server worker busy");

@ -214,9 +214,7 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
AsyncQpsServerTest::tag(this)); AsyncQpsServerTest::tag(this));
} }
~ServerRpcContextUnaryImpl() override {} ~ServerRpcContextUnaryImpl() override {}
bool RunNextState(bool ok) override { bool RunNextState(bool ok) override { return (this->*next_state_)(ok); }
return (this->*next_state_)(ok);
}
void Reset() override { void Reset() override {
srv_ctx_.reset(new ServerContextType); srv_ctx_.reset(new ServerContextType);
req_ = RequestType(); req_ = RequestType();
@ -274,9 +272,7 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
request_method_(srv_ctx_.get(), &stream_, AsyncQpsServerTest::tag(this)); request_method_(srv_ctx_.get(), &stream_, AsyncQpsServerTest::tag(this));
} }
~ServerRpcContextStreamingImpl() override {} ~ServerRpcContextStreamingImpl() override {}
bool RunNextState(bool ok) override { bool RunNextState(bool ok) override { return (this->*next_state_)(ok); }
return (this->*next_state_)(ok);
}
void Reset() override { void Reset() override {
srv_ctx_.reset(new ServerContextType); srv_ctx_.reset(new ServerContextType);
req_ = RequestType(); req_ = RequestType();

@ -51,8 +51,7 @@ class ThreadManagerTest final : public grpc::ThreadManager {
num_poll_for_work_(0), num_poll_for_work_(0),
num_work_found_(0) {} num_work_found_(0) {}
grpc::ThreadManager::WorkStatus PollForWork(void **tag, grpc::ThreadManager::WorkStatus PollForWork(void **tag, bool *ok) override;
bool *ok) override;
void DoWork(void *tag, bool ok) override; void DoWork(void *tag, bool ok) override;
void PerformTest(); void PerformTest();

@ -95,8 +95,7 @@ namespace {
class TestCliCredentials final : public grpc::testing::CliCredentials { class TestCliCredentials final : public grpc::testing::CliCredentials {
public: public:
std::shared_ptr<grpc::ChannelCredentials> GetCredentials() const std::shared_ptr<grpc::ChannelCredentials> GetCredentials() const override {
override {
return InsecureChannelCredentials(); return InsecureChannelCredentials();
} }
const grpc::string GetCredentialUsage() const override { return ""; } const grpc::string GetCredentialUsage() const override { return ""; }

@ -68,8 +68,7 @@ class ProtoReflectionDescriptorDatabase : public protobuf::DescriptorDatabase {
// If found, fills in *output and returns true, otherwise returns false // If found, fills in *output and returns true, otherwise returns false
// and leaves *output undefined. // and leaves *output undefined.
bool FindFileContainingSymbol(const string& symbol_name, bool FindFileContainingSymbol(const string& symbol_name,
protobuf::FileDescriptorProto* output) protobuf::FileDescriptorProto* output) override;
override;
// Find the file which defines an extension extending the given message type // Find the file which defines an extension extending the given message type
// with the given field number. If found, fills in *output and returns true, // with the given field number. If found, fills in *output and returns true,

@ -66,9 +66,9 @@ class DefaultCredentialsProvider : public CredentialsProvider {
public: public:
~DefaultCredentialsProvider() override {} ~DefaultCredentialsProvider() override {}
void AddSecureType(const grpc::string& type, void AddSecureType(
std::unique_ptr<CredentialTypeProvider> type_provider) const grpc::string& type,
override { std::unique_ptr<CredentialTypeProvider> type_provider) override {
// This clobbers any existing entry for type, except the defaults, which // This clobbers any existing entry for type, except the defaults, which
// can't be clobbered. // can't be clobbered.
grpc::unique_lock<grpc::mutex> lock(mu_); grpc::unique_lock<grpc::mutex> lock(mu_);

Loading…
Cancel
Save