Step 1: https://chromium-review.googlesource.com/c/515182/
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/65b46abb94eacb1bfd79113badafb26554a93705 commit 65b46abb94eacb1bfd79113badafb26554a93705 Author: Takeshi Yoshino <tyoshino@chromium.org> Date: Wed May 31 08:20:44 2017 Remove ThreadableLoaderOptions::CrossOriginRequestPolicy This can be replaced with WebURLRequest::FetchRequestMode which is more readable and well corresponds to the spec terms. - Merged the signal indicated by kForcePrelight into fetch_request_mode - Removed lines setting preflight_policy to the default value kConsiderPreflight - Removed preflight_policy from NotificationImageLoader as it's meaningless when the mode is set to NoCORS Bug: 727596 Change-Id: I5da2b549e4e497f371b21f7acee53920e29b3acc Reviewed-on: https://chromium-review.googlesource.com/515182 Reviewed-by: Mike West <mkwst@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Brad Nelson <bradnelson@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org> Cr-Commit-Position: refs/heads/master@{#475845} [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/components/nacl/renderer/ppb_nacl_private_impl.cc [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/content/renderer/fetchers/manifest_fetcher.cc [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/content/renderer/media/android/media_info_loader.cc [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/content/renderer/pepper/pepper_url_loader_host.cc [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/media/blink/resource_multibuffer_data_provider.cc [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/exported/WebAssociatedURLLoaderImpl.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/loader/ThreadableLoader.h [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/modules/eventsource/EventSource.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/modules/fetch/FetchManager.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/web/WebAssociatedURLLoaderImplTest.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/Source/web/tests/WebFrameTest.cpp [modify] https://crrev.com/65b46abb94eacb1bfd79113badafb26554a93705/third_party/WebKit/public/web/WebAssociatedURLLoaderOptions.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5a5c889a2c718b350d82f666280e8ebff3450550 commit 5a5c889a2c718b350d82f666280e8ebff3450550 Author: Takeshi Yoshino <tyoshino@chromium.org> Date: Tue Jun 06 15:45:35 2017 Reduce the number of constructors of ResourceLoaderOptions and FetchParameters - Changed the credentials parameters in the default constructor of ResourceLoaderOptions to match what's done by ResourceFetcher::DefaultResourceOptions() and remove it - Removed the FetchParameters constructor taking charset - Removed the FetchInitiatorInfo related argument from the FetchParameters constructors and let the callers set it to the ResourceLoaderOptions parameter - Let all the users explicitly specify the credentials parameters. They will be cleaned up https://chromium-review.googlesource.com/c/516925/ - Removed the initiator parameter from the ThreadableLoaderOptions - The inconsistent combinations of allow_credentials and credentials_request are left unchanged. To be cleaned up. Bug: 727596 , 695808 Change-Id: I8242b54e057af540a422d16043a3a74d466e7633 Reviewed-on: https://chromium-review.googlesource.com/519123 Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#477299} [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/css/CSSImageValue.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/css/StyleRuleImport.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/dom/ScriptLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/dom/ScriptLoader.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/exported/WebAssociatedURLLoaderImpl.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/html/LinkStyle.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/html/imports/LinkImport.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/DocumentLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/DocumentLoader.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/ImageLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/LinkLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/PingLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/PingLoader.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/ThreadableLoader.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/WorkletScriptLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/loader/resource/ScriptResource.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/svg/SVGUseElement.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/xml/XSLImportRule.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/modules/eventsource/EventSource.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/modules/fetch/FetchManager.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/FetchParameters.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/FetchParameters.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheCorrectnessTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/RawResource.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/ResourceLoaderOptions.h [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/fetch/ResourceLoaderOptionsTest.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/platform/loader/testing/MockResource.cpp [modify] https://crrev.com/5a5c889a2c718b350d82f666280e8ebff3450550/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2e231cf052ca5e68e22baf0008ac9e5e29121707 commit 2e231cf052ca5e68e22baf0008ac9e5e29121707 Author: Takeshi Yoshino <tyoshino@chromium.org> Date: Wed Jun 21 09:00:30 2017 Replace the credentials related parameters in ResourceLoaderOptions with FetchCredentialsMode This has been causing lots of pain in working on the loading code. This patch is for: - code health - architecture improvement - to enable ES6 modules to use the omit credentials mode ResourceLoaderOptions::cors_enabled will be replaced with - cors_handling_by_resource_fetcher - ResourceRequest::FetchRequestMode() as it's been confusing. DocumentThreadableLoader will be refactored to have cors_flag_ which better corresponds to the spec term. Same-origin-ness checking logics are unified from FetchManager, EventSource, XMLHttpRequest into DocumentThreadableLoader. One in FetchParameters::SetCrossOriginAccessControl() will be also unified into ResourceFetcher/ResourceLoader. The logic to handle the unsafe-credentials policy of the Suborigin will be also unified similarly. This patch fixes the issue that Service Workers get incorrect FetchCredentialsMode. DocumentThreadableLoader has been passing the credentials mode based on the determined credentials flag (ResourceRequest::AllowStoredCredentials()). After this patch, the right credentials mode will be passed. Due to this fix, several tests are rebaselined. WebAssociatedURLLoader users are changed to use the credentials mode while trying to fix them if possible based on the corresponding specs, and keep the existing behavior as possible as we can where we cannot fix them. The UMA kXMLHttpRequestCrossOriginWithCredentials in XMLHttpRequest is changed not to take into account the Suborigin policy effect, since to keep it we'll need to keep the complicated useless logic there. FileReaderLoader is changed to just use the default FetchCredentialsMode as it does nothing for Blobs. PingLoader is fixed to use CanRequestNoSuborigin(). WorkerScriptLoader is kept using the same credentials mode while the wrong same-origin-ness check will be fixed by just depending on the DocumentThreadableLoader. NotificationImageLoader is fixed similarly. CORS RFC 1918 logic in DocumentThreadableLoader forces it to issue a preflight for external requests. This was causing same-origin requests to fail due to the unnecessarily performed CORS check. As a side effect of this patch, the issue will be fixed. This is why request-from-popup.html layout test is rebaselined. ModuleScriptLoader now can use the omit credentials mode. See the design doc at https://docs.google.com/document/d/1Iso_WSAUY_KKXWr9X3niEf1eu9Z_o5Gesp_P4xmJRDw/edit# Bug: 717525 , 427429 , 727596 , 695808 Change-Id: I663e40c8385868b6e64fe71248f85f8aff1ae176 Reviewed-on: https://chromium-review.googlesource.com/516925 Reviewed-by: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Bill Budge <bbudge@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org> Cr-Commit-Position: refs/heads/master@{#481152} [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/chrome/browser/chrome_service_worker_browsertest.cc [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/components/nacl/renderer/ppb_nacl_private_impl.cc [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/content/renderer/fetchers/manifest_fetcher.cc [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/content/renderer/media/android/media_info_loader.cc [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/content/renderer/pepper/pepper_url_loader_host.cc [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/media/blink/resource_multibuffer_data_provider.cc [delete] https://crrev.com/acf467f15ce17fcfcd710b663fb86da82fc54140/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-cors-xhr.https-expected.txt [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-iframe.html [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/request-from-popup-expected.txt [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/css/CSSImageValue.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/css/StyleRuleImport.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/dom/ScriptLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/exported/WebAssociatedURLLoaderImpl.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/exported/WebAssociatedURLLoaderImplTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/html/LinkStyle.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/html/imports/LinkImport.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/DocumentLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/ImageLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/LinkLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/PingLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/WorkletScriptLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/private/CrossOriginPreflightResultCache.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/private/CrossOriginPreflightResultCache.h [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/loader/resource/ScriptResource.h [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/svg/SVGUseElement.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/xml/XSLImportRule.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/modules/eventsource/EventSource.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/modules/fetch/FetchManager.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.h [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/FetchParameters.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/FetchParameters.h [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/FetchUtils.h [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheCorrectnessTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/RawResource.h [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/ResourceLoaderOptions.h [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/fetch/ResourceLoaderOptionsTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/platform/loader/testing/MockResource.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/Source/web/tests/WebFrameTest.cpp [modify] https://crrev.com/2e231cf052ca5e68e22baf0008ac9e5e29121707/third_party/WebKit/public/web/WebAssociatedURLLoaderOptions.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f commit 7d5b74f1738443fff936e2d0e5815a26a5aa7b2f Author: Takeshi Yoshino <tyoshino@chromium.org> Date: Wed Jun 28 15:27:07 2017 Remove the FetchRequestMode/FetchCredentialsMode parameters from WebAssociatedURLLoaderOptions and ThreadableLoaderOptions The modes will be set only by directly calling the setters on the ResourceRequest, not via any option struct. Since WebAssociatedURLLoaderOptions, ThreadableLoaderOptions, and ResourceRequest had different default values, there are addition/removal of the setter calls. The default values were: WebAssociatedURLLoaderOptions: - mode: "same-origin" - credentials mode: "omit" ThreadableLoaderOptions: - mode: "same-origin" - credentials mode has already been removed from this class ResourceRequest: - mode: "no-cors" - credentials mode: "include" Bug: 727596 , 695808 Change-Id: Ie0d5e30e673dd60065db5446f85e697c503531e6 Reviewed-on: https://chromium-review.googlesource.com/544399 Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Bill Budge <bbudge@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#482993} [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/components/nacl/renderer/ppb_nacl_private_impl.cc [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/content/public/renderer/associated_resource_fetcher.h [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/content/renderer/fetchers/associated_resource_fetcher_impl.cc [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/content/renderer/fetchers/associated_resource_fetcher_impl.h [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/content/renderer/fetchers/manifest_fetcher.cc [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/content/renderer/pepper/pepper_url_loader_host.cc [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/media/blink/resource_multibuffer_data_provider.cc [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/core/exported/WebAssociatedURLLoaderImpl.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/core/exported/WebAssociatedURLLoaderImplTest.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/core/loader/ThreadableLoader.h [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/modules/eventsource/EventSource.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/modules/fetch/FetchManager.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/Source/web/tests/WebFrameTest.cpp [modify] https://crrev.com/7d5b74f1738443fff936e2d0e5815a26a5aa7b2f/third_party/WebKit/public/web/WebAssociatedURLLoaderOptions.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/71951bfa84aa8bcddbe27eeadd7aae5a4c1ca2e1 commit 71951bfa84aa8bcddbe27eeadd7aae5a4c1ca2e1 Author: Takeshi Yoshino <tyoshino@chromium.org> Date: Mon Jul 31 12:22:50 2017 Simplify FetchManager's CORS preflight flag related logic The logic to determine whether the CORS-preflight fetch is needed for the given request is duplicated in FetchManager and DocumentThreadableLoader. Remove one in FetchManager. This is safe because: - One in FetchManager::Loader::Start() sets the CORS preflight flag for the forbidden header names while one in DocumentThreadableLoader doesn't. - But since all the headers with a forbidden header name are removed by the Headers guard, FetchManager::Loader::Start() never encounter any header with a forbidden header name. Due to Request::Create() on the given |input| in GlobalFetch::Fetch(), UnsafeRequestFlag() is always true in FetchManager::Loader::Start(). So, this in the condition had no effect. Remove it. Bug: 727596 Change-Id: I7f2ddd49b619db067f68128227c7bb42ba16cd23 Reviewed-on: https://chromium-review.googlesource.com/553097 Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#490750} [modify] https://crrev.com/71951bfa84aa8bcddbe27eeadd7aae5a4c1ca2e1/third_party/WebKit/Source/modules/fetch/FetchManager.cpp [modify] https://crrev.com/71951bfa84aa8bcddbe27eeadd7aae5a4c1ca2e1/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp [modify] https://crrev.com/71951bfa84aa8bcddbe27eeadd7aae5a4c1ca2e1/third_party/WebKit/Source/modules/fetch/FetchRequestData.h [modify] https://crrev.com/71951bfa84aa8bcddbe27eeadd7aae5a4c1ca2e1/third_party/WebKit/Source/modules/fetch/Request.cpp
Apologies, applied the wrong component in bulk.
tyoshin: any remaining tasks for this bug?
We now have a simpler set of enums. Thanks to those who worked on the servicification project. I agree that we don't need this issue.
Comment 1 by bugdroid1@chromium.org
, May 31 2017