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

Side by Side Diff: components/previews/core/previews_black_list.h

Issue 2760063002: Add support to previews/ for Server LoFi and LitePages (Closed)
Patch Set: comment fix Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PREVIEWS_CORE_PREVIEWS_BLACK_LIST_H_ 5 #ifndef COMPONENTS_PREVIEWS_CORE_PREVIEWS_BLACK_LIST_H_
6 #define COMPONENTS_PREVIEWS_CORE_PREVIEWS_BLACK_LIST_H_ 6 #define COMPONENTS_PREVIEWS_CORE_PREVIEWS_BLACK_LIST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // The user has opted out of previews often, and is no longer shown previews 42 // The user has opted out of previews often, and is no longer shown previews
43 // on any host. 43 // on any host.
44 USER_BLACKLISTED = 4, 44 USER_BLACKLISTED = 4,
45 // The user has opted out of previews on a specific host often, and was not 45 // The user has opted out of previews on a specific host often, and was not
46 // not shown a previews on that host. 46 // not shown a previews on that host.
47 HOST_BLACKLISTED = 5, 47 HOST_BLACKLISTED = 5,
48 // The network quality estimate is not available. 48 // The network quality estimate is not available.
49 NETWORK_QUALITY_UNAVAILABLE = 6, 49 NETWORK_QUALITY_UNAVAILABLE = 6,
50 // The network was fast enough to not warrant previews. 50 // The network was fast enough to not warrant previews.
51 NETWORK_NOT_SLOW = 7, 51 NETWORK_NOT_SLOW = 7,
52 // If the page was reloaded, the user should not be shown an offline preview. 52 // If the page was reloaded, the user should not be shown a stale preview.
53 RELOAD_DISALLOWED_FOR_OFFLINE = 8, 53 RELOAD_DISALLOWED = 8,
54 LAST = 9, 54 LAST = 9,
55 }; 55 };
56 56
57 // Manages the state of black listed domains for the previews experiment. Loads 57 // Manages the state of black listed domains for the previews experiment. Loads
58 // the stored black list from |opt_out_store| and manages an in memory black 58 // the stored black list from |opt_out_store| and manages an in memory black
59 // list on the IO thread. Updates to the black list are stored in memory and 59 // list on the IO thread. Updates to the black list are stored in memory and
60 // pushed to the store. Asynchronous modifications are stored in a queue and 60 // pushed to the store. Asynchronous modifications are stored in a queue and
61 // executed in order. Reading from the black list is always synchronous, and if 61 // executed in order. Reading from the black list is always synchronous, and if
62 // the black list is not currently loaded (e.g., at startup, after clearing 62 // the black list is not currently loaded (e.g., at startup, after clearing
63 // browsing history), domains are reported as black listed. The list stores no 63 // browsing history), domains are reported as black listed. The list stores no
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 base::ThreadChecker thread_checker_; 150 base::ThreadChecker thread_checker_;
151 151
152 base::WeakPtrFactory<PreviewsBlackList> weak_factory_; 152 base::WeakPtrFactory<PreviewsBlackList> weak_factory_;
153 153
154 DISALLOW_COPY_AND_ASSIGN(PreviewsBlackList); 154 DISALLOW_COPY_AND_ASSIGN(PreviewsBlackList);
155 }; 155 };
156 156
157 } // namespace previews 157 } // namespace previews
158 158
159 #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_BLACK_LIST_H_ 159 #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_BLACK_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698