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

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

Issue 1410343007: Add "SHOW ALL SAVED PAGES" button to offline error page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix after rebase Created 5 years, 1 month 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/net/net_error_tab_helper.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 16 matching lines...) Expand all
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 bool stale_copy_in_cache, 35 bool stale_copy_in_cache,
36 bool can_show_network_diagnostics_dialog, 36 bool can_show_network_diagnostics_dialog,
37 bool has_offline_pages,
37 const std::string& locale, 38 const std::string& locale,
38 const std::string& accept_languages, 39 const std::string& accept_languages,
39 scoped_ptr<error_page::ErrorPageParams> params, 40 scoped_ptr<error_page::ErrorPageParams> params,
40 base::DictionaryValue* strings); 41 base::DictionaryValue* strings);
41 42
42 // Returns a description of the encountered error. 43 // Returns a description of the encountered error.
43 static base::string16 GetErrorDetails(const blink::WebURLError& error, 44 static base::string16 GetErrorDetails(const blink::WebURLError& error,
44 bool is_post); 45 bool is_post);
45 46
46 // Returns true if an error page exists for the specified parameters. 47 // Returns true if an error page exists for the specified parameters.
47 static bool HasStrings(const std::string& error_domain, int error_code); 48 static bool HasStrings(const std::string& error_domain, int error_code);
48 49
49 static const char kHttpErrorDomain[]; 50 static const char kHttpErrorDomain[];
50 51
51 private: 52 private:
52 53
53 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalizedError); 54 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalizedError);
54 }; 55 };
55 56
56 #endif // CHROME_COMMON_LOCALIZED_ERROR_H_ 57 #endif // CHROME_COMMON_LOCALIZED_ERROR_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/net_error_tab_helper.cc ('k') | chrome/common/localized_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698