Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: chrome/browser/net/net_error_tab_helper.cc

Issue 580133002: Update entry page type to include error pages when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix for unit_tests Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 if (render_frame_host->GetParent()) 102 if (render_frame_host->GetParent())
103 return; 103 return;
104 104
105 is_error_page_ = is_error_page; 105 is_error_page_ = is_error_page;
106 } 106 }
107 107
108 void NetErrorTabHelper::DidCommitProvisionalLoadForFrame( 108 void NetErrorTabHelper::DidCommitProvisionalLoadForFrame(
109 content::RenderFrameHost* render_frame_host, 109 content::RenderFrameHost* render_frame_host,
110 const GURL& url, 110 const GURL& url,
111 bool url_is_unreachable,
111 PageTransition transition_type) { 112 PageTransition transition_type) {
112 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 113 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
113 114
114 if (render_frame_host->GetParent()) 115 if (render_frame_host->GetParent())
115 return; 116 return;
116 117
117 // Resend status every time an error page commits; this is somewhat spammy, 118 // Resend status every time an error page commits; this is somewhat spammy,
118 // but ensures that the status will make it to the real error page, even if 119 // but ensures that the status will make it to the real error page, even if
119 // the link doctor loads a blank intermediate page or the tab switches 120 // the link doctor loads a blank intermediate page or the tab switches
120 // renderer processes. 121 // renderer processes.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698