Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / common / localized_error.cc
index bfd0b5f..5a969bc 100644 (file)
 #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.
@@ -301,6 +305,20 @@ const LocalizedErrorMap net_error_options[] = {
    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
@@ -490,15 +508,6 @@ const char* GetIconClassForError(const std::string& error_domain,
 
 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,
@@ -506,7 +515,7 @@ void LocalizedError::GetStrings(int error_code,
                                 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");
@@ -631,7 +640,7 @@ void LocalizedError::GetStrings(int error_code,
 
   // 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);
   }
 
@@ -843,6 +852,7 @@ bool LocalizedError::HasStrings(const std::string& error_domain,
   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,
@@ -882,3 +892,4 @@ void LocalizedError::GetAppErrorStrings(
   error_strings->Set("suggestionsLearnMore", suggest_learn_more);
 #endif  // defined(OS_CHROMEOS)
 }
+#endif