#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/common/net/net_error_info.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
-#include "extensions/common/constants.h"
-#include "extensions/common/extension_icon_set.h"
-#include "extensions/common/manifest_handlers/icons_handler.h"
+#include "components/error_page/common/error_page_params.h"
+#include "components/error_page/common/net_error_info.h"
#include "net/base/escape.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "base/win/windows_version.h"
#endif
+#if defined(ENABLE_EXTENSIONS)
+#include "extensions/common/constants.h"
+#include "extensions/common/extension_icon_set.h"
+#include "extensions/common/manifest_handlers/icons_handler.h"
+#endif
+
using blink::WebURLError;
// Some error pages have no details.
IDS_ERRORPAGES_DETAILS_BLOCKED_ENROLLMENT_CHECK_PENDING,
SUGGEST_CHECK_CONNECTION,
},
+ {net::ERR_SSL_FALLBACK_BEYOND_MINIMUM_VERSION,
+ IDS_ERRORPAGES_TITLE_LOAD_FAILED,
+ IDS_ERRORPAGES_HEADING_SSL_FALLBACK_BEYOND_MINIMUM_VERSION,
+ IDS_ERRORPAGES_SUMMARY_SSL_FALLBACK_BEYOND_MINIMUM_VERSION,
+ IDS_ERRORPAGES_DETAILS_SSL_FALLBACK_BEYOND_MINIMUM_VERSION,
+ SUGGEST_NONE,
+ },
+ {net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH,
+ IDS_ERRORPAGES_TITLE_LOAD_FAILED,
+ IDS_ERRORPAGES_HEADING_SSL_VERSION_OR_CIPHER_MISMATCH,
+ IDS_ERRORPAGES_SUMMARY_SSL_VERSION_OR_CIPHER_MISMATCH,
+ IDS_ERRORPAGES_DETAILS_SSL_VERSION_OR_CIPHER_MISMATCH,
+ SUGGEST_NONE,
+ },
};
// Special error page to be used in the case of navigating back to a page
const char LocalizedError::kHttpErrorDomain[] = "http";
-LocalizedError::ErrorPageParams::ErrorPageParams()
- : suggest_reload(false),
- reload_tracking_id(-1),
- search_tracking_id(-1) {
-}
-
-LocalizedError::ErrorPageParams::~ErrorPageParams() {
-}
-
void LocalizedError::GetStrings(int error_code,
const std::string& error_domain,
const GURL& failed_url,
bool show_stale_load_button,
const std::string& locale,
const std::string& accept_languages,
- scoped_ptr<ErrorPageParams> params,
+ scoped_ptr<error_page::ErrorPageParams> params,
base::DictionaryValue* error_strings) {
bool rtl = LocaleIsRTL();
error_strings->SetString("textdirection", rtl ? "rtl" : "ltr");
// If no parameters were provided, use the defaults.
if (!params) {
- params.reset(new ErrorPageParams());
+ params.reset(new error_page::ErrorPageParams());
params->suggest_reload = !!(options.suggestions & SUGGEST_RELOAD);
}
return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != NULL;
}
+#if defined(ENABLE_EXTENSIONS)
void LocalizedError::GetAppErrorStrings(
const GURL& display_url,
const extensions::Extension* app,
error_strings->Set("suggestionsLearnMore", suggest_learn_more);
#endif // defined(OS_CHROMEOS)
}
+#endif