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

Unified Diff: components/previews/core/previews_io_data.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 side-by-side diff with in-line comments
Download patch
Index: components/previews/core/previews_io_data.h
diff --git a/components/previews/core/previews_io_data.h b/components/previews/core/previews_io_data.h
index f6e85331562eaf47f76ed321e31020e3682036ea..f44fa304736657a5a570a763dd0a906298aec8dd 100644
--- a/components/previews/core/previews_io_data.h
+++ b/components/previews/core/previews_io_data.h
@@ -16,6 +16,7 @@
#include "base/time/time.h"
#include "components/previews/core/previews_decider.h"
#include "components/previews/core/previews_experiments.h"
+#include "net/nqe/effective_connection_type.h"
class GURL;
@@ -42,9 +43,10 @@ class PreviewsIOData : public PreviewsDecider {
// Stores |previews_ui_service| as |previews_ui_service_| and posts a task to
// InitializeOnIOThread on the IO thread.
- void Initialize(base::WeakPtr<PreviewsUIService> previews_ui_service,
- std::unique_ptr<PreviewsOptOutStore> previews_opt_out_store,
- const PreviewsIsEnabledCallback& is_enabled_callback);
+ virtual void Initialize(
+ base::WeakPtr<PreviewsUIService> previews_ui_service,
+ std::unique_ptr<PreviewsOptOutStore> previews_opt_out_store,
+ const PreviewsIsEnabledCallback& is_enabled_callback);
// Adds a navigation to |url| to the black list with result |opt_out|.
void AddPreviewNavigation(const GURL& url, bool opt_out, PreviewsType type);
@@ -59,6 +61,11 @@ class PreviewsIOData : public PreviewsDecider {
// PreviewsDecider implementation:
bool ShouldAllowPreview(const net::URLRequest& request,
PreviewsType type) const override;
+ bool ShouldAllowPreviewAtECT(
+ const net::URLRequest& request,
+ PreviewsType type,
+ net::EffectiveConnectionType effective_connection_type_threshold)
+ const override;
protected:
// Posts a task to SetIOData for |previews_ui_service_| on the UI thread with
« no previous file with comments | « components/previews/core/previews_experiments_unittest.cc ('k') | components/previews/core/previews_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698