Add a flag to enable ActivityTabProvider when handling back press

There are some slight differences between ActivityTabProvider and
ChromeTabbedActivity.getActivityTab, such as the former returns null
while the latter returns a valid when tab switcher layout is visible.
This causes some assertion errors and different behaviors between
control and enable groups.

This CL adds a flag. When enabled, ChromeTabbedActivity will use
ActivityTabProvider when handling back press. This allows us to
further investigate the potential impact when switching to
ActivityTabProvider.

Bug: 1429359
Change-Id: I1ab5ff6116fdacddc18e50274a8371f7a3073538
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4385154
Reviewed-by: Theresa Sullivan <[email protected]>
Commit-Queue: Lijin Shen <[email protected]>
Reviewed-by: Donn Denman <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1124927}
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index a79022e..1f83c8a 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3599,6 +3599,13 @@
     "When enabled, app menu should show 'Mobile site' when showing desktop "
     "site, instead of showing 'Desktop Site' with checkbox";
 
+const char kBackGestureActivityTabProviderName[] =
+    "Back Gesture Refactor (Activity Tab Provider)";
+const char kBackGestureActivityTabProviderDescription[] =
+    "When enabled, ChromeTabActivity will use getActivityTabProvider to "
+    "get current tab, rather than getActivityTab if predictive back gesture"
+    "is disabled.";
+
 const char kBackGestureRefactorActivityAndroidName[] =
     "Back Gesture Refactor (Secondary Activities)";
 const char kBackGestureRefactorActivityAndroidDescription[] =