As a first step to loading IPC migration, define URLError (current blink::WebURLError) and LoadCompletionStatus (current content::ResourceRequestCompletionStatus) in services/network/public/interfaces. This should be straightforward because they only contain basic types (integers, string, url, time).
As a first step to loading IPC migration, define URLError (current blink::WebURLError) and LoadCompletionStatus (current content::ResourceRequestCompletionStatus) in services/network/public. This should be straightforward because they only contain basic types (integers, string, url, time).
Do we need multiple error domains? Everything the network stack reports is from the domain "net" (There are DNS probe results, but those errors don't come from net / the network service, though the data to generate them does)
Also, the caller already knows the URL. WebURLError seems more a data structure handy for passing around data in blink and maybe content, rather than something the network service needs to support...Or am I missing something?
Actually, everything blink reports will also be from the domain "net" excluding test cases, after [1] is landed.
According to [2], excluding tests,
A: blink/Source/core/loader/DocumentThreadableLoader.cpp generates kBlinkInternal errors
B: chrome/renderer/net/net_error_helper_core.cc generates kDnsProbe errors
C: content/renderer/render_frame_impl.cc generates kHttpErrors
and [1] will remove A. I will be happy if we can also deprecate B and C. What do you think?
1: https://chromium-review.googlesource.com/c/577470/
2: https://chromium-review.googlesource.com/c/577430/
I'm not sure how we could get rid of C - net doesn't consider HTTP errors to be errors.
The DNS stuff also doesn't come from net, so presumably the network service shouldn't know about those, though suppose there's some fungibility on that one.
It looks after yhirano's changes land the error domain string is used mostly for displaying error string in components/error_page. For example kHttpErrors case in render_frame_impl.cc is an artificial one created on the fly just for displaying error page when empty body is returned with 4xx/5xx errors-- I agree that we can likely just remove the error domain field then.
Response to #3 and #4:
> Do we need multiple error domains? Everything the network stack reports is from the domain "net" (There are DNS probe results, but those errors don't come from net / the network service, though the data to generate them does)
Maybe. I think we need separate domains for web security errors and service worker errors. I'm writing a design doc.
> Also, the caller already knows the URL. WebURLError seems more a data structure handy for passing around data in blink and maybe content, rather than something the network service needs to support...Or am I missing something?
Regardless of the above discussion about domains, I expect we will add more error related properties to CompletionStatus. I'd like to have a URLError? property in CompletionStatus. Separating URL from error is possible, I guess.
Comment 1 by yhirano@chromium.org
, Jul 26 2017