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

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

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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
« no previous file with comments | « components/previews/core/BUILD.gn ('k') | components/previews/core/previews_black_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a1e36cc9033a2eb1b403f9cc71dee1e72a1e3508..ad192463f17372ea9b166b89fa643976b99d4584 100644
--- a/components/previews/core/previews_black_list.h
+++ b/components/previews/core/previews_black_list.h
@@ -70,15 +70,14 @@ class PreviewsBlackList {
// Returns a new PreviewsBlackListItem representing |host_name|. Adds the new
// item to |black_list_item_map|.
- static PreviewsBlackListItem* GetOrCreateBlackListItem(
+ static PreviewsBlackListItem* GetOrCreateBlackListItemForMap(
BlackListItemMap* black_list_item_map,
const std::string& host_name);
- // Returns the PreviewsBlackListItem representing |host_name| in
- // |black_list_item_map|. If there is no item for |host_name|, returns null.
- static PreviewsBlackListItem* GetBlackListItem(
- const BlackListItemMap& black_list_item_map,
- const std::string& host_name);
+ // Returns a new PreviewsBlackListItem for the host indifferent black list
+ // that does not consider host name when determining eligibility.
+ static std::unique_ptr<PreviewsBlackListItem>
+ CreateHostIndifferentBlackListItem();
private:
// Synchronous version of AddPreviewNavigation method.
@@ -90,9 +89,11 @@ class PreviewsBlackList {
void ClearBlackListSync(base::Time begin_time, base::Time end_time);
// 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);
+ // Moves the |black_list_item_map| and |host_indifferent_black_list_item| into
+ // the in-memory black list and runs any outstanding tasks.
+ void LoadBlackListDone(
+ std::unique_ptr<BlackListItemMap> black_list_item_map,
+ std::unique_ptr<PreviewsBlackListItem> host_indifferent_black_list_item);
// Called while waiting for the black list to be loaded from the backing
// store.
@@ -103,6 +104,9 @@ class PreviewsBlackList {
// Map maintaining the in-memory black list.
std::unique_ptr<BlackListItemMap> black_list_item_map_;
+ // Host indifferent opt out history.
+ std::unique_ptr<PreviewsBlackListItem> host_indifferent_black_list_item_;
+
// Whether the black list is done being loaded from the backing store.
bool loaded_;
« no previous file with comments | « components/previews/core/BUILD.gn ('k') | components/previews/core/previews_black_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698