Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 1847383003: CREDENTIAL: Rework the integration with Fetch (2/2) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-serialized
Patch Set: unittest Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/child/request_info.h » ('j') | content/child/web_url_loader_impl_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 1a276f6e2324603ffb1294ccceeb30dcdd6f64e0..f523c3f66b8839e21b04b5fca1bf6dd2a9e2f411 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -73,6 +73,7 @@
#include "content/common/navigation_params.h"
#include "content/common/net/url_request_service_worker_data.h"
#include "content/common/resource_messages.h"
+#include "content/common/resource_request_body.h"
#include "content/common/site_isolation_policy.h"
#include "content/common/ssl_status_serialization.h"
#include "content/common/view_messages.h"
@@ -1595,25 +1596,26 @@ void ResourceDispatcherHostImpl::BeginRequest(
// ServiceWorker for synchronous loads to avoid renderer deadlocks.
const bool should_skip_service_worker =
request_data.skip_service_worker || is_sync_load;
+ scoped_refptr<ResourceRequestBody> body_for_service_worker =
+ request_data.empty_body_in_service_worker ? new ResourceRequestBody()
+ : request_data.request_body;
ServiceWorkerRequestHandler::InitializeHandler(
new_request.get(), filter_->service_worker_context(), blob_context,
child_id, request_data.service_worker_provider_id,
- should_skip_service_worker,
- request_data.fetch_request_mode, request_data.fetch_credentials_mode,
- request_data.fetch_redirect_mode, request_data.resource_type,
- request_data.fetch_request_context_type, request_data.fetch_frame_type,
- request_data.request_body);
+ should_skip_service_worker, request_data.fetch_request_mode,
+ request_data.fetch_credentials_mode, request_data.fetch_redirect_mode,
+ request_data.resource_type, request_data.fetch_request_context_type,
+ request_data.fetch_frame_type, body_for_service_worker);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableExperimentalWebPlatformFeatures)) {
ForeignFetchRequestHandler::InitializeHandler(
new_request.get(), filter_->service_worker_context(), blob_context,
child_id, request_data.service_worker_provider_id,
- should_skip_service_worker,
- request_data.fetch_request_mode, request_data.fetch_credentials_mode,
- request_data.fetch_redirect_mode, request_data.resource_type,
- request_data.fetch_request_context_type, request_data.fetch_frame_type,
- request_data.request_body);
+ should_skip_service_worker, request_data.fetch_request_mode,
+ request_data.fetch_credentials_mode, request_data.fetch_redirect_mode,
+ request_data.resource_type, request_data.fetch_request_context_type,
+ request_data.fetch_frame_type, body_for_service_worker);
}
// Have the appcache associate its extra info with the request.
« no previous file with comments | « no previous file | content/child/request_info.h » ('j') | content/child/web_url_loader_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698