Currently we are trying to replace content::ServiceWorkerFetchRequest (used in BackgroundFetch and CacheStorage, not in core service worker code) with mojom::FetchAPIRequest in order to remove codes in content/service_worker/common. However, FetchAPIRequest::headers is base::flat_map<std::string, std::string> and it cannot have custom Compare function though SWFetchRequest has it.
Given that the parameter of mojom::ServiceWorker::DispatchFetchEvent() has been changed from SWFetchEvent to network::ResourceRequest, we may be able to remove SWFetchRequest and mojom::FetchAPIRequest and instead we can use network::ResourseRequest, though it might be heavy lifting.
We need to think of how to move forward.
Context: https://chromium-review.googlesource.com/c/chromium/src/+/1328228/8/content/common/service_worker/service_worker_utils.h#b93
Currently we are trying to replace content::ServiceWorkerFetchRequest (used in BackgroundFetch and CacheStorage, not in core service worker code) with mojom::FetchAPIRequest in order to remove codes in content/service_worker/common. However, FetchAPIRequest::headers is base::flat_map<std::string, std::string> and it cannot have custom Compare function though SWFetchRequest has it.
Given that the parameter of mojom::ServiceWorker::DispatchFetchEvent() has been changed from SWFetchRequest to network::ResourceRequest, we may be able to remove SWFetchRequest and mojom::FetchAPIRequest and instead we can use network::ResourseRequest, though it might be heavy lifting.
We need to think of how to move forward.
Context: https://chromium-review.googlesource.com/c/chromium/src/+/1328228/8/content/common/service_worker/service_worker_utils.h#b93
Comment 1 by shimazu@chromium.org
, Nov 26