| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_COMMON_LOCALIZED_ERROR_H_ | 5 #ifndef CHROME_COMMON_LOCALIZED_ERROR_H_ |
| 6 #define CHROME_COMMON_LOCALIZED_ERROR_H_ | 6 #define CHROME_COMMON_LOCALIZED_ERROR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 } | 30 } |
| 31 | 31 |
| 32 class LocalizedError { | 32 class LocalizedError { |
| 33 public: | 33 public: |
| 34 // Fills |error_strings| with values to be used to build an error page used | 34 // Fills |error_strings| with values to be used to build an error page used |
| 35 // on HTTP errors, like 404 or connection reset. | 35 // on HTTP errors, like 404 or connection reset. |
| 36 static void GetStrings(int error_code, | 36 static void GetStrings(int error_code, |
| 37 const std::string& error_domain, | 37 const std::string& error_domain, |
| 38 const GURL& failed_url, | 38 const GURL& failed_url, |
| 39 bool is_post, | 39 bool is_post, |
| 40 bool show_stale_load_button, | 40 bool stale_copy_in_cache, |
| 41 const std::string& locale, | 41 const std::string& locale, |
| 42 const std::string& accept_languages, | 42 const std::string& accept_languages, |
| 43 scoped_ptr<error_page::ErrorPageParams> params, | 43 scoped_ptr<error_page::ErrorPageParams> params, |
| 44 base::DictionaryValue* strings); | 44 base::DictionaryValue* strings); |
| 45 | 45 |
| 46 // Returns a description of the encountered error. | 46 // Returns a description of the encountered error. |
| 47 static base::string16 GetErrorDetails(const blink::WebURLError& error, | 47 static base::string16 GetErrorDetails(const blink::WebURLError& error, |
| 48 bool is_post); | 48 bool is_post); |
| 49 | 49 |
| 50 // Returns true if an error page exists for the specified parameters. | 50 // Returns true if an error page exists for the specified parameters. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 61 base::DictionaryValue* error_strings); | 61 base::DictionaryValue* error_strings); |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 static const char kHttpErrorDomain[]; | 64 static const char kHttpErrorDomain[]; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalizedError); | 67 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalizedError); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 #endif // CHROME_COMMON_LOCALIZED_ERROR_H_ | 70 #endif // CHROME_COMMON_LOCALIZED_ERROR_H_ |
| OLD | NEW |