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

Side by Side Diff: chrome/common/localized_error.h

Issue 24503004: Show IDN in error screens (DNS failure etc.) (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | chrome/common/localized_error.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 15 matching lines...) Expand all
26 26
27 class LocalizedError { 27 class LocalizedError {
28 public: 28 public:
29 // Fills |error_strings| with values to be used to build an error page used 29 // Fills |error_strings| with values to be used to build an error page used
30 // on HTTP errors, like 404 or connection reset. 30 // on HTTP errors, like 404 or connection reset.
31 static void GetStrings(int error_code, 31 static void GetStrings(int error_code,
32 const std::string& error_domain, 32 const std::string& error_domain,
33 const GURL& failed_url, 33 const GURL& failed_url,
34 bool is_post, 34 bool is_post,
35 const std::string& locale, 35 const std::string& locale,
36 const std::string& accept_languages,
36 base::DictionaryValue* strings); 37 base::DictionaryValue* strings);
37 38
38 // Returns a description of the encountered error. 39 // Returns a description of the encountered error.
39 static string16 GetErrorDetails(const WebKit::WebURLError& error, 40 static string16 GetErrorDetails(const WebKit::WebURLError& error,
40 bool is_post); 41 bool is_post);
41 42
42 // Returns true if an error page exists for the specified parameters. 43 // Returns true if an error page exists for the specified parameters.
43 static bool HasStrings(const std::string& error_domain, int error_code); 44 static bool HasStrings(const std::string& error_domain, int error_code);
44 45
45 // Fills |error_strings| with values to be used to build an error page used 46 // Fills |error_strings| with values to be used to build an error page used
46 // on HTTP errors, like 404 or connection reset, but using information from 47 // on HTTP errors, like 404 or connection reset, but using information from
47 // the associated |app| in order to make the error page look like it's more 48 // the associated |app| in order to make the error page look like it's more
48 // part of the app. 49 // part of the app.
49 static void GetAppErrorStrings(const GURL& display_url, 50 static void GetAppErrorStrings(const GURL& display_url,
50 const extensions::Extension* app, 51 const extensions::Extension* app,
51 base::DictionaryValue* error_strings); 52 base::DictionaryValue* error_strings);
52 53
53 static const char kHttpErrorDomain[]; 54 static const char kHttpErrorDomain[];
54 55
55 private: 56 private:
56 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalizedError); 57 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalizedError);
57 }; 58 };
58 59
59 #endif // CHROME_COMMON_LOCALIZED_ERROR_H_ 60 #endif // CHROME_COMMON_LOCALIZED_ERROR_H_
OLDNEW
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | chrome/common/localized_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698