diff options
Diffstat (limited to 'chromium/chrome/common/localized_error.cc')
-rw-r--r-- | chromium/chrome/common/localized_error.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chromium/chrome/common/localized_error.cc b/chromium/chrome/common/localized_error.cc index c78fbf75475..a00cd5b22db 100644 --- a/chromium/chrome/common/localized_error.cc +++ b/chromium/chrome/common/localized_error.cc @@ -35,6 +35,10 @@ #include "base/win/windows_version.h" #endif +#if defined(OS_ANDROID) +#include "components/offline_pages/offline_page_feature.h" +#endif + using error_page::OfflinePageStatus; // Some error pages have no details. @@ -779,8 +783,11 @@ void LocalizedError::GetStrings(int error_code, OfflinePageStatus::HAS_OTHER_OFFLINE_PAGES) { base::DictionaryValue* show_offline_pages_button = new base::DictionaryValue; - base::string16 button_text = - l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_SHOW_OFFLINE_PAGES); + 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); } |