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" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/prefs/pref_member.h" | |
15 #include "chrome/browser/net/dns_probe_service.h" | 14 #include "chrome/browser/net/dns_probe_service.h" |
16 #include "chrome/common/features.h" | 15 #include "chrome/common/features.h" |
17 #include "components/error_page/common/net_error_info.h" | 16 #include "components/error_page/common/net_error_info.h" |
| 17 #include "components/prefs/pref_member.h" |
18 #include "content/public/browser/web_contents_observer.h" | 18 #include "content/public/browser/web_contents_observer.h" |
19 #include "content/public/browser/web_contents_user_data.h" | 19 #include "content/public/browser/web_contents_user_data.h" |
20 | 20 |
21 namespace chrome_browser_net { | 21 namespace chrome_browser_net { |
22 | 22 |
23 // A TabHelper that monitors loads for certain types of network errors and | 23 // A TabHelper that monitors loads for certain types of network errors and |
24 // does interesting things with them. Currently, starts DNS probes using the | 24 // does interesting things with them. Currently, starts DNS probes using the |
25 // DnsProbeService whenever a page fails to load with a DNS-related error. | 25 // DnsProbeService whenever a page fails to load with a DNS-related error. |
26 class NetErrorTabHelper | 26 class NetErrorTabHelper |
27 : public content::WebContentsObserver, | 27 : public content::WebContentsObserver, |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 BooleanPrefMember resolve_errors_with_web_service_; | 136 BooleanPrefMember resolve_errors_with_web_service_; |
137 | 137 |
138 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_; | 138 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_; |
139 | 139 |
140 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper); | 140 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper); |
141 }; | 141 }; |
142 | 142 |
143 } // namespace chrome_browser_net | 143 } // namespace chrome_browser_net |
144 | 144 |
145 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ | 145 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ |
OLD | NEW |