#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/common/localized_error.h"
-#include "chrome/common/net/net_error_info.h"
-#include "chrome/renderer/net/net_error_helper_core.h"
+#include "components/error_page/common/net_error_info.h"
+#include "components/error_page/renderer/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 ResourceFetcher;
}
+namespace error_page {
+struct ErrorPageParams;
+}
+
// Listens for NetErrorInfo messages from the NetErrorTabHelper on the
// browser side and updates the error page with more details (currently, just
// DNS probe results) if/when available.
: public content::RenderFrameObserver,
public content::RenderFrameObserverTracker<NetErrorHelper>,
public content::RenderProcessObserver,
- public NetErrorHelperCore::Delegate {
+ public error_page::NetErrorHelperCore::Delegate {
public:
explicit NetErrorHelper(content::RenderFrame* render_view);
- virtual ~NetErrorHelper();
+ ~NetErrorHelper() override;
// Button press notification from error page.
void ReloadButtonPressed();
void MoreButtonPressed();
// RenderFrameObserver implementation.
- virtual void DidStartProvisionalLoad() OVERRIDE;
- virtual void DidCommitProvisionalLoad(bool is_new_navigation) OVERRIDE;
- virtual void DidFinishLoad() OVERRIDE;
- virtual void OnStop() OVERRIDE;
- virtual void WasShown() OVERRIDE;
- virtual void WasHidden() OVERRIDE;
+ void DidStartProvisionalLoad() override;
+ void DidCommitProvisionalLoad(bool is_new_navigation) override;
+ void DidFinishLoad() override;
+ void OnStop() override;
+ void WasShown() override;
+ void WasHidden() override;
// IPC::Listener implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ bool OnMessageReceived(const IPC::Message& message) override;
// RenderProcessObserver implementation.
- virtual void NetworkStateChanged(bool online) OVERRIDE;
+ 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|,
private:
// NetErrorHelperCore::Delegate implementation:
- virtual void GenerateLocalizedErrorPage(
+ void GenerateLocalizedErrorPage(
const blink::WebURLError& error,
bool is_failed_post,
- scoped_ptr<LocalizedError::ErrorPageParams> params,
+ scoped_ptr<error_page::ErrorPageParams> params,
bool* reload_button_shown,
bool* load_stale_button_shown,
- std::string* html) const OVERRIDE;
- virtual void LoadErrorPageInMainFrame(const std::string& html,
- const GURL& failed_url) OVERRIDE;
- virtual void EnablePageHelperFunctions() OVERRIDE;
- virtual void UpdateErrorPage(const blink::WebURLError& error,
- bool is_failed_post) OVERRIDE;
- virtual void FetchNavigationCorrections(
+ std::string* html) const override;
+ void LoadErrorPageInMainFrame(const std::string& html,
+ const GURL& failed_url) override;
+ void EnablePageHelperFunctions() override;
+ void UpdateErrorPage(const blink::WebURLError& error,
+ bool is_failed_post) override;
+ void FetchNavigationCorrections(
const GURL& navigation_correction_url,
- const std::string& navigation_correction_request_body) OVERRIDE;
- virtual void CancelFetchNavigationCorrections() OVERRIDE;
- virtual void SendTrackingRequest(
- const GURL& tracking_url,
- const std::string& tracking_request_body) OVERRIDE;
- virtual void ReloadPage() OVERRIDE;
- virtual void LoadPageFromCache(const GURL& page_url) OVERRIDE;
+ const std::string& navigation_correction_request_body) override;
+ void CancelFetchNavigationCorrections() override;
+ void SendTrackingRequest(const GURL& tracking_url,
+ const std::string& tracking_request_body) override;
+ void ReloadPage() override;
+ void LoadPageFromCache(const GURL& page_url) override;
void OnNetErrorInfo(int status);
void OnSetNavigationCorrectionInfo(const GURL& navigation_correction_url,
scoped_ptr<content::ResourceFetcher> correction_fetcher_;
scoped_ptr<content::ResourceFetcher> tracking_fetcher_;
- scoped_ptr<NetErrorHelperCore> core_;
+ scoped_ptr<error_page::NetErrorHelperCore> core_;
DISALLOW_COPY_AND_ASSIGN(NetErrorHelper);
};