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

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

Issue 10830218: Move localized_error from chrome/renderer into chrome/common. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove comment Created 8 years, 4 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/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_RENDERER_LOCALIZED_ERROR_H_
6 #define CHROME_RENDERER_LOCALIZED_ERROR_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/string16.h"
12
13 class GURL;
14
15 namespace base {
16 class DictionaryValue;
17 }
18
19 namespace extensions {
20 class Extension;
21 }
22
23 namespace WebKit {
24 struct WebURLError;
25 }
26
27 class LocalizedError {
28 public:
29 // Fills |error_strings| with values to be used to build an error page used
30 // on HTTP errors, like 404 or connection reset.
31 static void GetStrings(const WebKit::WebURLError& error,
32 base::DictionaryValue* strings);
33
34 // Returns a description of the encountered error.
35 static string16 GetErrorDetails(const WebKit::WebURLError& error);
36
37 // Returns true if an error page exists for the specified parameters.
38 static bool HasStrings(const std::string& error_domain, int error_code);
39
40 // Fills |error_strings| with values to be used to build an error page which
41 // warns against reposting form data. This is special cased because the form
42 // repost "error page" has no real error associated with it, and doesn't have
43 // enough strings localized to meaningfully fill the net error template.
44 static void GetFormRepostStrings(const GURL& display_url,
45 base::DictionaryValue* error_strings);
46
47 // Fills |error_strings| with values to be used to build an error page used
48 // on HTTP errors, like 404 or connection reset, but using information from
49 // the associated |app| in order to make the error page look like it's more
50 // part of the app.
51 static void GetAppErrorStrings(const WebKit::WebURLError& error,
52 const GURL& display_url,
53 const extensions::Extension* app,
54 base::DictionaryValue* error_strings);
55
56 static const char kHttpErrorDomain[];
57
58 private:
59 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalizedError);
60 };
61
62 #endif // CHROME_RENDERER_LOCALIZED_ERROR_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/localized_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698