| Index: chrome/browser/android/offline_pages/offline_page_tab_helper.cc
|
| diff --git a/chrome/browser/android/offline_pages/offline_page_tab_helper.cc b/chrome/browser/android/offline_pages/offline_page_tab_helper.cc
|
| index 9968ee6b77424996c98bbd021da094475c578c89..3b42ab57bca4584b1d9658e263a6b4a108fd2322 100644
|
| --- a/chrome/browser/android/offline_pages/offline_page_tab_helper.cc
|
| +++ b/chrome/browser/android/offline_pages/offline_page_tab_helper.cc
|
| @@ -96,6 +96,11 @@ void OfflinePageTabHelper::DidFinishNavigation(
|
| }
|
| provisional_offline_info_.Clear();
|
|
|
| + // If the offline page has been loaded successfully, nothing more to do.
|
| + net::Error error_code = navigation_handle->GetNetErrorCode();
|
| + if (error_code == net::OK)
|
| + return;
|
| +
|
| // We might be reloading the URL in order to fetch the offline page.
|
| // * If successful, nothing to do.
|
| // * Otherwise, we're hitting error again. Bail out to avoid loop.
|
| @@ -109,7 +114,6 @@ void OfflinePageTabHelper::DidFinishNavigation(
|
| // eventually fail. To handle this, we will reload the page to force the
|
| // offline interception if the error code matches the following list.
|
| // Otherwise, the error page will be shown.
|
| - net::Error error_code = navigation_handle->GetNetErrorCode();
|
| if (error_code != net::ERR_INTERNET_DISCONNECTED &&
|
| error_code != net::ERR_NAME_NOT_RESOLVED &&
|
| error_code != net::ERR_ADDRESS_UNREACHABLE &&
|
|
|