Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4637)

Unified Diff: chrome/common/localized_error.cc

Issue 570253002: Componentize NetErrorHelperCore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Win64 Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/localized_error.cc
diff --git a/chrome/common/localized_error.cc b/chrome/common/localized_error.cc
index 9419243208565bedc6bcd33bc4e97735d6e69a50..22157f5e52396d2cb3d87860afcb514ca75b71d2 100644
--- a/chrome/common/localized_error.cc
+++ b/chrome/common/localized_error.cc
@@ -11,9 +11,10 @@
#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 "components/error_page/common/error_page_params.h"
+#include "components/error_page/common/net_error_info.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_icon_set.h"
#include "extensions/common/manifest_handlers/icons_handler.h"
@@ -490,15 +491,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 +498,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");
@@ -623,7 +615,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);
}

Powered by Google App Engine
This is Rietveld 408576698