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

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

Issue 2462653002: Showing previews UI for Offline Previews (Closed)
Patch Set: fgorski comment 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 275811a4a1cf47db5412207bee0ff20c2beec63c..f1eaa491ab0f7abbae2ee67ddf27e9116eaa0f9b 100644
--- a/chrome/browser/previews/previews_infobar_delegate.cc
+++ b/chrome/browser/previews/previews_infobar_delegate.cc
@@ -113,28 +113,28 @@ base::string16 PreviewsInfoBarDelegate::GetMessageText() const {
int PreviewsInfoBarDelegate::GetButtons() const {
return BUTTON_NONE;
}
base::string16 PreviewsInfoBarDelegate::GetLinkText() const {
return l10n_util::GetStringUTF16(IDS_PREVIEWS_INFOBAR_LINK);
}
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)
web_contents->ReloadLoFiImages();
auto* data_reduction_proxy_settings =
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