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

Side by Side Diff: content/common/resource_messages.h

Issue 398903002: Plumb redirect info out of net, through content, and into child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a TODO Created 6 years, 5 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 | Annotate | Revision Log
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 // IPC messages for resource loading. 5 // IPC messages for resource loading.
6 // 6 //
7 // NOTE: All messages must send an |int request_id| as their first parameter. 7 // NOTE: All messages must send an |int request_id| as their first parameter.
8 8
9 // Multiply-included message file, hence no include guard. 9 // Multiply-included message file, hence no include guard.
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
11 #include "base/process/process.h" 11 #include "base/process/process.h"
12 #include "content/common/content_param_traits_macros.h" 12 #include "content/common/content_param_traits_macros.h"
13 #include "content/common/resource_request_body.h" 13 #include "content/common/resource_request_body.h"
14 #include "content/public/common/common_param_traits.h" 14 #include "content/public/common/common_param_traits.h"
15 #include "content/public/common/resource_response.h" 15 #include "content/public/common/resource_response.h"
16 #include "ipc/ipc_message_macros.h" 16 #include "ipc/ipc_message_macros.h"
17 #include "net/base/request_priority.h" 17 #include "net/base/request_priority.h"
18 #include "net/http/http_response_info.h" 18 #include "net/http/http_response_info.h"
19 #include "net/url_request/redirect_info.h"
19 20
20 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ 21 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_
21 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ 22 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_
22 23
23 namespace net { 24 namespace net {
24 struct LoadTimingInfo; 25 struct LoadTimingInfo;
25 } 26 }
26 27
27 namespace content { 28 namespace content {
28 struct ResourceDevToolsInfo; 29 struct ResourceDevToolsInfo;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 IPC_STRUCT_TRAITS_MEMBER(download_file_path) 113 IPC_STRUCT_TRAITS_MEMBER(download_file_path)
113 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_spdy) 114 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_spdy)
114 IPC_STRUCT_TRAITS_MEMBER(was_npn_negotiated) 115 IPC_STRUCT_TRAITS_MEMBER(was_npn_negotiated)
115 IPC_STRUCT_TRAITS_MEMBER(was_alternate_protocol_available) 116 IPC_STRUCT_TRAITS_MEMBER(was_alternate_protocol_available)
116 IPC_STRUCT_TRAITS_MEMBER(connection_info) 117 IPC_STRUCT_TRAITS_MEMBER(connection_info)
117 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_proxy) 118 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_proxy)
118 IPC_STRUCT_TRAITS_MEMBER(npn_negotiated_protocol) 119 IPC_STRUCT_TRAITS_MEMBER(npn_negotiated_protocol)
119 IPC_STRUCT_TRAITS_MEMBER(socket_address) 120 IPC_STRUCT_TRAITS_MEMBER(socket_address)
120 IPC_STRUCT_TRAITS_END() 121 IPC_STRUCT_TRAITS_END()
121 122
123 IPC_STRUCT_TRAITS_BEGIN(net::RedirectInfo)
124 IPC_STRUCT_TRAITS_MEMBER(status_code)
125 IPC_STRUCT_TRAITS_MEMBER(method)
126 IPC_STRUCT_TRAITS_MEMBER(url)
127 IPC_STRUCT_TRAITS_MEMBER(first_party_for_cookies)
128 IPC_STRUCT_TRAITS_MEMBER(referrer)
129 IPC_STRUCT_TRAITS_END()
130
122 // Parameters for a resource request. 131 // Parameters for a resource request.
123 IPC_STRUCT_BEGIN(ResourceHostMsg_Request) 132 IPC_STRUCT_BEGIN(ResourceHostMsg_Request)
124 // The request method: GET, POST, etc. 133 // The request method: GET, POST, etc.
125 IPC_STRUCT_MEMBER(std::string, method) 134 IPC_STRUCT_MEMBER(std::string, method)
126 135
127 // The requested URL. 136 // The requested URL.
128 IPC_STRUCT_MEMBER(GURL, url) 137 IPC_STRUCT_MEMBER(GURL, url)
129 138
130 // Usually the URL of the document in the top-level window, which may be 139 // Usually the URL of the document in the top-level window, which may be
131 // checked by the third-party cookie blocking policy. Leaving it empty may 140 // checked by the third-party cookie blocking policy. Leaving it empty may
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 257
249 // Sent as upload progress is being made. 258 // Sent as upload progress is being made.
250 IPC_MESSAGE_CONTROL3(ResourceMsg_UploadProgress, 259 IPC_MESSAGE_CONTROL3(ResourceMsg_UploadProgress,
251 int /* request_id */, 260 int /* request_id */,
252 int64 /* position */, 261 int64 /* position */,
253 int64 /* size */) 262 int64 /* size */)
254 263
255 // Sent when the request has been redirected. The receiver is expected to 264 // Sent when the request has been redirected. The receiver is expected to
256 // respond with either a FollowRedirect message (if the redirect is to be 265 // respond with either a FollowRedirect message (if the redirect is to be
257 // followed) or a CancelRequest message (if it should not be followed). 266 // followed) or a CancelRequest message (if it should not be followed).
258 IPC_MESSAGE_CONTROL4(ResourceMsg_ReceivedRedirect, 267 IPC_MESSAGE_CONTROL3(ResourceMsg_ReceivedRedirect,
259 int /* request_id */, 268 int /* request_id */,
260 GURL /* new_url */, 269 net::RedirectInfo /* redirect_info */,
261 GURL /* new_first_party_for_cookies */,
262 content::ResourceResponseHead) 270 content::ResourceResponseHead)
263 271
264 // Sent to set the shared memory buffer to be used to transmit response data to 272 // Sent to set the shared memory buffer to be used to transmit response data to
265 // the renderer. Subsequent DataReceived messages refer to byte ranges in the 273 // the renderer. Subsequent DataReceived messages refer to byte ranges in the
266 // shared memory buffer. The shared memory buffer should be retained by the 274 // shared memory buffer. The shared memory buffer should be retained by the
267 // renderer until the resource request completes. 275 // renderer until the resource request completes.
268 // 276 //
269 // NOTE: The shared memory handle should already be mapped into the process 277 // NOTE: The shared memory handle should already be mapped into the process
270 // that receives this message. 278 // that receives this message.
271 // 279 //
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 347
340 // Sent when the renderer process deletes a resource loader. 348 // Sent when the renderer process deletes a resource loader.
341 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, 349 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile,
342 int /* request_id */) 350 int /* request_id */)
343 351
344 // Sent by the renderer when a resource request changes priority. 352 // Sent by the renderer when a resource request changes priority.
345 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, 353 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority,
346 int /* request_id */, 354 int /* request_id */,
347 net::RequestPriority, 355 net::RequestPriority,
348 int /* intra_priority_value */) 356 int /* intra_priority_value */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698