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

Side by Side Diff: chrome/renderer/net/net_error_helper.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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_NET_NET_ERROR_HELPER_H_ 5 #ifndef CHROME_RENDERER_NET_NET_ERROR_HELPER_H_
6 #define CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ 6 #define CHROME_RENDERER_NET_NET_ERROR_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/common/net/net_error_info.h" 10 #include "chrome/common/net/net_error_info.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // Examines |frame| and |error| to see if this is an error worthy of a DNS 43 // Examines |frame| and |error| to see if this is an error worthy of a DNS
44 // probe. If it is, initializes |error_strings| based on |error|, 44 // probe. If it is, initializes |error_strings| based on |error|,
45 // |is_failed_post|, and |locale| with suitable strings and returns true. 45 // |is_failed_post|, and |locale| with suitable strings and returns true.
46 // If not, returns false, in which case the caller should look up error 46 // If not, returns false, in which case the caller should look up error
47 // strings directly using LocalizedError::GetNavigationErrorStrings. 47 // strings directly using LocalizedError::GetNavigationErrorStrings.
48 static bool GetErrorStringsForDnsProbe( 48 static bool GetErrorStringsForDnsProbe(
49 WebKit::WebFrame* frame, 49 WebKit::WebFrame* frame,
50 const WebKit::WebURLError& error, 50 const WebKit::WebURLError& error,
51 bool is_failed_post, 51 bool is_failed_post,
52 const std::string& locale, 52 const std::string& locale,
53 const std::string& accept_languages,
53 base::DictionaryValue* error_strings); 54 base::DictionaryValue* error_strings);
54 55
55 protected: 56 protected:
56 // These methods handle tracking the actual state of the page; this allows 57 // These methods handle tracking the actual state of the page; this allows
57 // unit-testing of the state tracking without having to mock out WebFrames 58 // unit-testing of the state tracking without having to mock out WebFrames
58 // and such. 59 // and such.
59 void OnStartLoad(bool is_main_frame, bool is_error_page); 60 void OnStartLoad(bool is_main_frame, bool is_error_page);
60 void OnFailLoad(bool is_main_frame, bool is_dns_error); 61 void OnFailLoad(bool is_main_frame, bool is_dns_error);
61 void OnCommitLoad(bool is_main_frame); 62 void OnCommitLoad(bool is_main_frame);
62 void OnFinishLoad(bool is_main_frame); 63 void OnFinishLoad(bool is_main_frame);
(...skipping 29 matching lines...) Expand all
92 // described above. 93 // described above.
93 bool forwarding_probe_results_; 94 bool forwarding_probe_results_;
94 95
95 // The last main frame error seen by the helper. 96 // The last main frame error seen by the helper.
96 WebKit::WebURLError last_error_; 97 WebKit::WebURLError last_error_;
97 98
98 bool is_failed_post_; 99 bool is_failed_post_;
99 }; 100 };
100 101
101 #endif // CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ 102 #endif // CHROME_RENDERER_NET_NET_ERROR_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/net/net_error_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698