| Index: components/previews/core/previews_decider.h
|
| diff --git a/components/previews/core/previews_decider.h b/components/previews/core/previews_decider.h
|
| index f293c87c1ad0f621e85cf0756f6872cf0c2f6c60..2c518fe3d94fd6460077a25446f4ea825fa15e0b 100644
|
| --- a/components/previews/core/previews_decider.h
|
| +++ b/components/previews/core/previews_decider.h
|
| @@ -7,6 +7,8 @@
|
|
|
| #include "components/previews/core/previews_experiments.h"
|
|
|
| +#include "net/nqe/effective_connection_type.h"
|
| +
|
| namespace net {
|
| class URLRequest;
|
| }
|
| @@ -15,7 +17,19 @@ namespace previews {
|
|
|
| class PreviewsDecider {
|
| public:
|
| - // Whether |request| is allowed to show a preview of |type|.
|
| + // Whether |request| is allowed to show a preview of |type|. If the current
|
| + // ECT is strictly faster than |effective_connection_type_threshold|, the
|
| + // preview will be disallowed; preview types that check network quality before
|
| + // calling ShouldAllowPreviewAtECT should pass in
|
| + // EFFECTIVE_CONNECTION_TYPE_4G.
|
| + virtual bool ShouldAllowPreviewAtECT(
|
| + const net::URLRequest& request,
|
| + PreviewsType type,
|
| + net::EffectiveConnectionType effective_connection_type_threshold)
|
| + const = 0;
|
| +
|
| + // Same as ShouldAllowPreviewAtECT, but uses the previews default
|
| + // EffectiveConnectionType.
|
| virtual bool ShouldAllowPreview(const net::URLRequest& request,
|
| PreviewsType type) const = 0;
|
|
|
|
|