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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2032653003: Limit foreign fetch to only intercept requests made from secure contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 10
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 1610
1611 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1611 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1612 switches::kEnableExperimentalWebPlatformFeatures)) { 1612 switches::kEnableExperimentalWebPlatformFeatures)) {
1613 ForeignFetchRequestHandler::InitializeHandler( 1613 ForeignFetchRequestHandler::InitializeHandler(
1614 new_request.get(), filter_->service_worker_context(), blob_context, 1614 new_request.get(), filter_->service_worker_context(), blob_context,
1615 child_id, request_data.service_worker_provider_id, 1615 child_id, request_data.service_worker_provider_id,
1616 should_skip_service_worker, 1616 should_skip_service_worker,
1617 request_data.fetch_request_mode, request_data.fetch_credentials_mode, 1617 request_data.fetch_request_mode, request_data.fetch_credentials_mode,
1618 request_data.fetch_redirect_mode, request_data.resource_type, 1618 request_data.fetch_redirect_mode, request_data.resource_type,
1619 request_data.fetch_request_context_type, request_data.fetch_frame_type, 1619 request_data.fetch_request_context_type, request_data.fetch_frame_type,
1620 request_data.request_body); 1620 request_data.request_body, request_data.initiated_in_secure_context);
1621 } 1621 }
1622 1622
1623 // Have the appcache associate its extra info with the request. 1623 // Have the appcache associate its extra info with the request.
1624 AppCacheInterceptor::SetExtraRequestInfo( 1624 AppCacheInterceptor::SetExtraRequestInfo(
1625 new_request.get(), filter_->appcache_service(), child_id, 1625 new_request.get(), filter_->appcache_service(), child_id,
1626 request_data.appcache_host_id, request_data.resource_type, 1626 request_data.appcache_host_id, request_data.resource_type,
1627 request_data.should_reset_appcache); 1627 request_data.should_reset_appcache);
1628 1628
1629 std::unique_ptr<ResourceHandler> handler(CreateResourceHandler( 1629 std::unique_ptr<ResourceHandler> handler(CreateResourceHandler(
1630 new_request.get(), request_data, sync_result, route_id, process_type, 1630 new_request.get(), request_data, sync_result, route_id, process_type,
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2690 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); 2690 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id);
2691 response->head.security_info = SerializeSecurityInfo(ssl); 2691 response->head.security_info = SerializeSecurityInfo(ssl);
2692 } 2692 }
2693 2693
2694 CertStore* ResourceDispatcherHostImpl::GetCertStore() { 2694 CertStore* ResourceDispatcherHostImpl::GetCertStore() {
2695 return cert_store_for_testing_ ? cert_store_for_testing_ 2695 return cert_store_for_testing_ ? cert_store_for_testing_
2696 : CertStore::GetInstance(); 2696 : CertStore::GetInstance();
2697 } 2697 }
2698 2698
2699 } // namespace content 2699 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698