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

Side by Side Diff: chrome/common/common_param_traits.h

Issue 338046: We should be de-serializing an int64 for the UploadData identifier.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « no previous file | 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) 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 file is used to define IPC::ParamTraits<> specializations for a number 5 // This file is used to define IPC::ParamTraits<> specializations for a number
6 // of types so that they can be serialized over IPC. IPC::ParamTraits<> 6 // of types so that they can be serialized over IPC. IPC::ParamTraits<>
7 // specializations for basic types (like int and std::string) and types in the 7 // specializations for basic types (like int and std::string) and types in the
8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains 8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains
9 // specializations for types that are shared by more than one child process. 9 // specializations for types that are shared by more than one child process.
10 10
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 } 275 }
276 static bool Read(const Message* m, void** iter, param_type* r) { 276 static bool Read(const Message* m, void** iter, param_type* r) {
277 bool has_object; 277 bool has_object;
278 if (!ReadParam(m, iter, &has_object)) 278 if (!ReadParam(m, iter, &has_object))
279 return false; 279 return false;
280 if (!has_object) 280 if (!has_object)
281 return true; 281 return true;
282 std::vector<net::UploadData::Element> elements; 282 std::vector<net::UploadData::Element> elements;
283 if (!ReadParam(m, iter, &elements)) 283 if (!ReadParam(m, iter, &elements))
284 return false; 284 return false;
285 int identifier; 285 int64 identifier;
286 if (!ReadParam(m, iter, &identifier)) 286 if (!ReadParam(m, iter, &identifier))
287 return false; 287 return false;
288 *r = new net::UploadData; 288 *r = new net::UploadData;
289 (*r)->swap_elements(&elements); 289 (*r)->swap_elements(&elements);
290 (*r)->set_identifier(identifier); 290 (*r)->set_identifier(identifier);
291 return true; 291 return true;
292 } 292 }
293 static void Log(const param_type& p, std::wstring* l) { 293 static void Log(const param_type& p, std::wstring* l) {
294 l->append(L"<net::UploadData>"); 294 l->append(L"<net::UploadData>");
295 } 295 }
(...skipping 26 matching lines...) Expand all
322 } 322 }
323 static void Log(const param_type& p, std::wstring* l) { 323 static void Log(const param_type& p, std::wstring* l) {
324 l->append(StringPrintf(L"(%f, %d, %d)", 324 l->append(StringPrintf(L"(%f, %d, %d)",
325 p.boring_score, p.good_clipping, p.at_top)); 325 p.boring_score, p.good_clipping, p.at_top));
326 } 326 }
327 }; 327 };
328 328
329 } // namespace IPC 329 } // namespace IPC
330 330
331 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ 331 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698