Delete variations::CHROME_SYNC_EVENT_LOGGER

This existed to support recording of field trials as Sync user events.
That feature was abandoned and recently deleted (crrev.com/c/1557020).

Bug: 934762
Change-Id: Ic6deed6a5e951dac9e33e7e6891f92b76161a910
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1556805
Reviewed-by: Steven Holte <[email protected]>
Commit-Queue: Marc Treib <[email protected]>
Cr-Commit-Position: refs/heads/master@{#649427}
diff --git a/components/variations/variations_associated_data.cc b/components/variations/variations_associated_data.cc
index 0dffe8f..07443b18 100644
--- a/components/variations/variations_associated_data.cc
+++ b/components/variations/variations_associated_data.cc
@@ -37,8 +37,9 @@
                    const ActiveGroupId& group_identifier,
                    const VariationID id,
                    const bool force) {
-#if !defined(NDEBUG)
-    DCHECK_EQ(4, ID_COLLECTION_COUNT);
+    static_assert(3 == ID_COLLECTION_COUNT,
+                  "If you add a new collection key, add handling code here!");
+#if DCHECK_IS_ON()
     // Ensure that at most one of the trigger/non-trigger/signed-in web property
     // IDs are set.
     if (key == GOOGLE_WEB_PROPERTIES || key == GOOGLE_WEB_PROPERTIES_TRIGGER ||
diff --git a/components/variations/variations_associated_data.h b/components/variations/variations_associated_data.h
index 0bd96ea..006ecfd 100644
--- a/components/variations/variations_associated_data.h
+++ b/components/variations/variations_associated_data.h
@@ -65,9 +65,6 @@
   // server side experimental behavior, transmitted through the
   // X-Client-Data header.
   GOOGLE_WEB_PROPERTIES_TRIGGER,
-  // This collection is used by Chrome Sync services, transmitted through the
-  // Sync Event Logger.
-  CHROME_SYNC_EVENT_LOGGER,
   // The total count of collections.
   ID_COLLECTION_COUNT,
 };
diff --git a/components/variations/variations_associated_data_unittest.cc b/components/variations/variations_associated_data_unittest.cc
index 31fd334..71602a8f 100644
--- a/components/variations/variations_associated_data_unittest.cc
+++ b/components/variations/variations_associated_data_unittest.cc
@@ -152,54 +152,4 @@
             GetGoogleVariationID(GOOGLE_WEB_PROPERTIES, "trial", "group"));
 }
 
-// Ensure that two collections can coexist without affecting each other.
-TEST_F(VariationsAssociatedDataTest, CollectionsCoexist) {
-  const std::string default_name = "default";
-  int default_group_number = -1;
-  scoped_refptr<base::FieldTrial> trial_true(
-      CreateFieldTrial("d1", 10, default_name, &default_group_number));
-  ASSERT_EQ(default_group_number, trial_true->group());
-  ASSERT_EQ(default_name, trial_true->group_name());
-
-  EXPECT_EQ(EMPTY_ID,
-            GetIDForTrial(GOOGLE_WEB_PROPERTIES, trial_true.get()));
-  EXPECT_EQ(EMPTY_ID,
-            GetIDForTrial(GOOGLE_WEB_PROPERTIES_TRIGGER, trial_true.get()));
-  EXPECT_EQ(EMPTY_ID,
-            GetIDForTrial(CHROME_SYNC_EVENT_LOGGER, trial_true.get()));
-
-  AssociateGoogleVariationID(GOOGLE_WEB_PROPERTIES, trial_true->trial_name(),
-      default_name, TEST_VALUE_A);
-  EXPECT_EQ(TEST_VALUE_A,
-            GetIDForTrial(GOOGLE_WEB_PROPERTIES, trial_true.get()));
-  EXPECT_EQ(EMPTY_ID,
-            GetIDForTrial(CHROME_SYNC_EVENT_LOGGER, trial_true.get()));
-
-  AssociateGoogleVariationID(CHROME_SYNC_EVENT_LOGGER, trial_true->trial_name(),
-                             default_name, TEST_VALUE_A);
-  EXPECT_EQ(TEST_VALUE_A,
-            GetIDForTrial(GOOGLE_WEB_PROPERTIES, trial_true.get()));
-  EXPECT_EQ(TEST_VALUE_A,
-            GetIDForTrial(CHROME_SYNC_EVENT_LOGGER, trial_true.get()));
-
-  trial_true = CreateFieldTrial("d2", 10, default_name, &default_group_number);
-  ASSERT_EQ(default_group_number, trial_true->group());
-  ASSERT_EQ(default_name, trial_true->group_name());
-
-  AssociateGoogleVariationID(GOOGLE_WEB_PROPERTIES_TRIGGER,
-                             trial_true->trial_name(), default_name,
-                             TEST_VALUE_A);
-  EXPECT_EQ(TEST_VALUE_A,
-            GetIDForTrial(GOOGLE_WEB_PROPERTIES_TRIGGER, trial_true.get()));
-  EXPECT_EQ(EMPTY_ID,
-            GetIDForTrial(CHROME_SYNC_EVENT_LOGGER, trial_true.get()));
-
-  AssociateGoogleVariationID(CHROME_SYNC_EVENT_LOGGER, trial_true->trial_name(),
-                             default_name, TEST_VALUE_A);
-  EXPECT_EQ(TEST_VALUE_A,
-            GetIDForTrial(GOOGLE_WEB_PROPERTIES_TRIGGER, trial_true.get()));
-  EXPECT_EQ(TEST_VALUE_A,
-            GetIDForTrial(CHROME_SYNC_EVENT_LOGGER, trial_true.get()));
-}
-
 }  // namespace variations
diff --git a/components/variations/variations_http_header_provider.cc b/components/variations/variations_http_header_provider.cc
index 6865ef24..24c43fc 100644
--- a/components/variations/variations_http_header_provider.cc
+++ b/components/variations/variations_http_header_provider.cc
@@ -264,10 +264,9 @@
       case GOOGLE_WEB_PROPERTIES_TRIGGER:
         proto.add_trigger_variation_id(entry.first);
         break;
-      case CHROME_SYNC_EVENT_LOGGER:
       case ID_COLLECTION_COUNT:
-        // These cases included to get full enum coverage for switch, so that
-        // new enums introduce compiler warnings. Nothing to do for these.
+        // This case included to get full enum coverage for switch, so that
+        // new enums introduce compiler warnings. Nothing to do for this.
         break;
     }
   }
diff --git a/components/variations/variations_seed_processor.cc b/components/variations/variations_seed_processor.cc
index 58e41585..653cf29 100644
--- a/components/variations/variations_seed_processor.cc
+++ b/components/variations/variations_seed_processor.cc
@@ -55,12 +55,6 @@
                                     experiment.name(),
                                     variation_id);
   }
-  if (experiment.has_chrome_sync_experiment_id()) {
-    const VariationID variation_id =
-        static_cast<VariationID>(experiment.chrome_sync_experiment_id());
-    AssociateGoogleVariationIDForce(CHROME_SYNC_EVENT_LOGGER, trial_name,
-                                    experiment.name(), variation_id);
-  }
 }
 
 // Executes |callback| on every override defined by |experiment|.