| 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" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/prefs/pref_member.h" | 12 #include "base/prefs/pref_member.h" |
| 13 #include "chrome/browser/net/dns_probe_service.h" | 13 #include "chrome/browser/net/dns_probe_service.h" |
| 14 #include "chrome/common/net/net_error_info.h" | 14 #include "components/error_page/common/net_error_info.h" |
| 15 #include "content/public/browser/web_contents_observer.h" | 15 #include "content/public/browser/web_contents_observer.h" |
| 16 #include "content/public/browser/web_contents_user_data.h" | 16 #include "content/public/browser/web_contents_user_data.h" |
| 17 | 17 |
| 18 namespace chrome_browser_net { | 18 namespace chrome_browser_net { |
| 19 | 19 |
| 20 // A TabHelper that monitors loads for certain types of network errors and | 20 // A TabHelper that monitors loads for certain types of network errors and |
| 21 // does interesting things with them. Currently, starts DNS probes using the | 21 // does interesting things with them. Currently, starts DNS probes using the |
| 22 // DnsProbeService whenever a page fails to load with a DNS-related error. | 22 // DnsProbeService whenever a page fails to load with a DNS-related error. |
| 23 class NetErrorTabHelper | 23 class NetErrorTabHelper |
| 24 : public content::WebContentsObserver, | 24 : public content::WebContentsObserver, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // "Use a web service to resolve navigation errors" preference is required | 111 // "Use a web service to resolve navigation errors" preference is required |
| 112 // to allow probes. | 112 // to allow probes. |
| 113 BooleanPrefMember resolve_errors_with_web_service_; | 113 BooleanPrefMember resolve_errors_with_web_service_; |
| 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 |