Commit 037fa7a4 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Cleaned up handleLoadError:forNavigation: method (code duplication)

Removed code duplication for these calls:
[self loadCompleteWithSuccess:NO forNavigation:navigation];
[self loadErrorInNativeView:error navigationContext:navigationContext];

Bug: None
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ie550a088fefb154c13bc0409eaf7772b1d14b4c4
Reviewed-on: https://chromium-review.googlesource.com/757823Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516086}
parent 7d42428d
......@@ -2944,17 +2944,13 @@ registerLoadRequestForURL:(const GURL&)requestURL
// The wrapper error uses the URL of the error and not the requested URL
// (which can be different in case of a redirect) to match desktop Chrome
// behavior.
NSError* wrapperError = [NSError
errorWithDomain:[error domain]
code:[error code]
error = [NSError
errorWithDomain:error.domain
code:error.code
userInfo:@{
NSURLErrorFailingURLStringErrorKey : [errorURL absoluteString],
NSUnderlyingErrorKey : error
NSURLErrorFailingURLStringErrorKey : errorURL.absoluteString,
NSUnderlyingErrorKey : error,
}];
[self loadCompleteWithSuccess:NO forNavigation:navigation];
[self loadErrorInNativeView:wrapperError
navigationContext:navigationContext];
return;
}
[self loadCompleteWithSuccess:NO forNavigation:navigation];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment