| 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 // Sanitizes |url| and shows a dialog for it. | 99 // Sanitizes |url| and shows a dialog for it. |
| 100 void RunNetworkDiagnostics(const GURL& url); | 100 void RunNetworkDiagnostics(const GURL& url); |
| 101 | 101 |
| 102 // Shows the diagnostics dialog after its been sanitized, virtual for | 102 // Shows the diagnostics dialog after its been sanitized, virtual for |
| 103 // testing. | 103 // testing. |
| 104 virtual void RunNetworkDiagnosticsHelper(const std::string& sanitized_url); | 104 virtual void RunNetworkDiagnosticsHelper(const std::string& sanitized_url); |
| 105 | 105 |
| 106 // Relates to offline pages handling. | 106 // Relates to offline pages handling. |
| 107 #if BUILDFLAG(ANDROID_JAVA_UI) | 107 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 108 void SetOfflinePageInfo(content::RenderFrameHost* render_frame_host, | 108 void SetHasOfflinePages(content::RenderFrameHost* render_frame_host); |
| 109 const GURL& url); | |
| 110 void ShowOfflinePages(); | 109 void ShowOfflinePages(); |
| 111 void LoadOfflineCopy(const GURL& url); | |
| 112 bool IsFromErrorPage() const; | 110 bool IsFromErrorPage() const; |
| 113 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 111 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| 114 | 112 |
| 115 // True if the last provisional load that started was for an error page. | 113 // True if the last provisional load that started was for an error page. |
| 116 bool is_error_page_; | 114 bool is_error_page_; |
| 117 | 115 |
| 118 // True if the helper has seen a main frame page load fail with a DNS error, | 116 // True if the helper has seen a main frame page load fail with a DNS error, |
| 119 // but has not yet seen a new page commit successfully afterwards. | 117 // but has not yet seen a new page commit successfully afterwards. |
| 120 bool dns_error_active_; | 118 bool dns_error_active_; |
| 121 | 119 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 136 BooleanPrefMember resolve_errors_with_web_service_; | 134 BooleanPrefMember resolve_errors_with_web_service_; |
| 137 | 135 |
| 138 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_; | 136 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_; |
| 139 | 137 |
| 140 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper); | 138 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper); |
| 141 }; | 139 }; |
| 142 | 140 |
| 143 } // namespace chrome_browser_net | 141 } // namespace chrome_browser_net |
| 144 | 142 |
| 145 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ | 143 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ |
| OLD | NEW |