From a589f20d395b13b0fb4d7cca8a904b272db38f03 Mon Sep 17 00:00:00 2001
From: Muxi Yan <mxyan@google.com>
Date: Fri, 5 May 2017 13:29:44 -0700
Subject: [PATCH] Rename grpc_user_agent_md to make it less confusing

---
 .../workarounds/workaround_cronet_compression_filter.c    | 2 +-
 src/core/ext/filters/workarounds/workaround_utils.c       | 8 ++++----
 src/core/ext/filters/workarounds/workaround_utils.h       | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
index 917977fbe1f..41a91204b20 100644
--- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
+++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
@@ -76,7 +76,7 @@ static void recv_initial_metadata_ready(grpc_exec_ctx* exec_ctx,
   if (GRPC_ERROR_NONE == error) {
     grpc_mdelem md;
     if (get_user_agent_mdelem(calld->recv_initial_metadata, &md)) {
-      grpc_user_agent_md* user_agent_md = grpc_parse_user_agent(md);
+      grpc_workaround_user_agent_md* user_agent_md = grpc_parse_user_agent(md);
       if (user_agent_md
               ->workaround_active[GRPC_WORKAROUND_ID_CRONET_COMPRESSION]) {
         calld->workaround_active = true;
diff --git a/src/core/ext/filters/workarounds/workaround_utils.c b/src/core/ext/filters/workarounds/workaround_utils.c
index 64f35905853..071e00aefd9 100644
--- a/src/core/ext/filters/workarounds/workaround_utils.c
+++ b/src/core/ext/filters/workarounds/workaround_utils.c
@@ -45,15 +45,15 @@ static void destroy_user_agent_md(void *user_agent_md) {
   gpr_free(user_agent_md);
 }
 
-grpc_user_agent_md *grpc_parse_user_agent(grpc_mdelem md) {
-  grpc_user_agent_md *user_agent_md =
-      (grpc_user_agent_md *)grpc_mdelem_get_user_data(md,
+grpc_workaround_user_agent_md *grpc_parse_user_agent(grpc_mdelem md) {
+  grpc_workaround_user_agent_md *user_agent_md =
+      (grpc_workaround_user_agent_md *)grpc_mdelem_get_user_data(md,
                                                       destroy_user_agent_md);
 
   if (NULL != user_agent_md) {
     return user_agent_md;
   }
-  user_agent_md = gpr_malloc(sizeof(grpc_user_agent_md));
+  user_agent_md = gpr_malloc(sizeof(grpc_workaround_user_agent_md));
   for (int i = 0; i < GRPC_MAX_WORKAROUND_ID; i++) {
     if (workarounds[i].enabled && workarounds[i].ua_parser) {
       user_agent_md->workaround_active[i] = workarounds[i].ua_parser(md);
diff --git a/src/core/ext/filters/workarounds/workaround_utils.h b/src/core/ext/filters/workarounds/workaround_utils.h
index dfcc73f9a50..e563f07632d 100644
--- a/src/core/ext/filters/workarounds/workaround_utils.h
+++ b/src/core/ext/filters/workarounds/workaround_utils.h
@@ -41,11 +41,11 @@ typedef enum {
   GRPC_MAX_WORKAROUND_ID,
 } grpc_workaround_list;
 
-typedef struct grpc_user_agent_md {
+typedef struct grpc_workaround_user_agent_md {
   bool workaround_active[GRPC_MAX_WORKAROUND_ID];
-} grpc_user_agent_md;
+} grpc_workaround_user_agent_md;
 
-grpc_user_agent_md *grpc_parse_user_agent(grpc_mdelem md);
+grpc_workaround_user_agent_md *grpc_parse_user_agent(grpc_mdelem md);
 
 typedef bool (*user_agent_parser)(grpc_mdelem);