| Index: chrome/browser/previews/previews_infobar_tab_helper.cc
|
| diff --git a/chrome/browser/previews/previews_infobar_tab_helper.cc b/chrome/browser/previews/previews_infobar_tab_helper.cc
|
| index 3083f0c3483687a308b5bbdb2dee1819fabd85ee..e9996064f4762bcce866364e98d4f567fa385d6d 100644
|
| --- a/chrome/browser/previews/previews_infobar_tab_helper.cc
|
| +++ b/chrome/browser/previews/previews_infobar_tab_helper.cc
|
| @@ -29,11 +29,11 @@
|
|
|
| #if defined(OS_ANDROID)
|
| #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h"
|
| +#endif // defined(OS_ANDROID)
|
|
|
| namespace {
|
|
|
| -// Adds the preview navigation to the black list. This method is only used on
|
| -// android currently.
|
| +// Adds the preview navigation to the black list.
|
| void AddPreviewNavigationCallback(content::BrowserContext* browser_context,
|
| const GURL& url,
|
| previews::PreviewsType type,
|
| @@ -48,8 +48,6 @@ void AddPreviewNavigationCallback(content::BrowserContext* browser_context,
|
|
|
| } // namespace
|
|
|
| -#endif // defined(OS_ANDROID)
|
| -
|
| DEFINE_WEB_CONTENTS_USER_DATA_KEY(PreviewsInfoBarTabHelper);
|
|
|
| PreviewsInfoBarTabHelper::~PreviewsInfoBarTabHelper() {
|
| @@ -110,7 +108,7 @@ void PreviewsInfoBarTabHelper::DidFinishNavigation(
|
| data_reduction_proxy_settings &&
|
| data_reduction_proxy_settings->IsDataReductionProxyEnabled(),
|
| base::Bind(&AddPreviewNavigationCallback, browser_context_,
|
| - navigation_handle->GetURL(),
|
| + navigation_handle->GetRedirectChain()[0],
|
| previews::PreviewsType::OFFLINE));
|
| // Don't try to show other infobars if this is an offline preview.
|
| return;
|
| @@ -123,7 +121,9 @@ void PreviewsInfoBarTabHelper::DidFinishNavigation(
|
| PreviewsInfoBarDelegate::Create(
|
| web_contents(), PreviewsInfoBarDelegate::LITE_PAGE,
|
| true /* is_data_saver_user */,
|
| - PreviewsInfoBarDelegate::OnDismissPreviewsInfobarCallback());
|
| + base::Bind(&AddPreviewNavigationCallback, browser_context_,
|
| + navigation_handle->GetRedirectChain()[0],
|
| + previews::PreviewsType::LITE_PAGE));
|
| }
|
| }
|
|
|
|
|