A tracking issue for misc ResourceResponse improvements.
Currently, ResourceResponse has two major constructor (except for a copy ctor and a ctor for for CrossThreadCopier):
- ResourceResponse() (=> IsNull()==true) and
- ResourceResponse(KURL, mime_type, ...) (=> IsNull()==false).
This issue reduces the use of the default constructor, because in most cases SetURL() is called just after construction, and it is more like the second constructor for non-null ResourceResponse.
If we can enforce the default constructor for intentional null ResourceResponse and the second constructor for non-null ResourceResponse, it would be helpful for removing ResourceResponse::is_null_ and turns ResourseResponse into Optional<ResourseResponse>, unique_ptr<ResourseResponse>, Member<ResourseResponse> or scoped_refptr<ResourseResponse>.
Comment 1 by bugdroid1@chromium.org
, Dec 13 2017