Avoid showing duplicate closing suggestion cards

This CL cleans all existing message cards if GTS can be shown quickly,
then re-appends them to the end of GTS. These steps are required, since
the internal model resets only when the GTS can't be shown quickly.

Change-Id: I30fce1a2eda27e38a42bf05fd6090be769e40427
Bug: 1043202
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007344
Commit-Queue: Mei Liang <[email protected]>
Reviewed-by: Wei-Yin Chen (陳威尹) <[email protected]>
Cr-Commit-Position: refs/heads/master@{#738434}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 3dc2cb0..8c15055d 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -498,6 +498,8 @@
 #endif  // !OS_CHROMEOS
 
 #if defined(OS_ANDROID)
+const FeatureEntry::FeatureParam kCloseTabSuggestionsStale_Immediate[] = {
+    {"close_tab_suggestions_stale_time_ms", "0"}};
 const FeatureEntry::FeatureParam kCloseTabSuggestionsStale_4Hours[] = {
     {"close_tab_suggestions_stale_time_ms", "14400000"}};
 const FeatureEntry::FeatureParam kCloseTabSuggestionsStale_8Hours[] = {
@@ -505,6 +507,8 @@
 const FeatureEntry::FeatureParam kCloseTabSuggestionsStale_7Days[] = {
     {"close_tab_suggestions_stale_time_ms", "604800000"}};
 const FeatureEntry::FeatureVariation kCloseTabSuggestionsStaleVariations[] = {
+    {"Immediate", kCloseTabSuggestionsStale_Immediate,
+     base::size(kCloseTabSuggestionsStale_Immediate), nullptr},
     {"4 hours", kCloseTabSuggestionsStale_4Hours,
      base::size(kCloseTabSuggestionsStale_4Hours), nullptr},
     {"8 hours", kCloseTabSuggestionsStale_8Hours,