Index: chrome/renderer/net/net_error_helper.h |
diff --git a/chrome/renderer/net/net_error_helper.h b/chrome/renderer/net/net_error_helper.h |
index cb33387e1e19cb9baee021c56909020cf0fc53d3..c87835d4392b7307d0ffd5b3155b2055ce57a4e9 100644 |
--- a/chrome/renderer/net/net_error_helper.h |
+++ b/chrome/renderer/net/net_error_helper.h |
@@ -5,9 +5,16 @@ |
#ifndef CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ |
#define CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ |
+#include <string> |
+ |
#include "chrome/common/net/net_error_info.h" |
-#include "chrome/common/net/net_error_tracker.h" |
#include "content/public/renderer/render_view_observer.h" |
+#include "googleurl/src/gurl.h" |
+#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" |
+ |
+namespace base { |
+class DictionaryValue; |
+} |
namespace WebKit { |
class WebFrame; |
@@ -31,14 +38,36 @@ class NetErrorHelper : public content::RenderViewObserver { |
// IPC::Listener implementation. |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
+ static bool GetErrorStringsForDnsProbe( |
+ WebKit::WebFrame* frame, |
+ const WebKit::WebURLError& error, |
+ bool is_failed_post, |
+ const std::string& locale, |
+ base::DictionaryValue* error_strings); |
+ |
private: |
- void OnNetErrorInfo(int dns_probe_result); |
- void TrackerCallback(NetErrorTracker::DnsErrorPageState state); |
- void UpdateErrorPage(chrome_common_net::DnsProbeResult dns_probe_result); |
+ void OnNetErrorInfo(int status); |
+ void UpdateErrorPage(); |
+ |
+ WebKit::WebURLError GetUpdatedError() const; |
+ |
+ // True if the last provisional load start the helper saw was an error page. |
+ bool is_error_page_; |
+ |
+ // True if the helper has seen a main frame page load fail with a DNS error, |
+ // but has not yet seen a new page load successfully afterwards. |
+ bool dns_error_active_; |
+ |
+ // True if the helper has seen the page finish loading, but has not yet seen |
+ // a new provisional load commit. |
+ bool page_loaded_; |
+ |
+ // The last DnsProbeStatus received from the browser. |
+ chrome_common_net::DnsProbeStatus last_status_; |
+ |
+ // The last main frame error seen by the helper. |
+ WebKit::WebURLError last_error_; |
- NetErrorTracker tracker_; |
- NetErrorTracker::DnsErrorPageState dns_error_page_state_; |
- bool updated_error_page_; |
bool is_failed_post_; |
}; |