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

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

Issue 1346923008: Add a dummy variable to ResourceMsg_DataReceived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_revert2
Patch Set: Fix unit test 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') | no next file » | 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" 7 #include "base/debug/alias.h"
8 #include "ipc/ipc_message.h" 8 #include "ipc/ipc_message.h"
9 #include "net/base/load_timing_info.h" 9 #include "net/base/load_timing_info.h"
10 #include "net/http/http_response_headers.h" 10 #include "net/http/http_response_headers.h"
11 11
12 namespace content { 12 namespace content {
13 // TODO(erikchen): Temporary code to help track http://crbug.com/527588. 13 // TODO(erikchen): Temporary code to help track http://crbug.com/527588.
14 void CheckContentsOfDataReceivedMessage(const IPC::Message* message) { 14 void CheckContentsOfDataReceivedMessage(const IPC::Message* message) {
15 if (message->type() != ResourceMsg_DataReceived::ID) 15 if (message->type() != ResourceMsg_DataReceived::ID)
16 return; 16 return;
17 ResourceMsg_DataReceived::Schema::Param arg; 17 ResourceMsg_DataReceived::Schema::Param arg;
18 bool success = ResourceMsg_DataReceived::Read(message, &arg); 18 bool success = ResourceMsg_DataReceived::Read(message, &arg);
19 CHECK(success); 19 CHECK(success);
20 int data_offset = base::get<1>(arg); 20 int data_offset = base::get<2>(arg);
21 CHECK_LE(data_offset, 512 * 1024); 21 CHECK_LE(data_offset, 512 * 1024);
22 base::debug::Alias(&data_offset); 22 base::debug::Alias(&data_offset);
23 } 23 }
24 } 24 }
25 25
26 namespace IPC { 26 namespace IPC {
27 27
28 void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write( 28 void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write(
29 Message* m, const param_type& p) { 29 Message* m, const param_type& p) {
30 WriteParam(m, p.get() != NULL); 30 WriteParam(m, p.get() != NULL);
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 (*r)->set_identifier(identifier); 323 (*r)->set_identifier(identifier);
324 return true; 324 return true;
325 } 325 }
326 326
327 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( 327 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log(
328 const param_type& p, std::string* l) { 328 const param_type& p, std::string* l) {
329 l->append("<ResourceRequestBody>"); 329 l->append("<ResourceRequestBody>");
330 } 330 }
331 331
332 } // namespace IPC 332 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/resource_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698