| 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 d2fcd26a1f28f2cc0a2c5d46c2ab1d82b06948b2..80a84d40a36822f4f0e6267f462465c6fa2df858 100644
|
| --- a/chrome/browser/android/offline_pages/offline_page_tab_helper.cc
|
| +++ b/chrome/browser/android/offline_pages/offline_page_tab_helper.cc
|
| @@ -76,16 +76,18 @@ void OfflinePageTabHelper::DidFinishNavigation(
|
| GURL last_redirect_from_url_copy = last_redirect_from_url_;
|
| last_redirect_from_url_ = GURL();
|
|
|
| - // Skips non-main frame or load failure other than no network.
|
| - if (navigation_handle->GetNetErrorCode() != net::ERR_INTERNET_DISCONNECTED ||
|
| - !navigation_handle->IsInMainFrame()) {
|
| + // Skips non-main frame.
|
| + if (!navigation_handle->IsInMainFrame())
|
| return;
|
| - }
|
|
|
| - // Redirecting to offline version will only take effect when there is no
|
| - // network connection.
|
| - if (!net::NetworkChangeNotifier::IsOffline())
|
| + // Skips load failure other than no network.
|
| + 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 &&
|
| + error_code != net::ERR_PROXY_CONNECTION_FAILED) {
|
| return;
|
| + }
|
|
|
| // On a forward or back transition, don't affect the order of the nav stack.
|
| if (navigation_handle->GetPageTransition() ==
|
|
|