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

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

Issue 1334593002: Reland #2 "ipc: Add a new field num_brokered_attachments to the message header." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and type error. Created 5 years, 3 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 | « content/common/resource_messages.h ('k') | ipc/ipc_channel.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 #include "content/common/resource_messages.h" 5 #include "content/common/resource_messages.h"
6 6
7 #include "base/debug/alias.h"
8 #include "ipc/ipc_message.h"
7 #include "net/base/load_timing_info.h" 9 #include "net/base/load_timing_info.h"
8 #include "net/http/http_response_headers.h" 10 #include "net/http/http_response_headers.h"
9 11
12 namespace content {
13 // TODO(erikchen): Temporary code to help track http://crbug.com/527588.
14 void CheckContentsOfDataReceivedMessage(const IPC::Message* message) {
15 if (message->type() != ResourceMsg_DataReceived::ID)
16 return;
17 ResourceMsg_DataReceived::Schema::Param arg;
18 bool success = ResourceMsg_DataReceived::Read(message, &arg);
19 CHECK(success);
20 int data_offset = base::get<1>(arg);
21 CHECK_LE(data_offset, 512 * 1024);
22 base::debug::Alias(&data_offset);
23 }
24 }
25
10 namespace IPC { 26 namespace IPC {
11 27
12 void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write( 28 void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write(
13 Message* m, const param_type& p) { 29 Message* m, const param_type& p) {
14 WriteParam(m, p.get() != NULL); 30 WriteParam(m, p.get() != NULL);
15 if (p.get()) { 31 if (p.get()) {
16 // Do not disclose Set-Cookie headers over IPC. 32 // Do not disclose Set-Cookie headers over IPC.
17 p->Persist(m, net::HttpResponseHeaders::PERSIST_SANS_COOKIES); 33 p->Persist(m, net::HttpResponseHeaders::PERSIST_SANS_COOKIES);
18 } 34 }
19 } 35 }
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 (*r)->set_identifier(identifier); 323 (*r)->set_identifier(identifier);
308 return true; 324 return true;
309 } 325 }
310 326
311 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( 327 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log(
312 const param_type& p, std::string* l) { 328 const param_type& p, std::string* l) {
313 l->append("<ResourceRequestBody>"); 329 l->append("<ResourceRequestBody>");
314 } 330 }
315 331
316 } // namespace IPC 332 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/resource_messages.h ('k') | ipc/ipc_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698