| Index: components/error_page/common/localized_error.cc
|
| diff --git a/components/error_page/common/localized_error.cc b/components/error_page/common/localized_error.cc
|
| index ead0a354aeeb9128d4eee2089fc069ac8a1f8447..80dad579b1951d5b89e220d3d0aeed773378a2f1 100644
|
| --- a/components/error_page/common/localized_error.cc
|
| +++ b/components/error_page/common/localized_error.cc
|
| @@ -839,7 +839,7 @@ void LocalizedError::GetStrings(int error_code,
|
| bool is_post,
|
| bool stale_copy_in_cache,
|
| bool can_show_network_diagnostics_dialog,
|
| - OfflinePageStatus offline_page_status,
|
| + bool has_offline_pages,
|
| const std::string& locale,
|
| const std::string& accept_languages,
|
| scoped_ptr<error_page::ErrorPageParams> params,
|
| @@ -1057,26 +1057,16 @@ void LocalizedError::GetStrings(int error_code,
|
| #if defined(OS_ANDROID)
|
| // Offline button will not be provided when we want to show something in the
|
| // cache.
|
| - if (!show_saved_copy_visible) {
|
| - if (offline_page_status == OfflinePageStatus::HAS_OFFLINE_PAGE) {
|
| - base::DictionaryValue* show_offline_copy_button =
|
| - new base::DictionaryValue;
|
| - base::string16 button_text =
|
| - l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_SHOW_OFFLINE_COPY);
|
| - show_offline_copy_button->SetString("msg", button_text);
|
| - error_strings->Set("showOfflineCopyButton", show_offline_copy_button);
|
| - } else if (offline_page_status ==
|
| - OfflinePageStatus::HAS_OTHER_OFFLINE_PAGES) {
|
| - base::DictionaryValue* show_offline_pages_button =
|
| - new base::DictionaryValue;
|
| - base::string16 button_text = l10n_util::GetStringUTF16(
|
| - offline_pages::GetOfflinePageFeatureMode() ==
|
| - offline_pages::FeatureMode::ENABLED_AS_BOOKMARKS
|
| - ? IDS_ERRORPAGES_BUTTON_SHOW_OFFLINE_PAGES_AS_BOOKMARKS
|
| - : IDS_ERRORPAGES_BUTTON_SHOW_OFFLINE_PAGES);
|
| - show_offline_pages_button->SetString("msg", button_text);
|
| - error_strings->Set("showOfflinePagesButton", show_offline_pages_button);
|
| - }
|
| + if (!show_saved_copy_visible && has_offline_pages) {
|
| + base::DictionaryValue* show_offline_pages_button =
|
| + new base::DictionaryValue;
|
| + base::string16 button_text = l10n_util::GetStringUTF16(
|
| + offline_pages::GetOfflinePageFeatureMode() ==
|
| + offline_pages::FeatureMode::ENABLED_AS_BOOKMARKS
|
| + ? IDS_ERRORPAGES_BUTTON_SHOW_OFFLINE_PAGES_AS_BOOKMARKS
|
| + : IDS_ERRORPAGES_BUTTON_SHOW_OFFLINE_PAGES);
|
| + show_offline_pages_button->SetString("msg", button_text);
|
| + error_strings->Set("showOfflinePagesButton", show_offline_pages_button);
|
| }
|
| #endif // defined(OS_ANDROID)
|
|
|
|
|