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

Side by Side 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, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "content/browser/service_worker/link_header_support.h" 66 #include "content/browser/service_worker/link_header_support.h"
67 #include "content/browser/service_worker/service_worker_request_handler.h" 67 #include "content/browser/service_worker/service_worker_request_handler.h"
68 #include "content/browser/streams/stream.h" 68 #include "content/browser/streams/stream.h"
69 #include "content/browser/streams/stream_context.h" 69 #include "content/browser/streams/stream_context.h"
70 #include "content/browser/streams/stream_registry.h" 70 #include "content/browser/streams/stream_registry.h"
71 #include "content/browser/web_contents/web_contents_impl.h" 71 #include "content/browser/web_contents/web_contents_impl.h"
72 #include "content/common/appcache_interfaces.h" 72 #include "content/common/appcache_interfaces.h"
73 #include "content/common/navigation_params.h" 73 #include "content/common/navigation_params.h"
74 #include "content/common/net/url_request_service_worker_data.h" 74 #include "content/common/net/url_request_service_worker_data.h"
75 #include "content/common/resource_messages.h" 75 #include "content/common/resource_messages.h"
76 #include "content/common/resource_request_body.h"
76 #include "content/common/site_isolation_policy.h" 77 #include "content/common/site_isolation_policy.h"
77 #include "content/common/ssl_status_serialization.h" 78 #include "content/common/ssl_status_serialization.h"
78 #include "content/common/view_messages.h" 79 #include "content/common/view_messages.h"
79 #include "content/public/browser/browser_thread.h" 80 #include "content/public/browser/browser_thread.h"
80 #include "content/public/browser/content_browser_client.h" 81 #include "content/public/browser/content_browser_client.h"
81 #include "content/public/browser/download_manager.h" 82 #include "content/public/browser/download_manager.h"
82 #include "content/public/browser/download_url_parameters.h" 83 #include "content/public/browser/download_url_parameters.h"
83 #include "content/public/browser/global_request_id.h" 84 #include "content/public/browser/global_request_id.h"
84 #include "content/public/browser/plugin_service.h" 85 #include "content/public/browser/plugin_service.h"
85 #include "content/public/browser/resource_dispatcher_host_delegate.h" 86 #include "content/public/browser/resource_dispatcher_host_delegate.h"
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( 1589 storage::BlobProtocolHandler::SetRequestedBlobDataHandle(
1589 new_request.get(), 1590 new_request.get(),
1590 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL( 1591 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL(
1591 new_request->url())); 1592 new_request->url()));
1592 } 1593 }
1593 1594
1594 // Initialize the service worker handler for the request. We don't use 1595 // Initialize the service worker handler for the request. We don't use
1595 // ServiceWorker for synchronous loads to avoid renderer deadlocks. 1596 // ServiceWorker for synchronous loads to avoid renderer deadlocks.
1596 const bool should_skip_service_worker = 1597 const bool should_skip_service_worker =
1597 request_data.skip_service_worker || is_sync_load; 1598 request_data.skip_service_worker || is_sync_load;
1599 scoped_refptr<ResourceRequestBody> body_for_service_worker =
1600 request_data.empty_body_in_service_worker ? new ResourceRequestBody()
1601 : request_data.request_body;
1598 ServiceWorkerRequestHandler::InitializeHandler( 1602 ServiceWorkerRequestHandler::InitializeHandler(
1599 new_request.get(), filter_->service_worker_context(), blob_context, 1603 new_request.get(), filter_->service_worker_context(), blob_context,
1600 child_id, request_data.service_worker_provider_id, 1604 child_id, request_data.service_worker_provider_id,
1601 should_skip_service_worker, 1605 should_skip_service_worker, request_data.fetch_request_mode,
1602 request_data.fetch_request_mode, request_data.fetch_credentials_mode, 1606 request_data.fetch_credentials_mode, request_data.fetch_redirect_mode,
1603 request_data.fetch_redirect_mode, request_data.resource_type, 1607 request_data.resource_type, request_data.fetch_request_context_type,
1604 request_data.fetch_request_context_type, request_data.fetch_frame_type, 1608 request_data.fetch_frame_type, body_for_service_worker);
1605 request_data.request_body);
1606 1609
1607 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1610 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1608 switches::kEnableExperimentalWebPlatformFeatures)) { 1611 switches::kEnableExperimentalWebPlatformFeatures)) {
1609 ForeignFetchRequestHandler::InitializeHandler( 1612 ForeignFetchRequestHandler::InitializeHandler(
1610 new_request.get(), filter_->service_worker_context(), blob_context, 1613 new_request.get(), filter_->service_worker_context(), blob_context,
1611 child_id, request_data.service_worker_provider_id, 1614 child_id, request_data.service_worker_provider_id,
1612 should_skip_service_worker, 1615 should_skip_service_worker, request_data.fetch_request_mode,
1613 request_data.fetch_request_mode, request_data.fetch_credentials_mode, 1616 request_data.fetch_credentials_mode, request_data.fetch_redirect_mode,
1614 request_data.fetch_redirect_mode, request_data.resource_type, 1617 request_data.resource_type, request_data.fetch_request_context_type,
1615 request_data.fetch_request_context_type, request_data.fetch_frame_type, 1618 request_data.fetch_frame_type, body_for_service_worker);
1616 request_data.request_body);
1617 } 1619 }
1618 1620
1619 // Have the appcache associate its extra info with the request. 1621 // Have the appcache associate its extra info with the request.
1620 AppCacheInterceptor::SetExtraRequestInfo( 1622 AppCacheInterceptor::SetExtraRequestInfo(
1621 new_request.get(), filter_->appcache_service(), child_id, 1623 new_request.get(), filter_->appcache_service(), child_id,
1622 request_data.appcache_host_id, request_data.resource_type, 1624 request_data.appcache_host_id, request_data.resource_type,
1623 request_data.should_reset_appcache); 1625 request_data.should_reset_appcache);
1624 1626
1625 scoped_ptr<ResourceHandler> handler( 1627 scoped_ptr<ResourceHandler> handler(
1626 CreateResourceHandler( 1628 CreateResourceHandler(
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); 2688 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id);
2687 response->head.security_info = SerializeSecurityInfo(ssl); 2689 response->head.security_info = SerializeSecurityInfo(ssl);
2688 } 2690 }
2689 2691
2690 CertStore* ResourceDispatcherHostImpl::GetCertStore() { 2692 CertStore* ResourceDispatcherHostImpl::GetCertStore() {
2691 return cert_store_for_testing_ ? cert_store_for_testing_ 2693 return cert_store_for_testing_ ? cert_store_for_testing_
2692 : CertStore::GetInstance(); 2694 : CertStore::GetInstance();
2693 } 2695 }
2694 2696
2695 } // namespace content 2697 } // namespace content
OLDNEW
« 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