Remove deprecated protos for VE string. Replace with LogData

PiperOrigin-RevId: 253068062
Change-Id: Ib3b6f6ba9b93d560bc6c75c40f13877d31bb1938
diff --git a/src/main/java/com/google/android/libraries/feed/piet/host/HostBindingProvider.java b/src/main/java/com/google/android/libraries/feed/piet/host/HostBindingProvider.java
index 8e6458a..86c5c93 100644
--- a/src/main/java/com/google/android/libraries/feed/piet/host/HostBindingProvider.java
+++ b/src/main/java/com/google/android/libraries/feed/piet/host/HostBindingProvider.java
@@ -20,10 +20,10 @@
 import com.google.search.now.ui.piet.BindingRefsProto.ElementBindingRef;
 import com.google.search.now.ui.piet.BindingRefsProto.GridCellWidthBindingRef;
 import com.google.search.now.ui.piet.BindingRefsProto.ImageBindingRef;
+import com.google.search.now.ui.piet.BindingRefsProto.LogDataBindingRef;
 import com.google.search.now.ui.piet.BindingRefsProto.ParameterizedTextBindingRef;
 import com.google.search.now.ui.piet.BindingRefsProto.StyleBindingRef;
 import com.google.search.now.ui.piet.BindingRefsProto.TemplateBindingRef;
-import com.google.search.now.ui.piet.BindingRefsProto.VedBindingRef;
 import com.google.search.now.ui.piet.BindingRefsProto.VisibilityBindingRef;
 import com.google.search.now.ui.piet.ElementsProto.BindingValue;
 import com.google.search.now.ui.piet.ElementsProto.HostBindingData;
@@ -104,10 +104,10 @@
   }
 
   /**
-   * Called by Piet during the binding process for a {@link VedBindingRef} if the server has
+   * Called by Piet during the binding process for a {@link LogDataBindingRef} if the server has
    * specified a BindingValue which includes {@link HostBindingData} set.
    */
-  public BindingValue getVedBindingForValue(BindingValue bindingValue) {
+  public BindingValue getLogDataBindingForValue(BindingValue bindingValue) {
     return clearHostBindingData(bindingValue);
   }
 
diff --git a/src/main/java/com/google/android/libraries/feed/sharedstream/piet/PietHostBindingProvider.java b/src/main/java/com/google/android/libraries/feed/sharedstream/piet/PietHostBindingProvider.java
index fc0c608..972d688 100644
--- a/src/main/java/com/google/android/libraries/feed/sharedstream/piet/PietHostBindingProvider.java
+++ b/src/main/java/com/google/android/libraries/feed/sharedstream/piet/PietHostBindingProvider.java
@@ -123,7 +123,7 @@
   }
 
   @Override
-  public BindingValue getVedBindingForValue(BindingValue bindingValue) {
+  public BindingValue getLogDataBindingForValue(BindingValue bindingValue) {
     BindingValue genericBindingResult = getGenericBindingForValue(bindingValue);
 
     if (genericBindingResult != null) {
@@ -131,9 +131,9 @@
     }
 
     if (hostHostBindingProvider != null) {
-      return hostHostBindingProvider.getVedBindingForValue(bindingValue);
+      return hostHostBindingProvider.getLogDataBindingForValue(bindingValue);
     }
-    return super.getVedBindingForValue(bindingValue);
+    return super.getLogDataBindingForValue(bindingValue);
   }
 
   @Override
diff --git a/src/main/proto/search/now/ui/piet/binding_refs.proto b/src/main/proto/search/now/ui/piet/binding_refs.proto
index 3d1aa8b..107eb9a 100644
--- a/src/main/proto/search/now/ui/piet/binding_refs.proto
+++ b/src/main/proto/search/now/ui/piet/binding_refs.proto
@@ -92,12 +92,6 @@
   optional bool is_optional = 2;
 }
 
-// VED binding references are always optional.
-message VedBindingRef {
-  // The unique ID for this binding. See comments at the top of the file.
-  optional string binding_id = 1 [deprecated = true];
-}
-
 message TemplateBindingRef {
   // The unique ID for this binding. See comments at the top of the file.
   optional string binding_id = 1;
diff --git a/src/main/proto/search/now/ui/piet/elements.proto b/src/main/proto/search/now/ui/piet/elements.proto
index d2e5d96..74065b0 100644
--- a/src/main/proto/search/now/ui/piet/elements.proto
+++ b/src/main/proto/search/now/ui/piet/elements.proto
@@ -232,17 +232,6 @@
   optional OverflowBehavior horizontal_overflow = 16
       [default = OVERFLOW_HIDDEN];
 
-  // The value of the VED token to be used by this Element.
-  oneof ved_value {
-    // A base64 encoded serialized ClickTrackingCGI proto that identifies the
-    // logged Visual Element corresponding to this piet Element.
-    string ved = 9 [deprecated = true];
-
-    // A VedBindingRef to the VED that this Element will be bound to.
-    // This is only meant to be used for Elements defined by a Template.
-    VedBindingRef ved_binding = 10 [deprecated = true];
-  }
-
   // Styles to apply to this Element. If any style_ids cannot be found,
   // ERR_MISSING_STYLES is raised.
   optional StyleIdsStack style_references = 17;
@@ -258,7 +247,7 @@
   extensions 10000 to max;
 
   // Deprecated field IDs.
-  reserved 4, 7, 8, 13, 19, 20;
+  reserved 4, 7, 8, 13, 19, 20, 9, 10;
 }
 
 /*
diff --git a/src/main/proto/search/now/ui/piet/piet.proto b/src/main/proto/search/now/ui/piet/piet.proto
index 0baa7eb..c702c6c 100644
--- a/src/main/proto/search/now/ui/piet/piet.proto
+++ b/src/main/proto/search/now/ui/piet/piet.proto
@@ -142,18 +142,14 @@
   // Actions associated with the full Frame.
   optional Actions actions = 7;
 
-  // A Base64-encoded serialized ClickTrackingCGI proto that identifies the
-  // logged Visual Element corresponding to this Frame.
-  optional string ved = 8 [deprecated = true];
-
-  //
+  // Data used for logging info sent to the host.
   optional LogData log_data = 12;
 
   // Please use CL numbers you own for extension numbers.
   extensions 10000 to max;
 
   // Deprecated field IDs.
-  reserved 6, 9;
+  reserved 6, 9, 8;
 }
 
 // UI Elements in a Frame or Template use a Stylesheet to resolve the Styles
diff --git a/src/test/java/com/google/android/libraries/feed/sharedstream/piet/PietHostBindingProviderTest.java b/src/test/java/com/google/android/libraries/feed/sharedstream/piet/PietHostBindingProviderTest.java
index 9a8de6d..60339da 100644
--- a/src/test/java/com/google/android/libraries/feed/sharedstream/piet/PietHostBindingProviderTest.java
+++ b/src/test/java/com/google/android/libraries/feed/sharedstream/piet/PietHostBindingProviderTest.java
@@ -181,18 +181,18 @@
   }
 
   @Test
-  public void testGetVedBindingForValue() {
-    assertThat(hostBindingProvider.getVedBindingForValue(BINDING_WITH_HOST_DATA))
+  public void testGetLogDataBindingForValue() {
+    assertThat(hostBindingProvider.getLogDataBindingForValue(BINDING_WITH_HOST_DATA))
         .isEqualTo(BINDING_WITHOUT_HOST_DATA);
   }
 
   @Test
-  public void testGetVedBindingForValue_delegating() {
+  public void testGetLogDataBindingForValue_delegating() {
     BindingValue hostBinding = BindingValue.newBuilder().setBindingId("ved").build();
-    when(hostHostBindingProvider.getVedBindingForValue(BINDING_WITH_HOST_DATA))
+    when(hostHostBindingProvider.getLogDataBindingForValue(BINDING_WITH_HOST_DATA))
         .thenReturn(hostBinding);
 
-    assertThat(delegatingHostBindingProvider.getVedBindingForValue(BINDING_WITH_HOST_DATA))
+    assertThat(delegatingHostBindingProvider.getLogDataBindingForValue(BINDING_WITH_HOST_DATA))
         .isEqualTo(hostBinding);
   }