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

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

Issue 2450353005: Revert of Showing previews UI for Offline Previews (Closed)
Patch Set: Created 4 years, 2 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 f1eaa491ab0f7abbae2ee67ddf27e9116eaa0f9b..275811a4a1cf47db5412207bee0ff20c2beec63c 100644
--- a/chrome/browser/previews/previews_infobar_delegate.cc
+++ b/chrome/browser/previews/previews_infobar_delegate.cc
@@ -120,9 +120,11 @@
bool PreviewsInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
RecordPreviewsInfoBarAction(infobar_type_, INFOBAR_LOAD_ORIGINAL_CLICKED);
- content::WebContents* web_contents =
- InfoBarService::WebContentsFromInfoBar(infobar());
+
if (infobar_type_ == LITE_PAGE || infobar_type_ == LOFI) {
+ auto* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
+
if (infobar_type_ == LITE_PAGE)
web_contents->GetController().ReloadDisableLoFi(true);
else if (infobar_type_ == LOFI)
@@ -132,8 +134,6 @@
DataReductionProxyChromeSettingsFactory::GetForBrowserContext(
web_contents->GetBrowserContext());
data_reduction_proxy_settings->IncrementLoFiUserRequestsForImages();
- } else if (infobar_type_ == OFFLINE) {
- web_contents->GetController().Reload(true);
}
return true;

Powered by Google App Engine
This is Rietveld 408576698