diff options
author | Ivan Lozano <ivanlozano@google.com> | 2023-06-21 14:25:47 +0000 |
---|---|---|
committer | Krzysztof KosiĆski <krzysio@google.com> | 2023-10-18 19:43:01 +0000 |
commit | 86747a9b7ab4a2c0d7f62d66545c8bc7ce24f89a (patch) | |
tree | 7054d5b683ac2ae92ca5ccdd48470d32c24f516a /grpc/src/core/ext/xds/xds_resource_type.cc | |
parent | 9373479334615d76ed1749510322acd3cefe046b (diff) | |
download | grpcio-sys-86747a9b7ab4a2c0d7f62d66545c8bc7ce24f89a.tar.gz |
Upgrade grpcio-sys to v0.12.1+1.46.5-patched
Based on aosp/2633389
Bug: 266055490
Test: mm, presubmit
Change-Id: I006dce16e643dac75c6b190866746f8186ba5996
Diffstat (limited to 'grpc/src/core/ext/xds/xds_resource_type.cc')
-rw-r--r-- | grpc/src/core/ext/xds/xds_resource_type.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/grpc/src/core/ext/xds/xds_resource_type.cc b/grpc/src/core/ext/xds/xds_resource_type.cc new file mode 100644 index 00000000..5dbb36b3 --- /dev/null +++ b/grpc/src/core/ext/xds/xds_resource_type.cc @@ -0,0 +1,33 @@ +// +// Copyright 2021 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 <grpc/support/port_platform.h> + +#include "src/core/ext/xds/xds_resource_type.h" + +namespace grpc_core { + +bool XdsResourceType::IsType(absl::string_view resource_type, + bool* is_v2) const { + if (resource_type == type_url()) return true; + if (resource_type == v2_type_url()) { + if (is_v2 != nullptr) *is_v2 = true; + return true; + } + return false; +} + +} // namespace grpc_core |