Index: components/previews/core/previews_black_list.cc |
diff --git a/components/previews/core/previews_black_list.cc b/components/previews/core/previews_black_list.cc |
index 3baccd5e3e9fd9a00704f9535eb5d6e941945415..c4f0570d1884a13c7e832d2cb8c7f559eb056e6d 100644 |
--- a/components/previews/core/previews_black_list.cc |
+++ b/components/previews/core/previews_black_list.cc |
@@ -158,6 +158,14 @@ void PreviewsBlackList::ClearBlackListSync(base::Time begin_time, |
DCHECK(thread_checker_.CalledOnValidThread()); |
DCHECK(loaded_); |
DCHECK_LE(begin_time, end_time); |
+ |
+ // Clear last_opt_out_time_ if the period being cleared is larger than the |
+ // short black list timeout and the last time the user opted out was before |
+ // |end_time|. |
+ if (end_time - begin_time > params::SingleOptOutDuration() && |
+ last_opt_out_time_ && last_opt_out_time_.value() < end_time) { |
+ last_opt_out_time_.reset(); |
+ } |
black_list_item_map_.reset(); |
host_indifferent_black_list_item_.reset(); |
loaded_ = false; |