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 #include "chrome/browser/net/net_error_tab_helper.h" | 5 #include "chrome/browser/net/net_error_tab_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/io_thread.h" | 11 #include "chrome/browser/io_thread.h" |
12 #include "chrome/browser/net/dns_probe_service.h" | 12 #include "chrome/browser/net/dns_probe_service.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/common/net/net_error_info.h" | 14 #include "chrome/common/net/net_error_info.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "chrome/common/render_messages.h" | 16 #include "chrome/common/render_messages.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "content/public/browser/render_frame_host.h" | 18 #include "content/public/browser/render_frame_host.h" |
19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
20 | 20 |
21 using chrome_common_net::DnsProbeStatus; | 21 using chrome_common_net::DnsProbeStatus; |
22 using chrome_common_net::DnsProbeStatusToString; | 22 using chrome_common_net::DnsProbeStatusToString; |
23 using content::BrowserContext; | 23 using content::BrowserContext; |
24 using content::BrowserThread; | 24 using content::BrowserThread; |
25 using content::PageTransition; | 25 using ui::PageTransition; |
26 using content::RenderViewHost; | 26 using content::RenderViewHost; |
27 using content::WebContents; | 27 using content::WebContents; |
28 using content::WebContentsObserver; | 28 using content::WebContentsObserver; |
29 | 29 |
30 DEFINE_WEB_CONTENTS_USER_DATA_KEY(chrome_browser_net::NetErrorTabHelper); | 30 DEFINE_WEB_CONTENTS_USER_DATA_KEY(chrome_browser_net::NetErrorTabHelper); |
31 | 31 |
32 namespace chrome_browser_net { | 32 namespace chrome_browser_net { |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 DVLOG(1) << "Sending status " << DnsProbeStatusToString(dns_probe_status_); | 225 DVLOG(1) << "Sending status " << DnsProbeStatusToString(dns_probe_status_); |
226 content::RenderFrameHost* rfh = web_contents()->GetMainFrame(); | 226 content::RenderFrameHost* rfh = web_contents()->GetMainFrame(); |
227 rfh->Send(new ChromeViewMsg_NetErrorInfo(rfh->GetRoutingID(), | 227 rfh->Send(new ChromeViewMsg_NetErrorInfo(rfh->GetRoutingID(), |
228 dns_probe_status_)); | 228 dns_probe_status_)); |
229 | 229 |
230 if (!dns_probe_status_snoop_callback_.is_null()) | 230 if (!dns_probe_status_snoop_callback_.is_null()) |
231 dns_probe_status_snoop_callback_.Run(dns_probe_status_); | 231 dns_probe_status_snoop_callback_.Run(dns_probe_status_); |
232 } | 232 } |
233 | 233 |
234 } // namespace chrome_browser_net | 234 } // namespace chrome_browser_net |
OLD | NEW |