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..13099e5b8cd77a68de4dcd74beceff630d06b268 100644 |
--- a/components/previews/core/previews_black_list.h |
+++ b/components/previews/core/previews_black_list.h |
@@ -52,30 +52,39 @@ class PreviewsBlackList { |
// 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 |
// not used to make this decision. |
bool IsLoadedAndAllowed(const GURL& url, PreviewsType type) const; |
+ // Asynchronously deletes all entries in the in-memory black list. Informs |
+ // the backing store to delete entries between |begin_time| and |end_time|. |
+ // Reloads entries into memory from the backing store. If the embedder passed |
+ // in a null store, resets all history in the in-memory black list. |
tbansal1
2016/10/03 16:48:12
Slightly unclear. May be:
s/|end_time|. Reloads/ |
RyanSturm
2016/10/03 17:23:13
Done.
|
+ void ClearBlackList(base::Time begin_time, base::Time end_time); |
+ |
private: |
// Synchronous version of AddPreviewNavigation method. |
void AddPreviewNavigationSync(const GURL& host_name, |
bool opt_out, |
PreviewsType type); |
// Returns the PreviewsBlackListItem representing |host_name|. If there is no |
// item for |host_name|, returns null. |
PreviewsBlackListItem* GetBlackListItem(const std::string& host_name) const; |
+ // Synchronous version of ClearBlackList method. |
+ void ClearBlackListSync(base::Time begin_time, base::Time end_time); |
+ |
// Returns a new PreviewsBlackListItem representing |host_name|. Adds the new |
// item to the in-memory map. |
PreviewsBlackListItem* CreateBlackListItem(const std::string& host_name); |
// Callback passed to the backing store when loading black list information. |
// Moves the returned map into the in-memory black list and runs any |
// outstanding tasks. |
void LoadBlackListDone(std::unique_ptr<BlackListItemMap> black_list_item_map); |
// Called while waiting for the black list to be loaded from the backing |