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/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" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 } // namespace | 69 } // namespace |
70 | 70 |
71 NetErrorTabHelper::~NetErrorTabHelper() { | 71 NetErrorTabHelper::~NetErrorTabHelper() { |
72 } | 72 } |
73 | 73 |
74 // static | 74 // static |
75 void NetErrorTabHelper::set_state_for_testing(TestingState state) { | 75 void NetErrorTabHelper::set_state_for_testing(TestingState state) { |
76 testing_state_ = state; | 76 testing_state_ = state; |
77 } | 77 } |
78 | 78 |
79 void NetErrorTabHelper::NotifyBrowserReloading() { | |
80 // Record that we're doing a browser side reload on the error page. | |
81 if (is_error_page_) | |
82 chrome_common_net::RecordEvent( | |
83 chrome_common_net::BROWSER_RELOAD_BUTTON_CLICKED_EVENT); | |
mmenke
2014/04/11 19:42:32
+braces.
mmenke
2014/04/11 19:42:32
Does this record F5s? What about right clicking a
Randy Smith (Not in Mondays)
2014/04/14 22:02:13
Whoops :-{. Done.
Randy Smith (Not in Mondays)
2014/04/14 22:02:13
First, the facts: It captures F5, but not right cl
| |
84 } | |
85 | |
79 void NetErrorTabHelper::DidStartProvisionalLoadForFrame( | 86 void NetErrorTabHelper::DidStartProvisionalLoadForFrame( |
80 int64 frame_id, | 87 int64 frame_id, |
81 int64 parent_frame_id, | 88 int64 parent_frame_id, |
82 bool is_main_frame, | 89 bool is_main_frame, |
83 const GURL& validated_url, | 90 const GURL& validated_url, |
84 bool is_error_page, | 91 bool is_error_page, |
85 bool is_iframe_srcdoc, | 92 bool is_iframe_srcdoc, |
86 RenderViewHost* render_view_host) { | 93 RenderViewHost* render_view_host) { |
87 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 94 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
88 | 95 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 DVLOG(1) << "Sending status " << DnsProbeStatusToString(dns_probe_status_); | 225 DVLOG(1) << "Sending status " << DnsProbeStatusToString(dns_probe_status_); |
219 content::RenderFrameHost* rfh = web_contents()->GetMainFrame(); | 226 content::RenderFrameHost* rfh = web_contents()->GetMainFrame(); |
220 rfh->Send(new ChromeViewMsg_NetErrorInfo(rfh->GetRoutingID(), | 227 rfh->Send(new ChromeViewMsg_NetErrorInfo(rfh->GetRoutingID(), |
221 dns_probe_status_)); | 228 dns_probe_status_)); |
222 | 229 |
223 if (!dns_probe_status_snoop_callback_.is_null()) | 230 if (!dns_probe_status_snoop_callback_.is_null()) |
224 dns_probe_status_snoop_callback_.Run(dns_probe_status_); | 231 dns_probe_status_snoop_callback_.Run(dns_probe_status_); |
225 } | 232 } |
226 | 233 |
227 } // namespace chrome_browser_net | 234 } // namespace chrome_browser_net |
OLD | NEW |