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

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

Issue 2860083003: Add timestamp support to the Previews infobar (Closed)
Patch Set: fix copyright dates 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.cc
diff --git a/chrome/browser/previews/previews_infobar_delegate.cc b/chrome/browser/previews/previews_infobar_delegate.cc
index f37679a55693404c4be770b863392d30c37d2faa..a6cb42215d73febde8343b76ee37fc5446aa1b6a 100644
--- a/chrome/browser/previews/previews_infobar_delegate.cc
+++ b/chrome/browser/previews/previews_infobar_delegate.cc
@@ -74,11 +74,20 @@ void PreviewsInfoBarDelegate::Create(
if (infobar_tab_helper->displayed_preview_infobar())
return;
+#if defined(OS_ANDROID)
+ infobars::InfoBar* infobar =
+ infobar_service->AddInfoBar(PreviewsInfoBarDelegate::CreateInfoBar(
+ infobar_service,
+ std::unique_ptr<PreviewsInfoBarDelegate>(new PreviewsInfoBarDelegate(
+ web_contents, infobar_type, is_data_saver_user,
+ on_dismiss_callback))));
+#else
infobars::InfoBar* infobar =
infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
std::unique_ptr<ConfirmInfoBarDelegate>(new PreviewsInfoBarDelegate(
web_contents, infobar_type, is_data_saver_user,
on_dismiss_callback))));
+#endif
if (infobar && (infobar_type == LITE_PAGE || infobar_type == LOFI)) {
auto* data_reduction_proxy_settings =
@@ -179,3 +188,7 @@ bool PreviewsInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
return true;
}
+
+base::string16 PreviewsInfoBarDelegate::GetTimestampText() const {
+ return base::string16();
+}

Powered by Google App Engine
This is Rietveld 408576698