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

Unified Diff: chrome/common/localized_error.cc

Issue 570253002: Componentize NetErrorHelperCore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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
« no previous file with comments | « chrome/common/localized_error.h ('k') | chrome/common/net/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/localized_error.cc
diff --git a/chrome/common/localized_error.cc b/chrome/common/localized_error.cc
index 1d7e2a7a9411d60721771074daf7538da12b0c3d..e786c13870ab90ac2e9a50398b087a3607f5aa90 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"
@@ -499,15 +500,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,
@@ -515,7 +507,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");
@@ -640,7 +632,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);
}
« no previous file with comments | « chrome/common/localized_error.h ('k') | chrome/common/net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698