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

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: properly initialize new ResourceRequest member 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
« no previous file with comments | « no previous file | content/browser/service_worker/foreign_fetch_request_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 1611
1612 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1612 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1613 switches::kEnableExperimentalWebPlatformFeatures)) { 1613 switches::kEnableExperimentalWebPlatformFeatures)) {
1614 ForeignFetchRequestHandler::InitializeHandler( 1614 ForeignFetchRequestHandler::InitializeHandler(
1615 new_request.get(), filter_->service_worker_context(), blob_context, 1615 new_request.get(), filter_->service_worker_context(), blob_context,
1616 child_id, request_data.service_worker_provider_id, 1616 child_id, request_data.service_worker_provider_id,
1617 should_skip_service_worker, 1617 should_skip_service_worker,
1618 request_data.fetch_request_mode, request_data.fetch_credentials_mode, 1618 request_data.fetch_request_mode, request_data.fetch_credentials_mode,
1619 request_data.fetch_redirect_mode, request_data.resource_type, 1619 request_data.fetch_redirect_mode, request_data.resource_type,
1620 request_data.fetch_request_context_type, request_data.fetch_frame_type, 1620 request_data.fetch_request_context_type, request_data.fetch_frame_type,
1621 request_data.request_body); 1621 request_data.request_body, request_data.initiated_in_secure_context);
1622 } 1622 }
1623 1623
1624 // Have the appcache associate its extra info with the request. 1624 // Have the appcache associate its extra info with the request.
1625 AppCacheInterceptor::SetExtraRequestInfo( 1625 AppCacheInterceptor::SetExtraRequestInfo(
1626 new_request.get(), filter_->appcache_service(), child_id, 1626 new_request.get(), filter_->appcache_service(), child_id,
1627 request_data.appcache_host_id, request_data.resource_type, 1627 request_data.appcache_host_id, request_data.resource_type,
1628 request_data.should_reset_appcache); 1628 request_data.should_reset_appcache);
1629 1629
1630 std::unique_ptr<ResourceHandler> handler(CreateResourceHandler( 1630 std::unique_ptr<ResourceHandler> handler(CreateResourceHandler(
1631 new_request.get(), request_data, sync_result, route_id, process_type, 1631 new_request.get(), request_data, sync_result, route_id, process_type,
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); 2693 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id);
2694 response->head.security_info = SerializeSecurityInfo(ssl); 2694 response->head.security_info = SerializeSecurityInfo(ssl);
2695 } 2695 }
2696 2696
2697 CertStore* ResourceDispatcherHostImpl::GetCertStore() { 2697 CertStore* ResourceDispatcherHostImpl::GetCertStore() {
2698 return cert_store_for_testing_ ? cert_store_for_testing_ 2698 return cert_store_for_testing_ ? cert_store_for_testing_
2699 : CertStore::GetInstance(); 2699 : CertStore::GetInstance();
2700 } 2700 }
2701 2701
2702 } // namespace content 2702 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/foreign_fetch_request_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698