Remove grpc_core::InlinedVector<> and grpc_core::Optional<>.
diff --git a/BUILD b/BUILD
index 7fcd4a5..91cd348 100644
--- a/BUILD
+++ b/BUILD
@@ -619,40 +619,12 @@
)
grpc_cc_library(
- name = "inlined_vector",
- external_deps = [
- "absl/container:inlined_vector",
- ],
- language = "c++",
- public_hdrs = [
- "src/core/lib/gprpp/inlined_vector.h",
- ],
- deps = [
- "gpr_base",
- ],
-)
-
-grpc_cc_library(
name = "debug_location",
language = "c++",
public_hdrs = ["src/core/lib/gprpp/debug_location.h"],
)
grpc_cc_library(
- name = "optional",
- external_deps = [
- "absl/types:optional",
- ],
- language = "c++",
- public_hdrs = [
- "src/core/lib/gprpp/optional.h",
- ],
- deps = [
- "gpr_base",
- ],
-)
-
-grpc_cc_library(
name = "orphanable",
language = "c++",
public_hdrs = ["src/core/lib/gprpp/orphanable.h"],
@@ -990,6 +962,8 @@
],
external_deps = [
"madler_zlib",
+ "absl/container:inlined_vector",
+ "absl/types:optional",
],
language = "c++",
public_hdrs = GRPC_PUBLIC_HDRS,
@@ -998,8 +972,6 @@
"gpr_base",
"grpc_codegen",
"grpc_trace",
- "inlined_vector",
- "optional",
"orphanable",
"ref_counted",
"ref_counted_ptr",
@@ -1107,6 +1079,9 @@
"src/core/ext/filters/client_channel/subchannel_interface.h",
"src/core/ext/filters/client_channel/subchannel_pool_interface.h",
],
+ external_deps = [
+ "absl/container:inlined_vector",
+ ],
language = "c++",
deps = [
"gpr_base",
@@ -1114,7 +1089,6 @@
"grpc_client_authority_filter",
"grpc_deadline_filter",
"grpc_health_upb",
- "inlined_vector",
"orphanable",
"ref_counted",
"ref_counted_ptr",
diff --git a/BUILD.gn b/BUILD.gn
index 6c3db9a..9ec801e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -570,8 +570,6 @@
"src/core/lib/debug/trace.h",
"src/core/lib/gprpp/atomic.h",
"src/core/lib/gprpp/debug_location.h",
- "src/core/lib/gprpp/inlined_vector.h",
- "src/core/lib/gprpp/optional.h",
"src/core/lib/gprpp/orphanable.h",
"src/core/lib/gprpp/ref_counted.h",
"src/core/lib/gprpp/ref_counted_ptr.h",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17ed31d..a82784d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -756,7 +756,6 @@
add_dependencies(buildtests_cxx mock_test)
add_dependencies(buildtests_cxx nonblocking_test)
add_dependencies(buildtests_cxx noop-benchmark)
- add_dependencies(buildtests_cxx optional_test)
add_dependencies(buildtests_cxx orphanable_test)
add_dependencies(buildtests_cxx out_of_bounds_bad_client_test)
add_dependencies(buildtests_cxx pid_controller_test)
@@ -12169,44 +12168,6 @@
endif()
if(gRPC_BUILD_TESTS)
-add_executable(optional_test
- test/core/gprpp/optional_test.cc
- third_party/googletest/googletest/src/gtest-all.cc
- third_party/googletest/googlemock/src/gmock-all.cc
-)
-
-target_include_directories(optional_test
- PRIVATE
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/include
- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
- ${_gRPC_SSL_INCLUDE_DIR}
- ${_gRPC_UPB_GENERATED_DIR}
- ${_gRPC_UPB_GRPC_GENERATED_DIR}
- ${_gRPC_UPB_INCLUDE_DIR}
- ${_gRPC_ZLIB_INCLUDE_DIR}
- third_party/googletest/googletest/include
- third_party/googletest/googletest
- third_party/googletest/googlemock/include
- third_party/googletest/googlemock
- ${_gRPC_PROTO_GENS_DIR}
-)
-
-target_link_libraries(optional_test
- ${_gRPC_PROTOBUF_LIBRARIES}
- ${_gRPC_ALLTARGETS_LIBRARIES}
- grpc_test_util
- grpc
- gpr
- address_sorting
- upb
- ${_gRPC_GFLAGS_LIBRARIES}
-)
-
-
-endif()
-if(gRPC_BUILD_TESTS)
-
add_executable(orphanable_test
test/core/gprpp/orphanable_test.cc
third_party/googletest/googletest/src/gtest-all.cc
diff --git a/Makefile b/Makefile
index 8837452..1ccc7e9 100644
--- a/Makefile
+++ b/Makefile
@@ -1251,7 +1251,6 @@
nanopb_fuzzer_serverlist_test: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test
nonblocking_test: $(BINDIR)/$(CONFIG)/nonblocking_test
noop-benchmark: $(BINDIR)/$(CONFIG)/noop-benchmark
-optional_test: $(BINDIR)/$(CONFIG)/optional_test
orphanable_test: $(BINDIR)/$(CONFIG)/orphanable_test
out_of_bounds_bad_client_test: $(BINDIR)/$(CONFIG)/out_of_bounds_bad_client_test
percent_decode_fuzzer: $(BINDIR)/$(CONFIG)/percent_decode_fuzzer
@@ -1616,7 +1615,6 @@
$(BINDIR)/$(CONFIG)/mock_test \
$(BINDIR)/$(CONFIG)/nonblocking_test \
$(BINDIR)/$(CONFIG)/noop-benchmark \
- $(BINDIR)/$(CONFIG)/optional_test \
$(BINDIR)/$(CONFIG)/orphanable_test \
$(BINDIR)/$(CONFIG)/out_of_bounds_bad_client_test \
$(BINDIR)/$(CONFIG)/pid_controller_test \
@@ -1774,7 +1772,6 @@
$(BINDIR)/$(CONFIG)/mock_test \
$(BINDIR)/$(CONFIG)/nonblocking_test \
$(BINDIR)/$(CONFIG)/noop-benchmark \
- $(BINDIR)/$(CONFIG)/optional_test \
$(BINDIR)/$(CONFIG)/orphanable_test \
$(BINDIR)/$(CONFIG)/out_of_bounds_bad_client_test \
$(BINDIR)/$(CONFIG)/pid_controller_test \
@@ -2276,8 +2273,6 @@
$(Q) $(BINDIR)/$(CONFIG)/nonblocking_test || ( echo test nonblocking_test failed ; exit 1 )
$(E) "[RUN] Testing noop-benchmark"
$(Q) $(BINDIR)/$(CONFIG)/noop-benchmark || ( echo test noop-benchmark failed ; exit 1 )
- $(E) "[RUN] Testing optional_test"
- $(Q) $(BINDIR)/$(CONFIG)/optional_test || ( echo test optional_test failed ; exit 1 )
$(E) "[RUN] Testing orphanable_test"
$(Q) $(BINDIR)/$(CONFIG)/orphanable_test || ( echo test orphanable_test failed ; exit 1 )
$(E) "[RUN] Testing out_of_bounds_bad_client_test"
@@ -16213,49 +16208,6 @@
endif
-OPTIONAL_TEST_SRC = \
- test/core/gprpp/optional_test.cc \
-
-OPTIONAL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(OPTIONAL_TEST_SRC))))
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure targets if you don't have OpenSSL.
-
-$(BINDIR)/$(CONFIG)/optional_test: openssl_dep_error
-
-else
-
-
-
-
-ifeq ($(NO_PROTOBUF),true)
-
-# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+.
-
-$(BINDIR)/$(CONFIG)/optional_test: protobuf_dep_error
-
-else
-
-$(BINDIR)/$(CONFIG)/optional_test: $(PROTOBUF_DEP) $(OPTIONAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) $(LDXX) $(LDFLAGS) $(OPTIONAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/optional_test
-
-endif
-
-endif
-
-$(OBJDIR)/$(CONFIG)/test/core/gprpp/optional_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a
-
-deps_optional_test: $(OPTIONAL_TEST_OBJS:.o=.dep)
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(OPTIONAL_TEST_OBJS:.o=.dep)
-endif
-endif
-
-
ORPHANABLE_TEST_SRC = \
test/core/gprpp/orphanable_test.cc \
diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml
index ca22663..d01ff14 100644
--- a/build_autogenerated.yaml
+++ b/build_autogenerated.yaml
@@ -548,8 +548,6 @@
- src/core/lib/debug/trace.h
- src/core/lib/gprpp/atomic.h
- src/core/lib/gprpp/debug_location.h
- - src/core/lib/gprpp/inlined_vector.h
- - src/core/lib/gprpp/optional.h
- src/core/lib/gprpp/orphanable.h
- src/core/lib/gprpp/ref_counted.h
- src/core/lib/gprpp/ref_counted_ptr.h
@@ -1451,8 +1449,6 @@
- src/core/lib/debug/trace.h
- src/core/lib/gprpp/atomic.h
- src/core/lib/gprpp/debug_location.h
- - src/core/lib/gprpp/inlined_vector.h
- - src/core/lib/gprpp/optional.h
- src/core/lib/gprpp/orphanable.h
- src/core/lib/gprpp/ref_counted.h
- src/core/lib/gprpp/ref_counted_ptr.h
@@ -6538,19 +6534,6 @@
- benchmark
benchmark: true
defaults: benchmark
-- name: optional_test
- gtest: true
- build: test
- language: c++
- headers: []
- src:
- - test/core/gprpp/optional_test.cc
- deps:
- - grpc_test_util
- - grpc
- - gpr
- - address_sorting
- - upb
- name: orphanable_test
gtest: true
build: test
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index 612090f..77e015d 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -418,12 +418,10 @@
'src/core/lib/gprpp/global_config_env.h',
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.h',
- 'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/mpscq.h',
- 'src/core/lib/gprpp/optional.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
@@ -870,12 +868,10 @@
'src/core/lib/gprpp/global_config_env.h',
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.h',
- 'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/mpscq.h',
- 'src/core/lib/gprpp/optional.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index b2595ac..a9c11d7 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -610,13 +610,11 @@
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.cc',
'src/core/lib/gprpp/host_port.h',
- 'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/mpscq.cc',
'src/core/lib/gprpp/mpscq.h',
- 'src/core/lib/gprpp/optional.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
@@ -1226,12 +1224,10 @@
'src/core/lib/gprpp/global_config_env.h',
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.h',
- 'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/mpscq.h',
- 'src/core/lib/gprpp/optional.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
diff --git a/grpc.gemspec b/grpc.gemspec
index c6faf70..7042206 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -532,13 +532,11 @@
s.files += %w( src/core/lib/gprpp/global_config_generic.h )
s.files += %w( src/core/lib/gprpp/host_port.cc )
s.files += %w( src/core/lib/gprpp/host_port.h )
- s.files += %w( src/core/lib/gprpp/inlined_vector.h )
s.files += %w( src/core/lib/gprpp/manual_constructor.h )
s.files += %w( src/core/lib/gprpp/map.h )
s.files += %w( src/core/lib/gprpp/memory.h )
s.files += %w( src/core/lib/gprpp/mpscq.cc )
s.files += %w( src/core/lib/gprpp/mpscq.h )
- s.files += %w( src/core/lib/gprpp/optional.h )
s.files += %w( src/core/lib/gprpp/orphanable.h )
s.files += %w( src/core/lib/gprpp/ref_counted.h )
s.files += %w( src/core/lib/gprpp/ref_counted_ptr.h )
diff --git a/package.xml b/package.xml
index adc8594..862ea4f 100644
--- a/package.xml
+++ b/package.xml
@@ -512,13 +512,11 @@
<file baseinstalldir="/" name="src/core/lib/gprpp/global_config_generic.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/host_port.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/host_port.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/gprpp/inlined_vector.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/manual_constructor.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/map.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/memory.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/mpscq.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/mpscq.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/gprpp/optional.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/orphanable.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/ref_counted.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/ref_counted_ptr.h" role="src" />
diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc
index aea8e00..a00bdd6 100644
--- a/src/core/ext/filters/client_channel/client_channel.cc
+++ b/src/core/ext/filters/client_channel/client_channel.cc
@@ -33,6 +33,9 @@
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
+#include "absl/container/inlined_vector.h"
+#include "absl/types/optional.h"
+
#include "src/core/ext/filters/client_channel/backend_metric.h"
#include "src/core/ext/filters/client_channel/backup_poller.h"
#include "src/core/ext/filters/client_channel/global_subchannel_pool.h"
@@ -52,7 +55,6 @@
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/sync.h"
@@ -827,7 +829,7 @@
// Note: We inline the cache for the first 3 send_message ops and use
// dynamic allocation after that. This number was essentially picked
// at random; it could be changed in the future to tune performance.
- InlinedVector<ByteStreamCache*, 3> send_messages_;
+ absl::InlinedVector<ByteStreamCache*, 3> send_messages_;
// send_trailing_metadata
bool seen_send_trailing_metadata_ = false;
grpc_linked_mdelem* send_trailing_metadata_storage_ = nullptr;
@@ -1726,7 +1728,7 @@
chand->received_first_resolver_result_ = true;
RefCountedPtr<ServerRetryThrottleData> retry_throttle_data;
if (parsed_service_config != nullptr) {
- Optional<internal::ClientChannelGlobalParsedConfig::RetryThrottling>
+ absl::optional<internal::ClientChannelGlobalParsedConfig::RetryThrottling>
retry_throttle_config = parsed_service_config->retry_throttling();
if (retry_throttle_config.has_value()) {
retry_throttle_data =
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index 9f30e76..5a7a384 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -64,6 +64,8 @@
#include <limits.h>
#include <string.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/byte_buffer_reader.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
@@ -555,7 +557,7 @@
lb_token[0] = '\0';
}
// Add address.
- InlinedVector<grpc_arg, 2> args_to_add;
+ absl::InlinedVector<grpc_arg, 2> args_to_add;
args_to_add.emplace_back(grpc_channel_arg_pointer_create(
const_cast<char*>(GRPC_ARG_GRPCLB_ADDRESS_LB_TOKEN), lb_token,
&lb_token_arg_vtable));
@@ -1273,7 +1275,7 @@
GRPC_ARG_CHANNELZ_CHANNEL_NODE,
};
// Channel args to add.
- InlinedVector<grpc_arg, 3> args_to_add;
+ absl::InlinedVector<grpc_arg, 3> args_to_add;
// The fake resolver response generator, which we use to inject
// address updates into the LB channel.
args_to_add.emplace_back(
@@ -1595,7 +1597,7 @@
grpc_channel_args* GrpcLb::CreateChildPolicyArgsLocked(
bool is_backend_from_grpclb_load_balancer) {
- InlinedVector<grpc_arg, 2> args_to_add;
+ absl::InlinedVector<grpc_arg, 2> args_to_add;
args_to_add.emplace_back(grpc_channel_arg_integer_create(
const_cast<char*>(GRPC_ARG_ADDRESS_IS_BACKEND_FROM_GRPCLB_LOAD_BALANCER),
is_backend_from_grpclb_load_balancer));
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
index 414f827..92cf17a 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
@@ -22,6 +22,8 @@
#include <string.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
@@ -71,8 +73,8 @@
grpc_channel_args* ModifyGrpclbBalancerChannelArgs(
const ServerAddressList& addresses, grpc_channel_args* args) {
- InlinedVector<const char*, 1> args_to_remove;
- InlinedVector<grpc_arg, 2> args_to_add;
+ absl::InlinedVector<const char*, 1> args_to_remove;
+ absl::InlinedVector<grpc_arg, 2> args_to_add;
// Add arg for targets info table.
RefCountedPtr<TargetAuthorityTable> target_authority_table =
CreateTargetAuthorityTable(addresses);
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
index 4b1c004..f6e9440 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
@@ -23,7 +23,8 @@
#include <grpc/support/atm.h>
-#include "src/core/lib/gprpp/inlined_vector.h"
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/sync.h"
@@ -40,7 +41,7 @@
: token(std::move(token)), count(count) {}
};
- typedef InlinedVector<DropTokenCount, 10> DroppedCallCounts;
+ typedef absl::InlinedVector<DropTokenCount, 10> DroppedCallCounts;
void AddCallStarted();
void AddCallFinished(bool finished_with_client_failed_to_send,
diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
index a5ab488..56b71b6 100644
--- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
@@ -160,7 +160,7 @@
RoundRobin* parent_;
size_t last_picked_index_;
- InlinedVector<RefCountedPtr<SubchannelInterface>, 10> subchannels_;
+ absl::InlinedVector<RefCountedPtr<SubchannelInterface>, 10> subchannels_;
};
void ShutdownLocked() override;
diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
index 0fa4871..93c5deb 100644
--- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
+++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
@@ -25,6 +25,8 @@
#include <grpc/support/alloc.h>
+#include "absl/container/inlined_vector.h"
+
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/filters/client_channel/server_address.h"
// TODO(roth): Should not need the include of subchannel.h here, since
@@ -33,7 +35,6 @@
#include "src/core/ext/filters/client_channel/subchannel_interface.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/debug/trace.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@@ -172,7 +173,7 @@
template <typename SubchannelListType, typename SubchannelDataType>
class SubchannelList : public InternallyRefCounted<SubchannelListType> {
public:
- typedef InlinedVector<SubchannelDataType, 10> SubchannelVector;
+ typedef absl::InlinedVector<SubchannelDataType, 10> SubchannelVector;
// The number of subchannels in the list.
size_t num_subchannels() const { return subchannels_.size(); }
@@ -370,7 +371,7 @@
GRPC_ARG_SERVICE_CONFIG};
// Create a subchannel for each address.
for (size_t i = 0; i < addresses.size(); i++) {
- InlinedVector<grpc_arg, 3> args_to_add;
+ absl::InlinedVector<grpc_arg, 3> args_to_add;
const size_t subchannel_address_arg_index = args_to_add.size();
args_to_add.emplace_back(
Subchannel::CreateSubchannelAddressArg(&addresses[i].address()));
diff --git a/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc b/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
index 09e72ae..b1dbe3b 100644
--- a/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
@@ -20,6 +20,7 @@
#include <limits.h>
#include <string.h>
+#include "absl/container/inlined_vector.h"
#include "absl/strings/str_cat.h"
#include <grpc/grpc.h>
@@ -99,9 +100,8 @@
// ready state. The first element in the pair represents the end of a
// range proportional to the child's weight. The start of the range
// is the previous value in the vector and is 0 for the first element.
- using PickerList =
- InlinedVector<std::pair<uint32_t, RefCountedPtr<ChildPickerWrapper>>,
- 1>;
+ using PickerList = absl::InlinedVector<
+ std::pair<uint32_t, RefCountedPtr<ChildPickerWrapper>>, 1>;
explicit WeightedPicker(PickerList pickers)
: pickers_(std::move(pickers)) {}
diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.cc b/src/core/ext/filters/client_channel/lb_policy_registry.cc
index 498b158..806d6b3 100644
--- a/src/core/ext/filters/client_channel/lb_policy_registry.cc
+++ b/src/core/ext/filters/client_channel/lb_policy_registry.cc
@@ -22,8 +22,9 @@
#include <string.h>
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
namespace grpc_core {
@@ -54,7 +55,8 @@
}
private:
- InlinedVector<std::unique_ptr<LoadBalancingPolicyFactory>, 10> factories_;
+ absl::InlinedVector<std::unique_ptr<LoadBalancingPolicyFactory>, 10>
+ factories_;
};
RegistryState* g_state = nullptr;
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index de49ac7..781941b 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -24,6 +24,8 @@
#include <stdio.h>
#include <string.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
@@ -249,7 +251,7 @@
return "";
}
const Json* service_config = nullptr;
- InlinedVector<grpc_error*, 4> error_list;
+ absl::InlinedVector<grpc_error*, 4> error_list;
for (const Json& choice : json.array_value()) {
if (choice.type() != Json::Type::OBJECT) {
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
@@ -352,7 +354,7 @@
service_config_string, &result.service_config_error);
}
}
- InlinedVector<grpc_arg, 1> new_args;
+ absl::InlinedVector<grpc_arg, 1> new_args;
if (balancer_addresses_ != nullptr) {
new_args.push_back(
CreateGrpclbBalancerAddressesArg(balancer_addresses_.get()));
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
index 54c6007..32784b0 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
@@ -26,6 +26,8 @@
#include <string.h>
#include <sys/types.h>
+#include "absl/container/inlined_vector.h"
+
#include <ares.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -200,7 +202,7 @@
}
ServerAddressList& addresses = **address_list_ptr;
for (size_t i = 0; hostent->h_addr_list[i] != nullptr; ++i) {
- grpc_core::InlinedVector<grpc_arg, 1> args_to_add;
+ absl::InlinedVector<grpc_arg, 1> args_to_add;
if (hr->is_balancer) {
args_to_add.emplace_back(
grpc_core::CreateGrpclbBalancerNameArg(hr->host));
diff --git a/src/core/ext/filters/client_channel/resolver_registry.cc b/src/core/ext/filters/client_channel/resolver_registry.cc
index 718556a..c7f7838 100644
--- a/src/core/ext/filters/client_channel/resolver_registry.cc
+++ b/src/core/ext/filters/client_channel/resolver_registry.cc
@@ -22,6 +22,8 @@
#include <string.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@@ -90,7 +92,7 @@
// more factories are needed and the additional allocations are
// hurting performance (which is unlikely, since these allocations
// only occur at gRPC initialization time).
- InlinedVector<std::unique_ptr<ResolverFactory>, 10> factories_;
+ absl::InlinedVector<std::unique_ptr<ResolverFactory>, 10> factories_;
grpc_core::UniquePtr<char> default_prefix_;
};
diff --git a/src/core/ext/filters/client_channel/resolver_registry.h b/src/core/ext/filters/client_channel/resolver_registry.h
index 8202506..bf34216 100644
--- a/src/core/ext/filters/client_channel/resolver_registry.h
+++ b/src/core/ext/filters/client_channel/resolver_registry.h
@@ -22,7 +22,6 @@
#include <grpc/support/port_platform.h>
#include "src/core/ext/filters/client_channel/resolver_factory.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/iomgr/pollset_set.h"
diff --git a/src/core/ext/filters/client_channel/resolver_result_parsing.cc b/src/core/ext/filters/client_channel/resolver_result_parsing.cc
index d87890d..77ee5fa 100644
--- a/src/core/ext/filters/client_channel/resolver_result_parsing.cc
+++ b/src/core/ext/filters/client_channel/resolver_result_parsing.cc
@@ -24,6 +24,8 @@
#include <stdio.h>
#include <string.h>
+#include "absl/types/optional.h"
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@@ -35,7 +37,6 @@
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/memory.h"
-#include "src/core/lib/gprpp/optional.h"
#include "src/core/lib/uri/uri_parser.h"
// As per the retry design, we do not allow more than 5 retry attempts.
@@ -318,7 +319,8 @@
std::vector<grpc_error*> error_list;
RefCountedPtr<LoadBalancingPolicy::Config> parsed_lb_config;
std::string lb_policy_name;
- Optional<ClientChannelGlobalParsedConfig::RetryThrottling> retry_throttling;
+ absl::optional<ClientChannelGlobalParsedConfig::RetryThrottling>
+ retry_throttling;
const char* health_check_service_name = nullptr;
// Parse LB config.
auto it = json.object_value().find("loadBalancingConfig");
@@ -396,7 +398,7 @@
grpc_error** error) {
GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
std::vector<grpc_error*> error_list;
- Optional<bool> wait_for_ready;
+ absl::optional<bool> wait_for_ready;
grpc_millis timeout = 0;
std::unique_ptr<ClientChannelMethodParsedConfig::RetryPolicy> retry_policy;
// Parse waitForReady.
diff --git a/src/core/ext/filters/client_channel/resolver_result_parsing.h b/src/core/ext/filters/client_channel/resolver_result_parsing.h
index 1f928cf..b38ae73 100644
--- a/src/core/ext/filters/client_channel/resolver_result_parsing.h
+++ b/src/core/ext/filters/client_channel/resolver_result_parsing.h
@@ -21,13 +21,14 @@
#include <grpc/support/port_platform.h>
+#include "absl/types/optional.h"
+
#include "src/core/ext/filters/client_channel/lb_policy.h"
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#include "src/core/ext/filters/client_channel/resolver.h"
#include "src/core/ext/filters/client_channel/retry_throttle.h"
#include "src/core/ext/filters/client_channel/service_config.h"
#include "src/core/lib/channel/status_util.h"
-#include "src/core/lib/gprpp/optional.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/exec_ctx.h" // for grpc_millis
@@ -47,14 +48,14 @@
ClientChannelGlobalParsedConfig(
RefCountedPtr<LoadBalancingPolicy::Config> parsed_lb_config,
std::string parsed_deprecated_lb_policy,
- const Optional<RetryThrottling>& retry_throttling,
+ const absl::optional<RetryThrottling>& retry_throttling,
const char* health_check_service_name)
: parsed_lb_config_(std::move(parsed_lb_config)),
parsed_deprecated_lb_policy_(std::move(parsed_deprecated_lb_policy)),
retry_throttling_(retry_throttling),
health_check_service_name_(health_check_service_name) {}
- Optional<RetryThrottling> retry_throttling() const {
+ absl::optional<RetryThrottling> retry_throttling() const {
return retry_throttling_;
}
@@ -73,7 +74,7 @@
private:
RefCountedPtr<LoadBalancingPolicy::Config> parsed_lb_config_;
std::string parsed_deprecated_lb_policy_;
- Optional<RetryThrottling> retry_throttling_;
+ absl::optional<RetryThrottling> retry_throttling_;
const char* health_check_service_name_;
};
@@ -88,7 +89,7 @@
};
ClientChannelMethodParsedConfig(grpc_millis timeout,
- const Optional<bool>& wait_for_ready,
+ const absl::optional<bool>& wait_for_ready,
std::unique_ptr<RetryPolicy> retry_policy)
: timeout_(timeout),
wait_for_ready_(wait_for_ready),
@@ -96,13 +97,13 @@
grpc_millis timeout() const { return timeout_; }
- Optional<bool> wait_for_ready() const { return wait_for_ready_; }
+ absl::optional<bool> wait_for_ready() const { return wait_for_ready_; }
const RetryPolicy* retry_policy() const { return retry_policy_.get(); }
private:
grpc_millis timeout_ = 0;
- Optional<bool> wait_for_ready_;
+ absl::optional<bool> wait_for_ready_;
std::unique_ptr<RetryPolicy> retry_policy_;
};
diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.cc b/src/core/ext/filters/client_channel/resolving_lb_policy.cc
index 851c2f2..f0c29ec 100644
--- a/src/core/ext/filters/client_channel/resolving_lb_policy.cc
+++ b/src/core/ext/filters/client_channel/resolving_lb_policy.cc
@@ -47,7 +47,6 @@
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/iomgr.h"
diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.h b/src/core/ext/filters/client_channel/resolving_lb_policy.h
index ba53368..8a04491 100644
--- a/src/core/ext/filters/client_channel/resolving_lb_policy.h
+++ b/src/core/ext/filters/client_channel/resolving_lb_policy.h
@@ -21,13 +21,14 @@
#include <grpc/support/port_platform.h>
+#include "absl/container/inlined_vector.h"
+
#include "src/core/ext/filters/client_channel/lb_policy.h"
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#include "src/core/ext/filters/client_channel/resolver.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/debug/trace.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/iomgr/call_combiner.h"
#include "src/core/lib/iomgr/closure.h"
@@ -80,7 +81,7 @@
void ResetBackoffLocked() override;
private:
- using TraceStringVector = InlinedVector<char*, 3>;
+ using TraceStringVector = absl::InlinedVector<char*, 3>;
class ResolverResultHandler;
class ResolvingControlHelper;
diff --git a/src/core/ext/filters/client_channel/server_address.h b/src/core/ext/filters/client_channel/server_address.h
index 10f49f2..f53dd3c 100644
--- a/src/core/ext/filters/client_channel/server_address.h
+++ b/src/core/ext/filters/client_channel/server_address.h
@@ -21,8 +21,9 @@
#include <grpc/support/port_platform.h>
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/iomgr/resolve_address.h"
namespace grpc_core {
@@ -82,7 +83,7 @@
// ServerAddressList
//
-typedef InlinedVector<ServerAddress, 1> ServerAddressList;
+typedef absl::InlinedVector<ServerAddress, 1> ServerAddressList;
} // namespace grpc_core
diff --git a/src/core/ext/filters/client_channel/service_config.cc b/src/core/ext/filters/client_channel/service_config.cc
index f08ebe1..04ef477 100644
--- a/src/core/ext/filters/client_channel/service_config.cc
+++ b/src/core/ext/filters/client_channel/service_config.cc
@@ -34,8 +34,8 @@
namespace grpc_core {
namespace {
-typedef InlinedVector<std::unique_ptr<ServiceConfig::Parser>,
- ServiceConfig::kNumPreallocatedParsers>
+typedef absl::InlinedVector<std::unique_ptr<ServiceConfig::Parser>,
+ ServiceConfig::kNumPreallocatedParsers>
ServiceConfigParserList;
ServiceConfigParserList* g_registered_parsers;
} // namespace
@@ -100,7 +100,7 @@
grpc_error* ServiceConfig::ParseJsonMethodConfig(const Json& json) {
// Parse method config with each registered parser.
auto objs_vector = absl::make_unique<ParsedConfigVector>();
- InlinedVector<grpc_error*, 4> error_list;
+ std::vector<grpc_error*> error_list;
for (size_t i = 0; i < g_registered_parsers->size(); i++) {
grpc_error* parser_error = GRPC_ERROR_NONE;
auto parsed_obj =
diff --git a/src/core/ext/filters/client_channel/service_config.h b/src/core/ext/filters/client_channel/service_config.h
index 3bba4ec..73157db 100644
--- a/src/core/ext/filters/client_channel/service_config.h
+++ b/src/core/ext/filters/client_channel/service_config.h
@@ -21,10 +21,11 @@
#include <unordered_map>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/string_util.h>
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/error.h"
@@ -89,7 +90,8 @@
};
static constexpr int kNumPreallocatedParsers = 4;
- typedef InlinedVector<std::unique_ptr<ParsedConfig>, kNumPreallocatedParsers>
+ typedef absl::InlinedVector<std::unique_ptr<ParsedConfig>,
+ kNumPreallocatedParsers>
ParsedConfigVector;
/// When a service config is applied to a call in the client_channel_filter,
@@ -175,7 +177,7 @@
std::string json_string_;
Json json_;
- InlinedVector<std::unique_ptr<ParsedConfig>, kNumPreallocatedParsers>
+ absl::InlinedVector<std::unique_ptr<ParsedConfig>, kNumPreallocatedParsers>
parsed_global_configs_;
// A map from the method name to the parsed config vector. Note that we are
// using a raw pointer and not a unique pointer so that we can use the same
@@ -186,7 +188,7 @@
const ParsedConfigVector* default_method_config_vector_ = nullptr;
// Storage for all the vectors that are being used in
// parsed_method_configs_table_.
- InlinedVector<std::unique_ptr<ParsedConfigVector>, 32>
+ absl::InlinedVector<std::unique_ptr<ParsedConfigVector>, 32>
parsed_method_config_vectors_storage_;
};
diff --git a/src/core/ext/filters/client_channel/xds/xds_api.cc b/src/core/ext/filters/client_channel/xds/xds_api.cc
index 4be62a3..08ba9f9 100644
--- a/src/core/ext/filters/client_channel/xds/xds_api.cc
+++ b/src/core/ext/filters/client_channel/xds/xds_api.cc
@@ -31,7 +31,6 @@
#include <grpc/support/string_util.h>
#include "src/core/ext/filters/client_channel/xds/xds_api.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
diff --git a/src/core/ext/filters/client_channel/xds/xds_api.h b/src/core/ext/filters/client_channel/xds/xds_api.h
index 9bd74c7..9117466 100644
--- a/src/core/ext/filters/client_channel/xds/xds_api.h
+++ b/src/core/ext/filters/client_channel/xds/xds_api.h
@@ -25,6 +25,7 @@
#include <set>
+#include "absl/container/inlined_vector.h"
#include "absl/types/optional.h"
#include <grpc/slice_buffer.h>
@@ -150,7 +151,7 @@
}
private:
- InlinedVector<LocalityMap, 2> priorities_;
+ absl::InlinedVector<LocalityMap, 2> priorities_;
};
// There are two phases of accessing this class's content:
@@ -169,7 +170,7 @@
const uint32_t parts_per_million;
};
- using DropCategoryList = InlinedVector<DropCategory, 2>;
+ using DropCategoryList = absl::InlinedVector<DropCategory, 2>;
void AddCategory(std::string name, uint32_t parts_per_million) {
drop_category_list_.emplace_back(
diff --git a/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc b/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc
index 6a64171..9caee17 100644
--- a/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc
+++ b/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc
@@ -18,6 +18,8 @@
#include "src/core/ext/filters/client_channel/xds/xds_bootstrap.h"
+#include <vector>
+
#include <errno.h>
#include <stdlib.h>
@@ -128,7 +130,7 @@
"malformed JSON in bootstrap file");
return;
}
- InlinedVector<grpc_error*, 1> error_list;
+ std::vector<grpc_error*> error_list;
auto it = json.mutable_object()->find("xds_servers");
if (it == json.mutable_object()->end()) {
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
@@ -155,7 +157,7 @@
}
grpc_error* XdsBootstrap::ParseXdsServerList(Json* json) {
- InlinedVector<grpc_error*, 1> error_list;
+ std::vector<grpc_error*> error_list;
for (size_t i = 0; i < json->mutable_array()->size(); ++i) {
Json& child = json->mutable_array()->at(i);
if (child.type() != Json::Type::OBJECT) {
@@ -173,7 +175,7 @@
}
grpc_error* XdsBootstrap::ParseXdsServer(Json* json, size_t idx) {
- InlinedVector<grpc_error*, 1> error_list;
+ std::vector<grpc_error*> error_list;
servers_.emplace_back();
XdsServer& server = servers_[servers_.size() - 1];
auto it = json->mutable_object()->find("server_uri");
@@ -211,7 +213,7 @@
grpc_error* XdsBootstrap::ParseChannelCredsArray(Json* json,
XdsServer* server) {
- InlinedVector<grpc_error*, 1> error_list;
+ std::vector<grpc_error*> error_list;
for (size_t i = 0; i < json->mutable_array()->size(); ++i) {
Json& child = json->mutable_array()->at(i);
if (child.type() != Json::Type::OBJECT) {
@@ -230,7 +232,7 @@
grpc_error* XdsBootstrap::ParseChannelCreds(Json* json, size_t idx,
XdsServer* server) {
- InlinedVector<grpc_error*, 1> error_list;
+ std::vector<grpc_error*> error_list;
ChannelCreds channel_creds;
auto it = json->mutable_object()->find("type");
if (it == json->mutable_object()->end()) {
@@ -268,7 +270,7 @@
}
grpc_error* XdsBootstrap::ParseNode(Json* json) {
- InlinedVector<grpc_error*, 1> error_list;
+ std::vector<grpc_error*> error_list;
node_ = absl::make_unique<Node>();
auto it = json->mutable_object()->find("id");
if (it != json->mutable_object()->end()) {
@@ -312,7 +314,7 @@
}
grpc_error* XdsBootstrap::ParseLocality(Json* json) {
- InlinedVector<grpc_error*, 1> error_list;
+ std::vector<grpc_error*> error_list;
auto it = json->mutable_object()->find("region");
if (it != json->mutable_object()->end()) {
if (it->second.type() != Json::Type::STRING) {
diff --git a/src/core/ext/filters/client_channel/xds/xds_bootstrap.h b/src/core/ext/filters/client_channel/xds/xds_bootstrap.h
index d3b04ad..13eff49 100644
--- a/src/core/ext/filters/client_channel/xds/xds_bootstrap.h
+++ b/src/core/ext/filters/client_channel/xds/xds_bootstrap.h
@@ -23,9 +23,10 @@
#include <string>
#include <vector>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/impl/codegen/slice.h>
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/iomgr/error.h"
@@ -53,7 +54,7 @@
struct XdsServer {
std::string server_uri;
- InlinedVector<ChannelCreds, 1> channel_creds;
+ absl::InlinedVector<ChannelCreds, 1> channel_creds;
};
// If *error is not GRPC_ERROR_NONE after returning, then there was an
@@ -78,7 +79,7 @@
grpc_error* ParseNode(Json* json);
grpc_error* ParseLocality(Json* json);
- InlinedVector<XdsServer, 1> servers_;
+ absl::InlinedVector<XdsServer, 1> servers_;
std::unique_ptr<Node> node_;
};
diff --git a/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc b/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc
index 52d226c..c218db8 100644
--- a/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc
+++ b/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc
@@ -22,6 +22,8 @@
#include <string.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
@@ -39,8 +41,8 @@
namespace grpc_core {
grpc_channel_args* ModifyXdsChannelArgs(grpc_channel_args* args) {
- InlinedVector<const char*, 1> args_to_remove;
- InlinedVector<grpc_arg, 2> args_to_add;
+ absl::InlinedVector<const char*, 1> args_to_remove;
+ absl::InlinedVector<grpc_arg, 2> args_to_add;
// Substitute the channel credentials with a version without call
// credentials: the load balancer is not necessarily trusted to handle
// bearer token credentials.
diff --git a/src/core/ext/filters/client_channel/xds/xds_client.cc b/src/core/ext/filters/client_channel/xds/xds_client.cc
index 9a0e566..9dc7b97 100644
--- a/src/core/ext/filters/client_channel/xds/xds_client.cc
+++ b/src/core/ext/filters/client_channel/xds/xds_client.cc
@@ -22,6 +22,7 @@
#include <limits.h>
#include <string.h>
+#include "absl/container/inlined_vector.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
@@ -447,7 +448,7 @@
GRPC_ARG_KEEPALIVE_TIME_MS,
};
// Channel args to add.
- InlinedVector<grpc_arg, 3> args_to_add;
+ absl::InlinedVector<grpc_arg, 3> args_to_add;
// Keepalive interval.
args_to_add.emplace_back(grpc_channel_arg_integer_create(
const_cast<char*>(GRPC_ARG_KEEPALIVE_TIME_MS), 5000));
diff --git a/src/core/ext/filters/client_channel/xds/xds_client_stats.h b/src/core/ext/filters/client_channel/xds/xds_client_stats.h
index cbeccd2..7a358d4 100644
--- a/src/core/ext/filters/client_channel/xds/xds_client_stats.h
+++ b/src/core/ext/filters/client_channel/xds/xds_client_stats.h
@@ -24,7 +24,6 @@
#include <grpc/support/string_util.h>
#include "src/core/lib/gprpp/atomic.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/ref_counted.h"
diff --git a/src/core/lib/channel/channelz.h b/src/core/lib/channel/channelz.h
index 73a9b57..6350203 100644
--- a/src/core/lib/channel/channelz.h
+++ b/src/core/lib/channel/channelz.h
@@ -25,10 +25,11 @@
#include <string>
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/gpr/time_precise.h"
#include "src/core/lib/gprpp/atomic.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/ref_counted.h"
@@ -167,7 +168,7 @@
void CollectData(CounterData* out);
// Really zero-sized, but 0-sized arrays are illegal on MSVC.
- InlinedVector<AtomicCounterData, 1> per_cpu_counter_data_storage_;
+ absl::InlinedVector<AtomicCounterData, 1> per_cpu_counter_data_storage_;
size_t num_cores_ = 0;
};
diff --git a/src/core/lib/channel/channelz_registry.cc b/src/core/lib/channel/channelz_registry.cc
index 0964ffc..4343936 100644
--- a/src/core/lib/channel/channelz_registry.cc
+++ b/src/core/lib/channel/channelz_registry.cc
@@ -21,6 +21,8 @@
#include <algorithm>
#include <cstring>
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/channel/channelz_registry.h"
@@ -82,7 +84,7 @@
std::string ChannelzRegistry::InternalGetTopChannels(
intptr_t start_channel_id) {
- InlinedVector<RefCountedPtr<BaseNode>, 10> top_level_channels;
+ absl::InlinedVector<RefCountedPtr<BaseNode>, 10> top_level_channels;
RefCountedPtr<BaseNode> node_after_pagination_limit;
{
MutexLock lock(&mu_);
@@ -120,7 +122,7 @@
}
std::string ChannelzRegistry::InternalGetServers(intptr_t start_server_id) {
- InlinedVector<RefCountedPtr<BaseNode>, 10> servers;
+ absl::InlinedVector<RefCountedPtr<BaseNode>, 10> servers;
RefCountedPtr<BaseNode> node_after_pagination_limit;
{
MutexLock lock(&mu_);
@@ -158,7 +160,7 @@
}
void ChannelzRegistry::InternalLogAllEntities() {
- InlinedVector<RefCountedPtr<BaseNode>, 10> nodes;
+ absl::InlinedVector<RefCountedPtr<BaseNode>, 10> nodes;
{
MutexLock lock(&mu_);
for (auto& p : node_map_) {
diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h
index 4f064d9..10b0631 100644
--- a/src/core/lib/channel/handshaker.h
+++ b/src/core/lib/channel/handshaker.h
@@ -21,12 +21,13 @@
#include <grpc/support/port_platform.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/support/string_util.h>
#include <grpc/impl/codegen/grpc_types.h>
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/closure.h"
@@ -146,7 +147,8 @@
gpr_mu mu_;
bool is_shutdown_ = false;
// An array of handshakers added via grpc_handshake_manager_add().
- InlinedVector<RefCountedPtr<Handshaker>, HANDSHAKERS_INIT_SIZE> handshakers_;
+ absl::InlinedVector<RefCountedPtr<Handshaker>, HANDSHAKERS_INIT_SIZE>
+ handshakers_;
// The index of the handshaker to invoke next and closure to invoke it.
size_t index_ = 0;
grpc_closure call_next_handshaker_;
diff --git a/src/core/lib/channel/handshaker_registry.cc b/src/core/lib/channel/handshaker_registry.cc
index 9ec458b..0e686af 100644
--- a/src/core/lib/channel/handshaker_registry.cc
+++ b/src/core/lib/channel/handshaker_registry.cc
@@ -18,9 +18,10 @@
#include <grpc/support/port_platform.h>
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/channel/handshaker_registry.h"
#include "src/core/lib/gpr/alloc.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/memory.h"
#include <string.h>
@@ -44,7 +45,7 @@
HandshakeManager* handshake_mgr);
private:
- InlinedVector<std::unique_ptr<HandshakerFactory>, 2> factories_;
+ absl::InlinedVector<std::unique_ptr<HandshakerFactory>, 2> factories_;
};
HandshakerFactoryList* g_handshaker_factory_lists = nullptr;
diff --git a/src/core/lib/gprpp/inlined_vector.h b/src/core/lib/gprpp/inlined_vector.h
deleted file mode 100644
index 3cad99d..0000000
--- a/src/core/lib/gprpp/inlined_vector.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *
- * Copyright 2017 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef GRPC_CORE_LIB_GPRPP_INLINED_VECTOR_H
-#define GRPC_CORE_LIB_GPRPP_INLINED_VECTOR_H
-
-#include <grpc/support/port_platform.h>
-
-#include <cassert>
-#include <cstring>
-
-#include "absl/container/inlined_vector.h"
-#include "src/core/lib/gprpp/memory.h"
-
-namespace grpc_core {
-
-template <typename T, size_t N, typename A = std::allocator<T>>
-using InlinedVector = absl::InlinedVector<T, N, A>;
-
-} // namespace grpc_core
-
-#endif /* GRPC_CORE_LIB_GPRPP_INLINED_VECTOR_H */
diff --git a/src/core/lib/gprpp/optional.h b/src/core/lib/gprpp/optional.h
deleted file mode 100644
index f4535bb..0000000
--- a/src/core/lib/gprpp/optional.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * Copyright 2019 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef GRPC_CORE_LIB_GPRPP_OPTIONAL_H
-#define GRPC_CORE_LIB_GPRPP_OPTIONAL_H
-
-#include <grpc/support/port_platform.h>
-
-#include "absl/types/optional.h"
-
-namespace grpc_core {
-
-template <typename T>
-using Optional = absl::optional<T>;
-
-} // namespace grpc_core
-
-#endif /* GRPC_CORE_LIB_GPRPP_OPTIONAL_H */
diff --git a/src/core/lib/iomgr/buffer_list.h b/src/core/lib/iomgr/buffer_list.h
index c2552ca..f804f02 100644
--- a/src/core/lib/iomgr/buffer_list.h
+++ b/src/core/lib/iomgr/buffer_list.h
@@ -21,12 +21,13 @@
#include <grpc/support/port_platform.h>
+#include "absl/types/optional.h"
+
#include "src/core/lib/iomgr/port.h"
#include <grpc/support/time.h>
#include "src/core/lib/gprpp/memory.h"
-#include "src/core/lib/gprpp/optional.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/internal_errqueue.h"
@@ -34,52 +35,52 @@
struct ConnectionMetrics {
/* Delivery rate in Bytes/s. */
- Optional<uint64_t> delivery_rate;
+ absl::optional<uint64_t> delivery_rate;
/* If the delivery rate is limited by the application, this is set to true. */
- Optional<bool> is_delivery_rate_app_limited;
+ absl::optional<bool> is_delivery_rate_app_limited;
/* Total packets retransmitted. */
- Optional<uint32_t> packet_retx;
+ absl::optional<uint32_t> packet_retx;
/* Total packets retransmitted spuriously. This metric is smaller than or
equal to packet_retx. */
- Optional<uint32_t> packet_spurious_retx;
+ absl::optional<uint32_t> packet_spurious_retx;
/* Total packets sent. */
- Optional<uint32_t> packet_sent;
+ absl::optional<uint32_t> packet_sent;
/* Total packets delivered. */
- Optional<uint32_t> packet_delivered;
+ absl::optional<uint32_t> packet_delivered;
/* Total packets delivered with ECE marked. This metric is smaller than or
equal to packet_delivered. */
- Optional<uint32_t> packet_delivered_ce;
+ absl::optional<uint32_t> packet_delivered_ce;
/* Total bytes lost so far. */
- Optional<uint64_t> data_retx;
+ absl::optional<uint64_t> data_retx;
/* Total bytes sent so far. */
- Optional<uint64_t> data_sent;
+ absl::optional<uint64_t> data_sent;
/* Total bytes in write queue but not sent. */
- Optional<uint64_t> data_notsent;
+ absl::optional<uint64_t> data_notsent;
/* Pacing rate of the connection in Bps */
- Optional<uint64_t> pacing_rate;
+ absl::optional<uint64_t> pacing_rate;
/* Minimum RTT observed in usec. */
- Optional<uint32_t> min_rtt;
+ absl::optional<uint32_t> min_rtt;
/* Smoothed RTT in usec */
- Optional<uint32_t> srtt;
+ absl::optional<uint32_t> srtt;
/* Send congestion window. */
- Optional<uint32_t> congestion_window;
+ absl::optional<uint32_t> congestion_window;
/* Slow start threshold in packets. */
- Optional<uint32_t> snd_ssthresh;
+ absl::optional<uint32_t> snd_ssthresh;
/* Maximum degree of reordering (i.e., maximum number of packets reodered)
on the connection. */
- Optional<uint32_t> reordering;
+ absl::optional<uint32_t> reordering;
/* Represents the number of recurring retransmissions of the first sequence
that is not acknowledged yet. */
- Optional<uint8_t> recurring_retrans;
+ absl::optional<uint8_t> recurring_retrans;
/* The cumulative time (in usec) that the transport protocol was busy
sending data. */
- Optional<uint64_t> busy_usec;
+ absl::optional<uint64_t> busy_usec;
/* The cumulative time (in usec) that the transport protocol was limited by
the receive window size. */
- Optional<uint64_t> rwnd_limited_usec;
+ absl::optional<uint64_t> rwnd_limited_usec;
/* The cumulative time (in usec) that the transport protocol was limited by
the send buffer size. */
- Optional<uint64_t> sndbuf_limited_usec;
+ absl::optional<uint64_t> sndbuf_limited_usec;
};
struct Timestamp {
diff --git a/src/core/lib/iomgr/call_combiner.h b/src/core/lib/iomgr/call_combiner.h
index d3f43cf..44acd9f 100644
--- a/src/core/lib/iomgr/call_combiner.h
+++ b/src/core/lib/iomgr/call_combiner.h
@@ -23,9 +23,10 @@
#include <stddef.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/support/atm.h>
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/mpscq.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@@ -208,7 +209,7 @@
// There are generally a maximum of 6 closures to run in the call
// combiner, one for each pending op.
- InlinedVector<CallCombinerClosure, 6> closures_;
+ absl::InlinedVector<CallCombinerClosure, 6> closures_;
};
} // namespace grpc_core
diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h
index 5c79aa7..ac3ff87 100644
--- a/src/core/lib/iomgr/error.h
+++ b/src/core/lib/iomgr/error.h
@@ -30,7 +30,6 @@
#include <grpc/support/time.h>
#include "src/core/lib/debug/trace.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
/// Opaque representation of an error.
/// See https://github.com/grpc/grpc/blob/master/doc/core/grpc-error.md for a
diff --git a/src/core/lib/iomgr/udp_server.cc b/src/core/lib/iomgr/udp_server.cc
index 0bfd22f..ce3531f 100644
--- a/src/core/lib/iomgr/udp_server.cc
+++ b/src/core/lib/iomgr/udp_server.cc
@@ -44,6 +44,8 @@
#include <sys/types.h>
#include <unistd.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -52,7 +54,6 @@
#include <grpc/support/time.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/ev_posix.h"
@@ -177,7 +178,7 @@
int shutdown;
/* An array of listeners */
- grpc_core::InlinedVector<GrpcUdpListener, 16> listeners;
+ absl::InlinedVector<GrpcUdpListener, 16> listeners;
/* factory for use to create udp listeners */
GrpcUdpHandlerFactory* handler_factory;
diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h
index 57967e1..6b9e9d1 100644
--- a/src/core/lib/security/credentials/composite/composite_credentials.h
+++ b/src/core/lib/security/credentials/composite/composite_credentials.h
@@ -23,7 +23,8 @@
#include <string>
-#include "src/core/lib/gprpp/inlined_vector.h"
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/security/credentials/credentials.h"
@@ -71,8 +72,7 @@
class grpc_composite_call_credentials : public grpc_call_credentials {
public:
using CallCredentialsList =
- grpc_core::InlinedVector<grpc_core::RefCountedPtr<grpc_call_credentials>,
- 2>;
+ absl::InlinedVector<grpc_core::RefCountedPtr<grpc_call_credentials>, 2>;
grpc_composite_call_credentials(
grpc_core::RefCountedPtr<grpc_call_credentials> creds1,
diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
index c922d35..8191043 100644
--- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
+++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
@@ -23,6 +23,8 @@
#include <string.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/grpc_security.h>
#include <grpc/impl/codegen/slice.h>
#include <grpc/slice.h>
@@ -32,7 +34,6 @@
#include "absl/strings/str_format.h"
#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/load_file.h"
@@ -669,7 +670,7 @@
void operator()(grpc_uri* uri) { grpc_uri_destroy(uri); }
};
*sts_url_out = nullptr;
- InlinedVector<grpc_error*, 3> error_list;
+ absl::InlinedVector<grpc_error*, 3> error_list;
std::unique_ptr<grpc_uri, GrpcUriDeleter> sts_url(
options->token_exchange_service_uri != nullptr
? grpc_uri_parse(options->token_exchange_service_uri, false)
diff --git a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h
index c411fb2..a5f032a 100644
--- a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h
+++ b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h
@@ -23,7 +23,8 @@
#include <grpc/grpc_security.h>
-#include "src/core/lib/gprpp/inlined_vector.h"
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/security/security_connector/ssl_utils.h"
@@ -44,8 +45,7 @@
struct grpc_tls_key_materials_config
: public grpc_core::RefCounted<grpc_tls_key_materials_config> {
public:
- typedef grpc_core::InlinedVector<grpc_core::PemKeyCertPair, 1>
- PemKeyCertPairList;
+ typedef absl::InlinedVector<grpc_core::PemKeyCertPair, 1> PemKeyCertPairList;
/** Getters for member fields. **/
const char* pem_root_certs() const { return pem_root_certs_.get(); }
diff --git a/src/core/lib/security/security_connector/load_system_roots_linux.cc b/src/core/lib/security/security_connector/load_system_roots_linux.cc
index e97773f..f7c6c2c 100644
--- a/src/core/lib/security/security_connector/load_system_roots_linux.cc
+++ b/src/core/lib/security/security_connector/load_system_roots_linux.cc
@@ -34,6 +34,8 @@
#include <sys/types.h>
#include <unistd.h>
+#include "absl/container/inlined_vector.h"
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@@ -41,7 +43,6 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/global_config.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/iomgr/load_file.h"
GPR_GLOBAL_CONFIG_DEFINE_STRING(grpc_system_ssl_roots_dir, "",
@@ -100,7 +101,7 @@
char path[MAXPATHLEN];
off_t size;
};
- InlinedVector<FileData, 2> roots_filenames;
+ absl::InlinedVector<FileData, 2> roots_filenames;
size_t total_bundle_size = 0;
struct dirent* directory_entry;
while ((directory_entry = readdir(ca_directory)) != nullptr) {
diff --git a/src/cpp/common/tls_credentials_options.cc b/src/cpp/common/tls_credentials_options.cc
index c821e10..23d6495 100644
--- a/src/cpp/common/tls_credentials_options.cc
+++ b/src/cpp/common/tls_credentials_options.cc
@@ -18,6 +18,9 @@
#include <grpc/support/alloc.h>
#include <grpcpp/security/tls_credentials_options.h>
+
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h"
#include "src/cpp/common/tls_credentials_options_util.h"
@@ -111,7 +114,7 @@
c_arg_->key_materials_config = grpc_tls_key_materials_config_create();
}
/** Convert |pem_key_cert_pair_list| to an inlined vector of ssl pairs. **/
- ::grpc_core::InlinedVector<::grpc_core::PemKeyCertPair, 1>
+ ::absl::InlinedVector<::grpc_core::PemKeyCertPair, 1>
c_pem_key_cert_pair_list;
for (const auto& key_cert_pair : pem_key_cert_pair_list) {
c_pem_key_cert_pair_list.emplace_back(
@@ -128,7 +131,7 @@
c_arg_->key_materials_config = nullptr;
return;
}
- ::grpc_core::InlinedVector<::grpc_core::PemKeyCertPair, 1>
+ ::absl::InlinedVector<::grpc_core::PemKeyCertPair, 1>
c_pem_key_cert_pair_list;
for (const auto& key_cert_pair :
key_materials_config->pem_key_cert_pair_list()) {
diff --git a/src/cpp/common/tls_credentials_options_util.cc b/src/cpp/common/tls_credentials_options_util.cc
index 59915e4..2211460 100644
--- a/src/cpp/common/tls_credentials_options_util.cc
+++ b/src/cpp/common/tls_credentials_options_util.cc
@@ -16,8 +16,10 @@
*
*/
-#include "src/cpp/common/tls_credentials_options_util.h"
+#include "absl/container/inlined_vector.h"
+
#include <grpcpp/security/tls_credentials_options.h>
+#include "src/cpp/common/tls_credentials_options_util.h"
namespace grpc_impl {
namespace experimental {
@@ -35,7 +37,7 @@
}
grpc_tls_key_materials_config* c_config =
grpc_tls_key_materials_config_create();
- ::grpc_core::InlinedVector<::grpc_core::PemKeyCertPair, 1>
+ ::absl::InlinedVector<::grpc_core::PemKeyCertPair, 1>
c_pem_key_cert_pair_list;
for (const auto& key_cert_pair : config->pem_key_cert_pair_list()) {
grpc_ssl_pem_key_cert_pair* ssl_pair =
diff --git a/test/core/client_channel/resolvers/fake_resolver_test.cc b/test/core/client_channel/resolvers/fake_resolver_test.cc
index 84ff252..fb1e3e2 100644
--- a/test/core/client_channel/resolvers/fake_resolver_test.cc
+++ b/test/core/client_channel/resolvers/fake_resolver_test.cc
@@ -94,7 +94,7 @@
grpc_uri* uri = grpc_uri_parse(uri_string, true);
grpc_resolved_address address;
GPR_ASSERT(grpc_parse_uri(uri, &address));
- grpc_core::InlinedVector<grpc_arg, 2> args_to_add;
+ absl::InlinedVector<grpc_arg, 2> args_to_add;
result.addresses.emplace_back(
address.addr, address.len,
grpc_channel_args_copy_and_add(nullptr, nullptr, 0));
diff --git a/test/core/end2end/fixtures/h2_tls.cc b/test/core/end2end/fixtures/h2_tls.cc
index 95cff3a..1a79bc9 100644
--- a/test/core/end2end/fixtures/h2_tls.cc
+++ b/test/core/end2end/fixtures/h2_tls.cc
@@ -23,12 +23,13 @@
#include <stdio.h>
#include <string.h>
+#include "absl/container/inlined_vector.h"
+
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/tmpfile.h"
#include "src/core/lib/gprpp/host_port.h"
-#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/security/credentials/credentials.h"
@@ -42,7 +43,7 @@
#define SERVER_CERT_PATH "src/core/tsi/test_creds/server1.pem"
#define SERVER_KEY_PATH "src/core/tsi/test_creds/server1.key"
-typedef grpc_core::InlinedVector<grpc_core::Thread, 1> ThreadList;
+typedef absl::InlinedVector<grpc_core::Thread, 1> ThreadList;
struct fullstack_secure_fixture_data {
~fullstack_secure_fixture_data() {
diff --git a/test/core/gprpp/BUILD b/test/core/gprpp/BUILD
index a9a8f84..4eb81c3 100644
--- a/test/core/gprpp/BUILD
+++ b/test/core/gprpp/BUILD
@@ -96,19 +96,6 @@
)
grpc_cc_test(
- name = "optional_test",
- srcs = ["optional_test.cc"],
- external_deps = [
- "gtest",
- ],
- language = "C++",
- deps = [
- "//:optional",
- "//test/core/util:grpc_test_util",
- ],
-)
-
-grpc_cc_test(
name = "orphanable_test",
srcs = ["orphanable_test.cc"],
external_deps = [
diff --git a/test/core/gprpp/optional_test.cc b/test/core/gprpp/optional_test.cc
deleted file mode 100644
index 67c7fad..0000000
--- a/test/core/gprpp/optional_test.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * Copyright 2019 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "src/core/lib/gprpp/optional.h"
-#include <grpc/support/log.h>
-#include <gtest/gtest.h>
-#include "src/core/lib/gprpp/memory.h"
-#include "test/core/util/test_config.h"
-
-namespace grpc_core {
-namespace testing {
-
-namespace {
-TEST(OptionalTest, BasicTest) {
- grpc_core::Optional<int> opt_val;
- EXPECT_FALSE(opt_val.has_value());
- const int kTestVal = 123;
-
- opt_val.emplace(kTestVal);
- EXPECT_TRUE(opt_val.has_value());
- EXPECT_EQ(opt_val.value(), kTestVal);
-
- opt_val.reset();
- EXPECT_EQ(opt_val.has_value(), false);
-}
-} // namespace
-
-} // namespace testing
-} // namespace grpc_core
-
-int main(int argc, char** argv) {
- grpc::testing::TestEnvironment env(argc, argv);
- ::testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/test/cpp/client/credentials_test.cc b/test/cpp/client/credentials_test.cc
index a1a0633..7ca90f7 100644
--- a/test/cpp/client/credentials_test.cc
+++ b/test/cpp/client/credentials_test.cc
@@ -399,8 +399,7 @@
ssl_pair->cert_chain = gpr_strdup(test_cert_chain.c_str());
::grpc_core::PemKeyCertPair pem_key_cert_pair =
::grpc_core::PemKeyCertPair(ssl_pair);
- ::grpc_core::InlinedVector<::grpc_core::PemKeyCertPair, 1>
- pem_key_cert_pair_list;
+ ::absl::InlinedVector<::grpc_core::PemKeyCertPair, 1> pem_key_cert_pair_list;
pem_key_cert_pair_list.push_back(pem_key_cert_pair);
grpc::string test_pem_root_certs = "pem_root_certs";
c_key_materials.set_key_materials(test_pem_root_certs.c_str(),
@@ -417,7 +416,7 @@
EXPECT_EQ(c_arg.cb_user_data, nullptr);
EXPECT_STREQ(c_arg.key_materials_config->pem_root_certs(),
"new_pem_root_certs");
- ::grpc_core::InlinedVector<::grpc_core::PemKeyCertPair, 1> pair_list =
+ ::absl::InlinedVector<::grpc_core::PemKeyCertPair, 1> pair_list =
c_arg.key_materials_config->pem_key_cert_pair_list();
EXPECT_EQ(static_cast<int>(pair_list.size()), 2);
EXPECT_STREQ(pair_list[0].private_key(), "private_key");
@@ -625,7 +624,7 @@
EXPECT_EQ(c_credential_reload_arg.cb_user_data, nullptr);
EXPECT_STREQ(c_credential_reload_arg.key_materials_config->pem_root_certs(),
"new_pem_root_certs");
- ::grpc_core::InlinedVector<::grpc_core::PemKeyCertPair, 1> c_pair_list =
+ ::absl::InlinedVector<::grpc_core::PemKeyCertPair, 1> c_pair_list =
c_credential_reload_arg.key_materials_config->pem_key_cert_pair_list();
EXPECT_EQ(static_cast<int>(c_pair_list.size()), 2);
EXPECT_STREQ(c_pair_list[0].private_key(), "private_key");
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index c00bec0..c5d220f 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -1495,13 +1495,11 @@
src/core/lib/gprpp/global_config_generic.h \
src/core/lib/gprpp/host_port.cc \
src/core/lib/gprpp/host_port.h \
-src/core/lib/gprpp/inlined_vector.h \
src/core/lib/gprpp/manual_constructor.h \
src/core/lib/gprpp/map.h \
src/core/lib/gprpp/memory.h \
src/core/lib/gprpp/mpscq.cc \
src/core/lib/gprpp/mpscq.h \
-src/core/lib/gprpp/optional.h \
src/core/lib/gprpp/orphanable.h \
src/core/lib/gprpp/ref_counted.h \
src/core/lib/gprpp/ref_counted_ptr.h \
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index fd50700..04f3722 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -1306,13 +1306,11 @@
src/core/lib/gprpp/global_config_generic.h \
src/core/lib/gprpp/host_port.cc \
src/core/lib/gprpp/host_port.h \
-src/core/lib/gprpp/inlined_vector.h \
src/core/lib/gprpp/manual_constructor.h \
src/core/lib/gprpp/map.h \
src/core/lib/gprpp/memory.h \
src/core/lib/gprpp/mpscq.cc \
src/core/lib/gprpp/mpscq.h \
-src/core/lib/gprpp/optional.h \
src/core/lib/gprpp/orphanable.h \
src/core/lib/gprpp/ref_counted.h \
src/core/lib/gprpp/ref_counted_ptr.h \
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index b09efd6..ab87604 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -4946,30 +4946,6 @@
"flaky": false,
"gtest": true,
"language": "c++",
- "name": "optional_test",
- "platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "uses_polling": true
- },
- {
- "args": [],
- "benchmark": false,
- "ci_platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "gtest": true,
- "language": "c++",
"name": "orphanable_test",
"platforms": [
"linux",