OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/error_page/common/localized_error.h" | 5 #include "components/error_page/common/localized_error.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/metrics/field_trial.h" | 15 #include "base/metrics/field_trial.h" |
16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
20 #include "base/values.h" | 20 #include "base/values.h" |
21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
22 #include "components/error_page/common/error_page_params.h" | 22 #include "components/error_page/common/error_page_params.h" |
23 #include "components/error_page/common/error_page_switches.h" | 23 #include "components/error_page/common/error_page_switches.h" |
24 #include "components/error_page/common/net_error_info.h" | 24 #include "components/error_page/common/net_error_info.h" |
25 #include "components/strings/grit/components_chromium_strings.h" | 25 #include "components/strings/grit/components_chromium_strings.h" |
26 #include "components/strings/grit/components_google_chrome_strings.h" | |
27 #include "components/strings/grit/components_strings.h" | 26 #include "components/strings/grit/components_strings.h" |
28 #include "components/url_formatter/url_formatter.h" | 27 #include "components/url_formatter/url_formatter.h" |
29 #include "net/base/escape.h" | 28 #include "net/base/escape.h" |
30 #include "net/base/net_errors.h" | 29 #include "net/base/net_errors.h" |
31 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
32 #include "ui/base/webui/web_ui_util.h" | 31 #include "ui/base/webui/web_ui_util.h" |
33 | 32 |
34 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
35 #include "base/win/windows_version.h" | 34 #include "base/win/windows_version.h" |
36 #endif | 35 #endif |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 | 1078 |
1080 bool LocalizedError::HasStrings(const std::string& error_domain, | 1079 bool LocalizedError::HasStrings(const std::string& error_domain, |
1081 int error_code) { | 1080 int error_code) { |
1082 // Whether or not the there are strings for an error does not depend on | 1081 // Whether or not the there are strings for an error does not depend on |
1083 // whether or not the page was be generated by a POST, so just claim it was | 1082 // whether or not the page was be generated by a POST, so just claim it was |
1084 // not. | 1083 // not. |
1085 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr; | 1084 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr; |
1086 } | 1085 } |
1087 | 1086 |
1088 } // namespace error_page | 1087 } // namespace error_page |
OLD | NEW |