RenderFrameImpl: simplify error page handling part2

- Inline DidFailProvisionalLoadInternal to the callsites,
and carefully avoid the logic which is only needed in one place.

- Move EnableViewSourceMode(false) to the most inner method
which is used for error page loading, since we were missing it in
some call paths.

- When committing failed navigation, we use the newly constructed
"failed_request" instead of taking one from the provisional loader.
At some point, there will be no provisional loader to take the
request from, so we might as well switch right now.

Bug: 855189
Change-Id: Idf9eba3c3014c1e68a860ceff6051f1ff576062c
Reviewed-on: https://chromium-review.googlesource.com/c/1332700
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608427}
3 files changed