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

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

Issue 2491803002: Revert "Adding UMA to track previews opt outs and blacklist eligibility" (Closed)
Patch Set: 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 e9151da625cf736a358f815ace26af04524eb465..ad192463f17372ea9b166b89fa643976b99d4584 100644
--- a/components/previews/core/previews_black_list.h
+++ b/components/previews/core/previews_black_list.h
@@ -30,28 +30,6 @@ class Clock;
namespace previews {
class PreviewsBlackListItem;
-enum class PreviewsEligibilityReason {
- // The preview navigation was allowed.
- ALLOWED = 0,
- // The black list was not initialized.
- BLACKLIST_UNAVAILABLE = 1,
- // The black list has not loaded from disk yet.
- BLACKLIST_DATA_NOT_LOADED = 2,
- // The user has opted out of a preview recently.
- USER_RECENTLY_OPTED_OUT = 3,
- // The user has opted out of previews often, and is no longer shown previews
- // on any host.
- USER_BLACKLISTED = 4,
- // The user has opted out of previews on a specific host often, and was not
- // not shown a previews on that host.
- HOST_BLACKLISTED = 5,
- // The network quality estimate is not available.
- NETWORK_QUALITY_UNAVAILABLE = 6,
- // The network was fast enough to not warrant previews.
- NETWORK_NOT_SLOW = 7,
- LAST = 8,
-};
-
// Manages the state of black listed domains for the previews experiment. Loads
// the stored black list from |opt_out_store| and manages an in memory black
// list on the IO thread. Updates to the black list are stored in memory and
@@ -80,10 +58,9 @@ class PreviewsBlackList {
void AddPreviewNavigation(const GURL& url, bool opt_out, PreviewsType type);
// Synchronously determines if |host_name| should be allowed to show previews.
- // Returns the reason the blacklist disallowed the preview, or
- // PreviewsEligibilityReason::ALLOWED if the preview is allowed.
- PreviewsEligibilityReason IsLoadedAndAllowed(const GURL& url,
- PreviewsType type) const;
+ // 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|,
« 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