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

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

Issue 7259019: Move base/values.h into the base namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/extensions/extension_helper.h ('k') | chrome/renderer/print_web_view_helper.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_RENDERER_LOCALIZED_ERROR_H_ 5 #ifndef CHROME_RENDERER_LOCALIZED_ERROR_H_
6 #define CHROME_RENDERER_LOCALIZED_ERROR_H_ 6 #define CHROME_RENDERER_LOCALIZED_ERROR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 12
13 class DictionaryValue;
14 class Extension; 13 class Extension;
15 class GURL; 14 class GURL;
16 15
16 namespace base {
17 class DictionaryValue;
18 }
19
17 namespace WebKit { 20 namespace WebKit {
18 struct WebURLError; 21 struct WebURLError;
19 } 22 }
20 23
21 class LocalizedError { 24 class LocalizedError {
22 public: 25 public:
23 // Fills |error_strings| with values to be used to build an error page used 26 // Fills |error_strings| with values to be used to build an error page used
24 // on HTTP errors, like 404 or connection reset. 27 // on HTTP errors, like 404 or connection reset.
25 static void GetStrings(const WebKit::WebURLError& error, 28 static void GetStrings(const WebKit::WebURLError& error,
26 DictionaryValue* strings); 29 base::DictionaryValue* strings);
27 30
28 // Returns true if an error page exists for the specified parameters. 31 // Returns true if an error page exists for the specified parameters.
29 static bool HasStrings(const std::string& error_domain, int error_code); 32 static bool HasStrings(const std::string& error_domain, int error_code);
30 33
31 // Fills |error_strings| with values to be used to build an error page which 34 // Fills |error_strings| with values to be used to build an error page which
32 // warns against reposting form data. This is special cased because the form 35 // warns against reposting form data. This is special cased because the form
33 // repost "error page" has no real error associated with it, and doesn't have 36 // repost "error page" has no real error associated with it, and doesn't have
34 // enough strings localized to meaningfully fill the net error template. 37 // enough strings localized to meaningfully fill the net error template.
35 static void GetFormRepostStrings(const GURL& display_url, 38 static void GetFormRepostStrings(const GURL& display_url,
36 DictionaryValue* error_strings); 39 base::DictionaryValue* error_strings);
37 40
38 // Fills |error_strings| with values to be used to build an error page used 41 // Fills |error_strings| with values to be used to build an error page used
39 // on HTTP errors, like 404 or connection reset, but using information from 42 // on HTTP errors, like 404 or connection reset, but using information from
40 // the associated |app| in order to make the error page look like it's more 43 // the associated |app| in order to make the error page look like it's more
41 // part of the app. 44 // part of the app.
42 static void GetAppErrorStrings(const WebKit::WebURLError& error, 45 static void GetAppErrorStrings(const WebKit::WebURLError& error,
43 const GURL& display_url, 46 const GURL& display_url,
44 const Extension* app, 47 const Extension* app,
45 DictionaryValue* error_strings); 48 base::DictionaryValue* error_strings);
46 49
47 static const char kHttpErrorDomain[]; 50 static const char kHttpErrorDomain[];
48 51
49 private: 52 private:
50 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalizedError); 53 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalizedError);
51 }; 54 };
52 55
53 #endif // CHROME_RENDERER_LOCALIZED_ERROR_H_ 56 #endif // CHROME_RENDERER_LOCALIZED_ERROR_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/extension_helper.h ('k') | chrome/renderer/print_web_view_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698