[Autofill] CC Save Integration of StrikeDB v2

Credit card uploads now checks strikes on StrikeDatabase v2 instead of
v1 if it is behind the kAutofillSaveCreditCardUsesStrikeSystem2 flag.

Bug: 884817
Change-Id: I0a7ce95ad728463927826071b5467c72166b5a17
Reviewed-on: https://chromium-review.googlesource.com/c/1385851
Reviewed-by: Sebastien Seguin-Gagnon <[email protected]>
Reviewed-by: Elly Fong-Jones <[email protected]>
Reviewed-by: Eugene But <[email protected]>
Reviewed-by: Jared Saul <[email protected]>
Commit-Queue: Anne Lim <[email protected]>
Cr-Commit-Position: refs/heads/master@{#620536}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 60fb452..2d1f0f8 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2926,6 +2926,13 @@
      kOsAll,
      FEATURE_VALUE_TYPE(
          autofill::features::kAutofillSaveCreditCardUsesStrikeSystem)},
+    {"enable-autofill-save-credit-card-uses-strike-system-v2",
+     flag_descriptions::kEnableAutofillSaveCreditCardUsesStrikeSystemV2Name,
+     flag_descriptions::
+         kEnableAutofillSaveCreditCardUsesStrikeSystemV2Description,
+     kOsAll,
+     FEATURE_VALUE_TYPE(
+         autofill::features::kAutofillSaveCreditCardUsesStrikeSystemV2)},
     {"enable-autofill-send-experiment-ids-in-payments-rpcs",
      flag_descriptions::kEnableAutofillSendExperimentIdsInPaymentsRPCsName,
      flag_descriptions::
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
index e19c905..10fba59 100644
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -889,6 +889,11 @@
     "expiry_milestone": 76
   },
   {
+    "name": "enable-autofill-save-credit-card-uses-strike-system-v2",
+    "owners": [ "[email protected]", "[email protected]" ],
+    "expiry_milestone": 76
+  },
+  {
     "name": "enable-autofill-send-experiment-ids-in-payments-rpcs",
     "owners": [ "[email protected]" ],
     "expiry_milestone": 76
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 68c173a9..db80c18 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -420,6 +420,14 @@
     "If enabled, prevents popping up the credit card offer-to-save prompt if "
     "it has repeatedly been ignored, declined, or failed.";
 
+const char kEnableAutofillSaveCreditCardUsesStrikeSystemV2Name[] =
+    "Enable limit on offering to save the same credit card repeatedly using the"
+    "updated strike system implementation";
+const char kEnableAutofillSaveCreditCardUsesStrikeSystemV2Description[] =
+    "If enabled, uses the updated strike system implementation to prevent"
+    "popping up the credit card offer-to-save prompt if it has repeatedly been"
+    "ignored, declined, or failed.";
+
 const char kEnableAutofillSendExperimentIdsInPaymentsRPCsName[] =
     "Send experiment flag IDs in calls to Google Payments";
 const char kEnableAutofillSendExperimentIdsInPaymentsRPCsDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index f44ed0a38..610dcced 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -272,6 +272,9 @@
 extern const char kEnableAutofillSaveCreditCardUsesStrikeSystemName[];
 extern const char kEnableAutofillSaveCreditCardUsesStrikeSystemDescription[];
 
+extern const char kEnableAutofillSaveCreditCardUsesStrikeSystemV2Name[];
+extern const char kEnableAutofillSaveCreditCardUsesStrikeSystemV2Description[];
+
 extern const char kEnableAutofillToolkitViewsCreditCardDialogsMac[];
 extern const char kEnableAutofillToolkitViewsCreditCardDialogsMacDescription[];