Chromium Code Reviews| 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 9e9c3128834f1f18285c6f305684afff5a210cb1..bf8bfc21340c69b3589acad35225dc4b12249cea 100644 |
| --- a/chrome/renderer/net/net_error_helper.h |
| +++ b/chrome/renderer/net/net_error_helper.h |
| @@ -13,8 +13,10 @@ |
| #include "chrome/renderer/net/net_error_helper_core.h" |
| #include "content/public/renderer/render_frame_observer.h" |
| #include "content/public/renderer/render_frame_observer_tracker.h" |
| +#include "content/public/renderer/render_process_observer.h" |
| class GURL; |
| +class MockableOneShotTimer; |
|
mmenke
2014/03/12 19:02:42
nit: No longer needed.
Elly Fong-Jones
2014/03/12 20:10:53
Done.
|
| namespace content { |
| class ResourceFetcher; |
| @@ -32,6 +34,7 @@ struct WebURLError; |
| class NetErrorHelper |
| : public content::RenderFrameObserver, |
| public content::RenderFrameObserverTracker<NetErrorHelper>, |
| + public content::RenderProcessObserver, |
| public NetErrorHelperCore::Delegate { |
| public: |
| explicit NetErrorHelper(content::RenderFrame* render_view); |
| @@ -46,6 +49,9 @@ class NetErrorHelper |
| // IPC::Listener implementation. |
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| + // RenderProcessObserver implementation. |
| + virtual void NetworkStateChanged(bool online) OVERRIDE; |
| + |
| // Examines |frame| and |error| to see if this is an error worthy of a DNS |
| // probe. If it is, initializes |error_strings| based on |error|, |
| // |is_failed_post|, and |locale| with suitable strings and returns true. |
| @@ -59,6 +65,10 @@ class NetErrorHelper |
| bool is_failed_post, |
| std::string* error_html); |
| + // Returns whether a load for |url| in |frame| should have its error page |
| + // suppressed. |
| + bool ShouldSuppressErrorPage(blink::WebFrame* frame, const GURL& url); |
| + |
| private: |
| // NetErrorHelperCore::Delegate implementation: |
| virtual void GenerateLocalizedErrorPage( |
| @@ -74,6 +84,7 @@ class NetErrorHelper |
| const GURL& navigation_correction_url, |
| const std::string& navigation_correction_request_body) OVERRIDE; |
| virtual void CancelFetchNavigationCorrections() OVERRIDE; |
| + virtual void ReloadPage() OVERRIDE; |
| void OnNetErrorInfo(int status); |
| void OnSetNavigationCorrectionInfo(const GURL& navigation_correction_url, |