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 "chrome/common/localized_error.h" | 5 #include "chrome/common/localized_error.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/grit/chromium_strings.h" | 17 #include "chrome/grit/chromium_strings.h" |
18 #include "chrome/grit/generated_resources.h" | 18 #include "chrome/grit/generated_resources.h" |
19 #include "chrome/grit/google_chrome_strings.h" | |
mmenke
2015/11/30 23:29:10
Why are these two still needed?
blundell
2015/12/01 11:33:44
There are still strings from them used in this fil
| |
19 #include "components/error_page/common/error_page_params.h" | 20 #include "components/error_page/common/error_page_params.h" |
20 #include "components/error_page/common/net_error_info.h" | 21 #include "components/error_page/common/net_error_info.h" |
22 #include "components/strings/grit/components_chromium_strings.h" | |
23 #include "components/strings/grit/components_google_chrome_strings.h" | |
24 #include "components/strings/grit/components_strings.h" | |
21 #include "components/url_formatter/url_formatter.h" | 25 #include "components/url_formatter/url_formatter.h" |
22 #include "grit/components_chromium_strings.h" | |
23 #include "grit/components_google_chrome_strings.h" | |
24 #include "grit/components_strings.h" | |
25 #include "net/base/escape.h" | 26 #include "net/base/escape.h" |
26 #include "net/base/net_errors.h" | 27 #include "net/base/net_errors.h" |
27 #include "third_party/WebKit/public/platform/WebURLError.h" | 28 #include "third_party/WebKit/public/platform/WebURLError.h" |
28 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
29 #include "ui/base/webui/web_ui_util.h" | 30 #include "ui/base/webui/web_ui_util.h" |
30 | 31 |
31 #if defined(OS_WIN) | 32 #if defined(OS_WIN) |
32 #include "base/win/windows_version.h" | 33 #include "base/win/windows_version.h" |
33 #endif | 34 #endif |
34 | 35 |
35 #if defined(OS_CHROMEOS) | |
36 #include "base/command_line.h" | |
37 #include "chrome/common/chrome_switches.h" | |
38 #endif | |
39 | |
40 using blink::WebURLError; | 36 using blink::WebURLError; |
41 using error_page::OfflinePageStatus; | 37 using error_page::OfflinePageStatus; |
42 | 38 |
43 // Some error pages have no details. | 39 // Some error pages have no details. |
44 const unsigned int kErrorPagesNoDetails = 0; | 40 const unsigned int kErrorPagesNoDetails = 0; |
45 | 41 |
46 namespace { | 42 namespace { |
47 | 43 |
48 static const char kRedirectLoopLearnMoreUrl[] = | 44 static const char kRedirectLoopLearnMoreUrl[] = |
49 "https://support.google.com/chrome/answer/95626"; | 45 "https://support.google.com/chrome/answer/95626"; |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
939 return l10n_util::GetStringUTF16(IDS_ERRORPAGES_DETAILS_UNKNOWN); | 935 return l10n_util::GetStringUTF16(IDS_ERRORPAGES_DETAILS_UNKNOWN); |
940 } | 936 } |
941 | 937 |
942 bool LocalizedError::HasStrings(const std::string& error_domain, | 938 bool LocalizedError::HasStrings(const std::string& error_domain, |
943 int error_code) { | 939 int error_code) { |
944 // Whether or not the there are strings for an error does not depend on | 940 // Whether or not the there are strings for an error does not depend on |
945 // whether or not the page was be generated by a POST, so just claim it was | 941 // whether or not the page was be generated by a POST, so just claim it was |
946 // not. | 942 // not. |
947 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != NULL; | 943 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != NULL; |
948 } | 944 } |
OLD | NEW |