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

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

Issue 2235123002: Stop ShouldServiceRequest from running callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/loader/resource_dispatcher_host_impl.cc » ('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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and
7 // dispatches them to URLRequests. It then forwards the messages from the 7 // dispatches them to URLRequests. It then forwards the messages from the
8 // URLRequests back to the correct process for handling. 8 // URLRequests back to the correct process for handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 // The certificate on a ResourceResponse is associated with a 568 // The certificate on a ResourceResponse is associated with a
569 // particular renderer process. As a transfer to a new process 569 // particular renderer process. As a transfer to a new process
570 // completes, the stored certificate has to be updated to reflect the 570 // completes, the stored certificate has to be updated to reflect the
571 // new renderer process. 571 // new renderer process.
572 void UpdateResponseCertificateForTransfer(ResourceResponse* response, 572 void UpdateResponseCertificateForTransfer(ResourceResponse* response,
573 const net::SSLInfo& ssl_info, 573 const net::SSLInfo& ssl_info,
574 int child_id); 574 int child_id);
575 575
576 CertStore* GetCertStore(); 576 CertStore* GetCertStore();
577 577
578 // This enum holds values which indicate how we want to proceed with a
579 // request that is about to be started.
580 enum BeginRequestStatus {
581 CONTINUE = 0, // Continue with the request.
582 ABORT = 1, // Abort.
583 PENDING = 2, // Wait for the decision to come back.
584 LAST_SERVICE_REQUEST_STATUS = PENDING,
585 };
586
587 // Consults the RendererSecurity policy to determine whether the 578 // Consults the RendererSecurity policy to determine whether the
588 // ResourceDispatcherHostImpl should service this request. A request might 579 // ResourceDispatcherHostImpl should service this request. A request might
589 // be disallowed if the renderer is not authorized to retrieve the request 580 // be disallowed if the renderer is not authorized to retrieve the request
590 // URL or if the renderer is attempting to upload an unauthorized file. 581 // URL or if the renderer is attempting to upload an unauthorized file.
591 BeginRequestStatus ShouldServiceRequest( 582 bool ShouldServiceRequest(int process_type,
592 int process_type, 583 int child_id,
593 int child_id, 584 const ResourceRequest& request_data,
594 const ResourceRequest& request_data, 585 const net::HttpRequestHeaders& headers,
595 const net::HttpRequestHeaders& headers, 586 ResourceMessageFilter* filter,
596 ResourceMessageFilter* filter, 587 ResourceContext* resource_context);
597 ResourceContext* resource_context,
598 OnHeaderProcessedCallback callback);
599 588
600 LoaderMap pending_loaders_; 589 LoaderMap pending_loaders_;
601 590
602 // Collection of temp files downloaded for child processes via 591 // Collection of temp files downloaded for child processes via
603 // the download_to_file mechanism. We avoid deleting them until 592 // the download_to_file mechanism. We avoid deleting them until
604 // the client no longer needs them. 593 // the client no longer needs them.
605 typedef std::map<int, scoped_refptr<storage::ShareableFileReference> > 594 typedef std::map<int, scoped_refptr<storage::ShareableFileReference> >
606 DeletableFilesMap; // key is request id 595 DeletableFilesMap; // key is request id
607 typedef std::map<int, DeletableFilesMap> 596 typedef std::map<int, DeletableFilesMap>
608 RegisteredTempFiles; // key is child process id 597 RegisteredTempFiles; // key is child process id
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 682
694 // Used to invoke an interceptor for the HTTP header. 683 // Used to invoke an interceptor for the HTTP header.
695 HeaderInterceptorMap http_header_interceptor_map_; 684 HeaderInterceptorMap http_header_interceptor_map_;
696 685
697 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 686 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
698 }; 687 };
699 688
700 } // namespace content 689 } // namespace content
701 690
702 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 691 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698