Chromium Code Reviews| Index: chrome/browser/net/net_error_tab_helper.h |
| diff --git a/chrome/browser/net/net_error_tab_helper.h b/chrome/browser/net/net_error_tab_helper.h |
| index 45b71843de333833f8e500ee3d841145206a72ef..7f1cb3539598e0162a14f703da9353ecd87ff146 100644 |
| --- a/chrome/browser/net/net_error_tab_helper.h |
| +++ b/chrome/browser/net/net_error_tab_helper.h |
| @@ -13,11 +13,17 @@ |
| #include "base/memory/weak_ptr.h" |
| #include "chrome/browser/net/dns_probe_service.h" |
| #include "chrome/common/features.h" |
| +#include "chrome/common/network_diagnostics.mojom.h" |
| #include "components/error_page/common/net_error_info.h" |
| #include "components/prefs/pref_member.h" |
| +#include "content/public/browser/web_contents_frame_interface_binding.h" |
| #include "content/public/browser/web_contents_observer.h" |
| #include "content/public/browser/web_contents_user_data.h" |
| +namespace content { |
| +class WebContentsInterfaceRegistry; |
|
Sam McNally
2016/09/09 06:08:12
Remove.
Ken Rockot(use gerrit already)
2016/09/09 17:22:27
Done
|
| +} |
| + |
| namespace chrome_browser_net { |
| // A TabHelper that monitors loads for certain types of network errors and |
| @@ -25,7 +31,8 @@ namespace chrome_browser_net { |
| // DnsProbeService whenever a page fails to load with a DNS-related error. |
| class NetErrorTabHelper |
| : public content::WebContentsObserver, |
| - public content::WebContentsUserData<NetErrorTabHelper> { |
| + public content::WebContentsUserData<NetErrorTabHelper>, |
| + public mojom::NetworkDiagnostics { |
| public: |
| enum TestingState { |
| TESTING_DEFAULT, |
| @@ -75,7 +82,6 @@ class NetErrorTabHelper |
| bool OnMessageReceived(const IPC::Message& message, |
| content::RenderFrameHost* render_frame_host) override; |
| - |
| protected: |
| // |contents| is the WebContents of the tab this NetErrorTabHelper is |
| // attached to. |
| @@ -96,8 +102,8 @@ class NetErrorTabHelper |
| void InitializePref(content::WebContents* contents); |
| bool ProbesAllowed() const; |
| - // Sanitizes |url| and shows a dialog for it. |
| - void RunNetworkDiagnostics(const GURL& url); |
| + // mojom::NetworkDiagnostics: |
| + void RunNetworkDiagnostics(const GURL& url) override; |
| // Shows the diagnostics dialog after its been sanitized, virtual for |
| // testing. |
| @@ -111,6 +117,9 @@ class NetErrorTabHelper |
| bool IsFromErrorPage() const; |
| #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| + content::WebContentsFrameInterfaceBinding<mojom::NetworkDiagnostics> |
| + network_diagnostics_binding_; |
| + |
| // True if the last provisional load that started was for an error page. |
| bool is_error_page_; |