| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void InitializePref(content::WebContents* contents); | 95 void InitializePref(content::WebContents* contents); |
| 96 bool ProbesAllowed() const; | 96 bool ProbesAllowed() const; |
| 97 | 97 |
| 98 // Sanitizes |url| and shows a dialog for it. | 98 // Sanitizes |url| and shows a dialog for it. |
| 99 void RunNetworkDiagnostics(const GURL& url); | 99 void RunNetworkDiagnostics(const GURL& url); |
| 100 | 100 |
| 101 // Shows the diagnostics dialog after its been sanitized, virtual for | 101 // Shows the diagnostics dialog after its been sanitized, virtual for |
| 102 // testing. | 102 // testing. |
| 103 virtual void RunNetworkDiagnosticsHelper(const std::string& sanitized_url); | 103 virtual void RunNetworkDiagnosticsHelper(const std::string& sanitized_url); |
| 104 | 104 |
| 105 // Relates to offline pages handling. |
| 106 void SetHasOfflinePages(content::RenderFrameHost* render_frame_host); |
| 107 void ShowOfflinePages(); |
| 108 |
| 105 // True if the last provisional load that started was for an error page. | 109 // True if the last provisional load that started was for an error page. |
| 106 bool is_error_page_; | 110 bool is_error_page_; |
| 107 | 111 |
| 108 // True if the helper has seen a main frame page load fail with a DNS error, | 112 // True if the helper has seen a main frame page load fail with a DNS error, |
| 109 // but has not yet seen a new page commit successfully afterwards. | 113 // but has not yet seen a new page commit successfully afterwards. |
| 110 bool dns_error_active_; | 114 bool dns_error_active_; |
| 111 | 115 |
| 112 // True if the helper has seen an error page commit while |dns_error_active_| | 116 // True if the helper has seen an error page commit while |dns_error_active_| |
| 113 // is true. (This should never be true if |dns_error_active_| is false.) | 117 // is true. (This should never be true if |dns_error_active_| is false.) |
| 114 bool dns_error_page_committed_; | 118 bool dns_error_page_committed_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 126 BooleanPrefMember resolve_errors_with_web_service_; | 130 BooleanPrefMember resolve_errors_with_web_service_; |
| 127 | 131 |
| 128 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_; | 132 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_; |
| 129 | 133 |
| 130 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper); | 134 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper); |
| 131 }; | 135 }; |
| 132 | 136 |
| 133 } // namespace chrome_browser_net | 137 } // namespace chrome_browser_net |
| 134 | 138 |
| 135 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ | 139 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ |
| OLD | NEW |