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" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } else { | 125 } else { |
126 dns_error_active_ = false; | 126 dns_error_active_ = false; |
127 dns_error_page_committed_ = false; | 127 dns_error_page_committed_ = false; |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
131 void NetErrorTabHelper::DidFailProvisionalLoad( | 131 void NetErrorTabHelper::DidFailProvisionalLoad( |
132 content::RenderFrameHost* render_frame_host, | 132 content::RenderFrameHost* render_frame_host, |
133 const GURL& validated_url, | 133 const GURL& validated_url, |
134 int error_code, | 134 int error_code, |
135 const base::string16& error_description) { | 135 const base::string16& error_description, |
| 136 bool was_ignored_by_handler) { |
136 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 137 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
137 | 138 |
138 if (render_frame_host->GetParent()) | 139 if (render_frame_host->GetParent()) |
139 return; | 140 return; |
140 | 141 |
141 if (IsDnsError(error_code)) { | 142 if (IsDnsError(error_code)) { |
142 dns_error_active_ = true; | 143 dns_error_active_ = true; |
143 OnMainFrameDnsError(); | 144 OnMainFrameDnsError(); |
144 } | 145 } |
145 } | 146 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 DVLOG(1) << "Sending status " << DnsProbeStatusToString(dns_probe_status_); | 226 DVLOG(1) << "Sending status " << DnsProbeStatusToString(dns_probe_status_); |
226 content::RenderFrameHost* rfh = web_contents()->GetMainFrame(); | 227 content::RenderFrameHost* rfh = web_contents()->GetMainFrame(); |
227 rfh->Send(new ChromeViewMsg_NetErrorInfo(rfh->GetRoutingID(), | 228 rfh->Send(new ChromeViewMsg_NetErrorInfo(rfh->GetRoutingID(), |
228 dns_probe_status_)); | 229 dns_probe_status_)); |
229 | 230 |
230 if (!dns_probe_status_snoop_callback_.is_null()) | 231 if (!dns_probe_status_snoop_callback_.is_null()) |
231 dns_probe_status_snoop_callback_.Run(dns_probe_status_); | 232 dns_probe_status_snoop_callback_.Run(dns_probe_status_); |
232 } | 233 } |
233 | 234 |
234 } // namespace chrome_browser_net | 235 } // namespace chrome_browser_net |
OLD | NEW |