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

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

Issue 1608573002: RDH: Block a compromised renderer from reusing request ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 10 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 // 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 int route_id, 429 int route_id,
430 bool cancel_requests); 430 bool cancel_requests);
431 431
432 void OnRequestResource(int routing_id, 432 void OnRequestResource(int routing_id,
433 int request_id, 433 int request_id,
434 const ResourceHostMsg_Request& request_data); 434 const ResourceHostMsg_Request& request_data);
435 void OnSyncLoad(int request_id, 435 void OnSyncLoad(int request_id,
436 const ResourceHostMsg_Request& request_data, 436 const ResourceHostMsg_Request& request_data,
437 IPC::Message* sync_result); 437 IPC::Message* sync_result);
438 438
439 bool IsRequestIDInUse(const GlobalRequestID& id) const;
440
439 // Update the ResourceRequestInfo and internal maps when a request is 441 // Update the ResourceRequestInfo and internal maps when a request is
440 // transferred from one process to another. 442 // transferred from one process to another.
441 void UpdateRequestForTransfer(int child_id, 443 void UpdateRequestForTransfer(int child_id,
442 int route_id, 444 int route_id,
443 int request_id, 445 int request_id,
444 const ResourceHostMsg_Request& request_data, 446 const ResourceHostMsg_Request& request_data,
445 const linked_ptr<ResourceLoader>& loader); 447 const linked_ptr<ResourceLoader>& loader);
446 448
447 void BeginRequest(int request_id, 449 void BeginRequest(int request_id,
448 const ResourceHostMsg_Request& request_data, 450 const ResourceHostMsg_Request& request_data,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 DelegateMap delegate_map_; 613 DelegateMap delegate_map_;
612 614
613 scoped_ptr<ResourceScheduler> scheduler_; 615 scoped_ptr<ResourceScheduler> scheduler_;
614 616
615 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 617 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
616 }; 618 };
617 619
618 } // namespace content 620 } // namespace content
619 621
620 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 622 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698