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

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

Issue 2225343002: Navigation: move RestoreType and ReloadType into a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [rebase] Created 4 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
« no previous file with comments | « chrome/browser/net/net_error_tab_helper.h ('k') | chrome/browser/net/predictor_tab_helper.h » ('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/logging.h" 8 #include "base/logging.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 if (render_frame_host->GetParent()) 99 if (render_frame_host->GetParent())
100 return; 100 return;
101 render_frame_host->Send( 101 render_frame_host->Send(
102 new ChromeViewMsg_SetCanShowNetworkDiagnosticsDialog( 102 new ChromeViewMsg_SetCanShowNetworkDiagnosticsDialog(
103 render_frame_host->GetRoutingID(), 103 render_frame_host->GetRoutingID(),
104 CanShowNetworkDiagnosticsDialog())); 104 CanShowNetworkDiagnosticsDialog()));
105 } 105 }
106 106
107 void NetErrorTabHelper::DidStartNavigationToPendingEntry( 107 void NetErrorTabHelper::DidStartNavigationToPendingEntry(
108 const GURL& url, 108 const GURL& url,
109 content::NavigationController::ReloadType reload_type) { 109 content::ReloadType reload_type) {
110 DCHECK_CURRENTLY_ON(BrowserThread::UI); 110 DCHECK_CURRENTLY_ON(BrowserThread::UI);
111 111
112 if (!is_error_page_) 112 if (!is_error_page_)
113 return; 113 return;
114 114
115 // Only record reloads. 115 // Only record reloads.
116 if (reload_type != content::NavigationController::NO_RELOAD) { 116 if (reload_type != content::ReloadType::NONE) {
117 error_page::RecordEvent( 117 error_page::RecordEvent(
118 error_page::NETWORK_ERROR_PAGE_BROWSER_INITIATED_RELOAD); 118 error_page::NETWORK_ERROR_PAGE_BROWSER_INITIATED_RELOAD);
119 } 119 }
120 } 120 }
121 121
122 void NetErrorTabHelper::DidStartProvisionalLoadForFrame( 122 void NetErrorTabHelper::DidStartProvisionalLoadForFrame(
123 content::RenderFrameHost* render_frame_host, 123 content::RenderFrameHost* render_frame_host,
124 const GURL& validated_url, 124 const GURL& validated_url,
125 bool is_error_page, 125 bool is_error_page,
126 bool is_iframe_srcdoc) { 126 bool is_iframe_srcdoc) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 bool NetErrorTabHelper::IsFromErrorPage() const { 327 bool NetErrorTabHelper::IsFromErrorPage() const {
328 content::NavigationEntry* entry = 328 content::NavigationEntry* entry =
329 web_contents()->GetController().GetLastCommittedEntry(); 329 web_contents()->GetController().GetLastCommittedEntry();
330 return entry && (entry->GetPageType() == content::PAGE_TYPE_ERROR); 330 return entry && (entry->GetPageType() == content::PAGE_TYPE_ERROR);
331 } 331 }
332 332
333 #endif // BUILDFLAG(ANDROID_JAVA_UI) 333 #endif // BUILDFLAG(ANDROID_JAVA_UI)
334 334
335 } // namespace chrome_browser_net 335 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/net_error_tab_helper.h ('k') | chrome/browser/net/predictor_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698