OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ |
6 #define CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // a NetErrorHelper IPC. (Used by the DNS probe browser test to know when to | 41 // a NetErrorHelper IPC. (Used by the DNS probe browser test to know when to |
42 // check the error page for updates, instead of polling.) | 42 // check the error page for updates, instead of polling.) |
43 void set_dns_probe_status_snoop_callback_for_testing( | 43 void set_dns_probe_status_snoop_callback_for_testing( |
44 const DnsProbeStatusSnoopCallback& dns_probe_status_snoop_callback) { | 44 const DnsProbeStatusSnoopCallback& dns_probe_status_snoop_callback) { |
45 dns_probe_status_snoop_callback_ = dns_probe_status_snoop_callback; | 45 dns_probe_status_snoop_callback_ = dns_probe_status_snoop_callback; |
46 } | 46 } |
47 | 47 |
48 // content::WebContentsObserver implementation. | 48 // content::WebContentsObserver implementation. |
49 virtual void DidStartNavigationToPendingEntry( | 49 virtual void DidStartNavigationToPendingEntry( |
50 const GURL& url, | 50 const GURL& url, |
51 content::NavigationController::ReloadType reload_type) OVERRIDE; | 51 content::NavigationController::ReloadType reload_type) override; |
52 | 52 |
53 virtual void DidStartProvisionalLoadForFrame( | 53 virtual void DidStartProvisionalLoadForFrame( |
54 content::RenderFrameHost* render_frame_host, | 54 content::RenderFrameHost* render_frame_host, |
55 const GURL& validated_url, | 55 const GURL& validated_url, |
56 bool is_error_page, | 56 bool is_error_page, |
57 bool is_iframe_srcdoc) OVERRIDE; | 57 bool is_iframe_srcdoc) override; |
58 | 58 |
59 virtual void DidCommitProvisionalLoadForFrame( | 59 virtual void DidCommitProvisionalLoadForFrame( |
60 content::RenderFrameHost* render_frame_host, | 60 content::RenderFrameHost* render_frame_host, |
61 const GURL& url, | 61 const GURL& url, |
62 ui::PageTransition transition_type) OVERRIDE; | 62 ui::PageTransition transition_type) override; |
63 | 63 |
64 virtual void DidFailProvisionalLoad( | 64 virtual void DidFailProvisionalLoad( |
65 content::RenderFrameHost* render_frame_host, | 65 content::RenderFrameHost* render_frame_host, |
66 const GURL& validated_url, | 66 const GURL& validated_url, |
67 int error_code, | 67 int error_code, |
68 const base::string16& error_description) OVERRIDE; | 68 const base::string16& error_description) override; |
69 | 69 |
70 protected: | 70 protected: |
71 // |contents| is the WebContents of the tab this NetErrorTabHelper is | 71 // |contents| is the WebContents of the tab this NetErrorTabHelper is |
72 // attached to. | 72 // attached to. |
73 explicit NetErrorTabHelper(content::WebContents* contents); | 73 explicit NetErrorTabHelper(content::WebContents* contents); |
74 virtual void StartDnsProbe(); | 74 virtual void StartDnsProbe(); |
75 virtual void SendInfo(); | 75 virtual void SendInfo(); |
76 void OnDnsProbeFinished(chrome_common_net::DnsProbeStatus result); | 76 void OnDnsProbeFinished(chrome_common_net::DnsProbeStatus result); |
77 | 77 |
78 chrome_common_net::DnsProbeStatus dns_probe_status() const { | 78 chrome_common_net::DnsProbeStatus dns_probe_status() const { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 BooleanPrefMember resolve_errors_with_web_service_; | 111 BooleanPrefMember resolve_errors_with_web_service_; |
112 | 112 |
113 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_; | 113 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_; |
114 | 114 |
115 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper); | 115 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper); |
116 }; | 116 }; |
117 | 117 |
118 } // namespace chrome_browser_net | 118 } // namespace chrome_browser_net |
119 | 119 |
120 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ | 120 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ |
OLD | NEW |