Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: components/previews/core/previews_black_list.h

Issue 2390773003: Adding a SQL implementation of the backing store for previews opt outs (Closed)
Patch Set: Split black list initialization and construction Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/previews/core/previews_black_list.h
diff --git a/components/previews/core/previews_black_list.h b/components/previews/core/previews_black_list.h
index 40b50d58788e8bb8ca5e0eeb9e8e3c5ff46aa69e..92cc3bccf4995b563d5df2258fc8290dbb638581 100644
--- a/components/previews/core/previews_black_list.h
+++ b/components/previews/core/previews_black_list.h
@@ -39,20 +39,23 @@ class PreviewsBlackListItem;
class PreviewsBlackList {
public:
// |opt_out_store| is the backing store to retrieve and store black list
// information, and can be null. When |opt_out_store| is null, the in-memory
// map will be immediately loaded to empty. If |opt_out_store| is non-null,
// it will be used to load the in-memory map asynchronously.
PreviewsBlackList(std::unique_ptr<PreviewsOptOutStore> opt_out_store,
std::unique_ptr<base::Clock> clock);
~PreviewsBlackList();
+ // Begins loading the black list from the backing store if one was passed in.
+ void Initialize();
+
// Asynchronously adds a new navigation to to the in-memory black list and
// backing store. |opt_out| is whether the user opted out of the preview or
// navigated away from the page without opting out. |type| is only passed to
// the backing store. If the in memory map has reached the max number of hosts
// allowed, and |url| is a new host, a host will be evicted based on recency
// of the hosts most recent opt out.
void AddPreviewNavigation(const GURL& url, bool opt_out, PreviewsType type);
// Synchronously determines if |host_name| should be allowed to show previews.
// If the black list has loaded yet, this will always return false. |type| is

Powered by Google App Engine
This is Rietveld 408576698