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

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

Issue 137463002: RenderFrame: flesh out Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: More fixes Created 6 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/alternate_error_tab_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/io_thread.h" 10 #include "chrome/browser/io_thread.h"
11 #include "chrome/browser/net/dns_probe_service.h" 11 #include "chrome/browser/net/dns_probe_service.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/common/net/net_error_info.h" 13 #include "chrome/common/net/net_error_info.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "chrome/common/render_messages.h" 15 #include "chrome/common/render_messages.h"
16 #include "content/public/browser/browser_thread.h" 16 #include "content/public/browser/browser_thread.h"
17 #include "content/public/browser/render_frame_host.h"
17 #include "net/base/net_errors.h" 18 #include "net/base/net_errors.h"
18 19
19 using chrome_common_net::DnsProbeStatus; 20 using chrome_common_net::DnsProbeStatus;
20 using chrome_common_net::DnsProbeStatusToString; 21 using chrome_common_net::DnsProbeStatusToString;
21 using content::BrowserContext; 22 using content::BrowserContext;
22 using content::BrowserThread; 23 using content::BrowserThread;
23 using content::PageTransition; 24 using content::PageTransition;
24 using content::RenderViewHost; 25 using content::RenderViewHost;
25 using content::WebContents; 26 using content::WebContents;
26 using content::WebContentsObserver; 27 using content::WebContentsObserver;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 209
209 // TODO(ttuttle): Disable on mobile? 210 // TODO(ttuttle): Disable on mobile?
210 return *resolve_errors_with_web_service_; 211 return *resolve_errors_with_web_service_;
211 } 212 }
212 213
213 void NetErrorTabHelper::SendInfo() { 214 void NetErrorTabHelper::SendInfo() {
214 DCHECK_NE(chrome_common_net::DNS_PROBE_POSSIBLE, dns_probe_status_); 215 DCHECK_NE(chrome_common_net::DNS_PROBE_POSSIBLE, dns_probe_status_);
215 DCHECK(dns_error_page_committed_); 216 DCHECK(dns_error_page_committed_);
216 217
217 DVLOG(1) << "Sending status " << DnsProbeStatusToString(dns_probe_status_); 218 DVLOG(1) << "Sending status " << DnsProbeStatusToString(dns_probe_status_);
218 Send(new ChromeViewMsg_NetErrorInfo(routing_id(), dns_probe_status_)); 219 content::RenderFrameHost* rfh = web_contents()->GetMainFrame();
220 rfh->Send(new ChromeViewMsg_NetErrorInfo(rfh->GetRoutingID(),
221 dns_probe_status_));
219 222
220 if (!dns_probe_status_snoop_callback_.is_null()) 223 if (!dns_probe_status_snoop_callback_.is_null())
221 dns_probe_status_snoop_callback_.Run(dns_probe_status_); 224 dns_probe_status_snoop_callback_.Run(dns_probe_status_);
222 } 225 }
223 226
224 } // namespace chrome_browser_net 227 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/alternate_error_tab_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698