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

Unified Diff: content/public/browser/navigation_handle.h

Issue 2345913002: Fix NetErrorTabHelper with PlzNavigate. (Closed)
Patch Set: fix NavigationHandle::IsErrorPage for reloads of error pages 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/navigation_handle.h
diff --git a/content/public/browser/navigation_handle.h b/content/public/browser/navigation_handle.h
index 3118ec61670672698d26d3c394da28a7f7b8de76..3c00e4a10afac5959e7ad7e89b67801980ffcf6d 100644
--- a/content/public/browser/navigation_handle.h
+++ b/content/public/browser/navigation_handle.h
@@ -152,6 +152,8 @@ class CONTENT_EXPORT NavigationHandle {
virtual bool HasCommitted() = 0;
// Whether the navigation resulted in an error page.
+ // Note that if an error page reloads, this will return true even though
+ // GetNetErrorCode will be net::OK.
virtual bool IsErrorPage() = 0;
// Returns the response headers for the request or nullptr if there are none.
@@ -175,7 +177,9 @@ class CONTENT_EXPORT NavigationHandle {
static std::unique_ptr<NavigationHandle> CreateNavigationHandleForTesting(
const GURL& url,
- RenderFrameHost* render_frame_host);
+ RenderFrameHost* render_frame_host,
+ bool committed = false,
+ net::Error error = net::OK);
// Registers a NavigationThrottle for tests. The throttle can
// modify the request, pause the request or cancel the request. This will

Powered by Google App Engine
This is Rietveld 408576698