Chromium Code Reviews| Index: content/browser/frame_host/navigation_handle_impl.cc |
| diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc |
| index b95c691e3975168323163d65aa0197dbfcc15462..cd75c0ffbc6a252bda93a53090708c90d00ddfdd 100644 |
| --- a/content/browser/frame_host/navigation_handle_impl.cc |
| +++ b/content/browser/frame_host/navigation_handle_impl.cc |
| @@ -18,6 +18,7 @@ |
| #include "content/public/browser/content_browser_client.h" |
| #include "content/public/common/browser_side_navigation_policy.h" |
| #include "content/public/common/content_client.h" |
| +#include "content/public/common/url_constants.h" |
| #include "net/url_request/redirect_info.h" |
| #include "url/gurl.h" |
| #include "url/url_constants.h" |
| @@ -461,7 +462,14 @@ void NavigationHandleImpl::DidCommitNavigation( |
| render_frame_host_ = render_frame_host; |
| is_same_page_ = same_page; |
| - state_ = net_error_code_ == net::OK ? DID_COMMIT : DID_COMMIT_ERROR_PAGE; |
| + // If an error page reloads, net_error_code might be 200 but we still want to |
|
clamy
2016/09/19 11:46:44
nit: no "we" in comments?
jam
2016/09/19 14:19:40
I realize some people think it's unambiguous in so
clamy
2016/09/19 15:27:11
Acknowledged.
|
| + // count it as an error page. |
| + if (params.base_url.spec() == kUnreachableWebDataURL || |
|
clamy
2016/09/19 11:46:44
When we reload the error page, do we know at the s
jam
2016/09/19 14:19:40
It's not known at the start (because the url is th
clamy
2016/09/19 15:27:11
Acknowledged.
|
| + net_error_code_ != net::OK) { |
| + state_ = DID_COMMIT_ERROR_PAGE; |
| + } else { |
| + state_ = DID_COMMIT; |
| + } |
| } |
| NavigationThrottle::ThrottleCheckResult |