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

Unified Diff: chrome/browser/previews/previews_infobar_delegate.h

Issue 2875993002: Converging the two previews type enums (Closed)
Patch Set: megjablon nit 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: chrome/browser/previews/previews_infobar_delegate.h
diff --git a/chrome/browser/previews/previews_infobar_delegate.h b/chrome/browser/previews/previews_infobar_delegate.h
index a7342285914b4783b75ecc380f121516c73cb241..0979c07e2b7efef2d24c351b166d14eea62abf51 100644
--- a/chrome/browser/previews/previews_infobar_delegate.h
+++ b/chrome/browser/previews/previews_infobar_delegate.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/strings/string16.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
+#include "components/previews/core/previews_experiments.h"
namespace content {
class WebContents;
@@ -19,16 +20,6 @@ class WebContents;
// infobar.
class PreviewsInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // The type of the infobar. It controls the strings and what UMA data is
- // recorded for the infobar.
- // TODO(ryansturm): Combine PreviewsInfoBarType with previews::PreviewsType.
- // crbug.com/704335
- enum PreviewsInfoBarType {
- LOFI, // Image placeholders (both server and client implementations).
- LITE_PAGE, // Server-side page rewrite.
- OFFLINE, // Offline copy of the page.
- };
-
typedef base::Callback<void(bool opt_out)> OnDismissPreviewsInfobarCallback;
// Actions on the previews infobar. This enum must remain synchronized with
@@ -49,7 +40,7 @@ class PreviewsInfoBarDelegate : public ConfirmInfoBarDelegate {
// to InfoBarService.
static void Create(
content::WebContents* web_contents,
- PreviewsInfoBarType infobar_type,
+ previews::PreviewsType previews_type,
bool is_data_saver_user,
const OnDismissPreviewsInfobarCallback& on_dismiss_callback);
@@ -62,7 +53,7 @@ class PreviewsInfoBarDelegate : public ConfirmInfoBarDelegate {
private:
PreviewsInfoBarDelegate(
content::WebContents* web_contents,
- PreviewsInfoBarType infobar_type,
+ previews::PreviewsType previews_type,
bool is_data_saver_user,
const OnDismissPreviewsInfobarCallback& on_dismiss_callback);
@@ -74,7 +65,7 @@ class PreviewsInfoBarDelegate : public ConfirmInfoBarDelegate {
int GetButtons() const override;
bool LinkClicked(WindowOpenDisposition disposition) override;
- PreviewsInfoBarType infobar_type_;
+ previews::PreviewsType previews_type_;
mutable PreviewsInfoBarAction infobar_dismissed_action_;
const base::string16 message_text_;

Powered by Google App Engine
This is Rietveld 408576698