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

Side by Side Diff: chrome/browser/renderer_host/resource_dispatcher_host.h

Issue 385024: Propagate the "first party for cookies" from WebKit through the resource... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 fowards the messages from the 7 // dispatches them to URLRequests. It then fowards 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 int route_id, 135 int route_id,
136 URLRequestContext* request_context); 136 URLRequestContext* request_context);
137 137
138 // Cancels the given request if it still exists. We ignore cancels from the 138 // Cancels the given request if it still exists. We ignore cancels from the
139 // renderer in the event of a download. 139 // renderer in the event of a download.
140 void CancelRequest(int process_unique_id, 140 void CancelRequest(int process_unique_id,
141 int request_id, 141 int request_id,
142 bool from_renderer); 142 bool from_renderer);
143 143
144 // Follows a deferred redirect for the given request. 144 // Follows a deferred redirect for the given request.
145 // new_first_party_for_cookies, if non-empty, is the new cookie policy URL
146 // for the redirected URL. Pass an empty, invalid URL as
147 // new_first_party_for_cookies to indicate that the cookie policy URL
148 // doesn't need changing.
145 void FollowDeferredRedirect(int process_unique_id, 149 void FollowDeferredRedirect(int process_unique_id,
146 int request_id); 150 int request_id,
151 const GURL& new_first_party_for_cookies);
147 152
148 // Returns true if it's ok to send the data. If there are already too many 153 // Returns true if it's ok to send the data. If there are already too many
149 // data messages pending, it pauses the request and returns false. In this 154 // data messages pending, it pauses the request and returns false. In this
150 // case the caller should not send the data. 155 // case the caller should not send the data.
151 bool WillSendData(int process_unique_id, int request_id); 156 bool WillSendData(int process_unique_id, int request_id);
152 157
153 // Pauses or resumes network activity for a particular request. 158 // Pauses or resumes network activity for a particular request.
154 void PauseRequest(int process_unique_id, int request_id, bool pause); 159 void PauseRequest(int process_unique_id, int request_id, bool pause);
155 160
156 // Returns the number of pending requests. This is designed for the unittests 161 // Returns the number of pending requests. This is designed for the unittests
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 void OnSyncLoad(int request_id, 398 void OnSyncLoad(int request_id,
394 const ViewHostMsg_Resource_Request& request_data, 399 const ViewHostMsg_Resource_Request& request_data,
395 IPC::Message* sync_result); 400 IPC::Message* sync_result);
396 void BeginRequest(int request_id, 401 void BeginRequest(int request_id,
397 const ViewHostMsg_Resource_Request& request_data, 402 const ViewHostMsg_Resource_Request& request_data,
398 IPC::Message* sync_result, // only valid for sync 403 IPC::Message* sync_result, // only valid for sync
399 int route_id); // only valid for async 404 int route_id); // only valid for async
400 void OnDataReceivedACK(int request_id); 405 void OnDataReceivedACK(int request_id);
401 void OnUploadProgressACK(int request_id); 406 void OnUploadProgressACK(int request_id);
402 void OnCancelRequest(int request_id); 407 void OnCancelRequest(int request_id);
403 void OnFollowRedirect(int request_id); 408 void OnFollowRedirect(int request_id,
409 const GURL& new_first_party_for_cookies);
404 410
405 // Returns true if the message passed in is a resource related message. 411 // Returns true if the message passed in is a resource related message.
406 static bool IsResourceDispatcherHostMessage(const IPC::Message&); 412 static bool IsResourceDispatcherHostMessage(const IPC::Message&);
407 413
408 PendingRequestList pending_requests_; 414 PendingRequestList pending_requests_;
409 415
410 // A timer that periodically calls UpdateLoadStates while pending_requests_ 416 // A timer that periodically calls UpdateLoadStates while pending_requests_
411 // is not empty. 417 // is not empty.
412 base::RepeatingTimer<ResourceDispatcherHost> update_load_states_timer_; 418 base::RepeatingTimer<ResourceDispatcherHost> update_load_states_timer_;
413 419
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 476
471 // Keeps track of elements blocked by the Privacy Blacklist. 477 // Keeps track of elements blocked by the Privacy Blacklist.
472 chrome::BlockedResponse blocked_; 478 chrome::BlockedResponse blocked_;
473 479
474 static bool g_is_http_prioritization_enabled; 480 static bool g_is_http_prioritization_enabled;
475 481
476 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); 482 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost);
477 }; 483 };
478 484
479 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 485 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | webkit/glue/resource_loader_bridge.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698