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

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

Issue 3106018: Reapplies all the IPC system work (reverts the revert r56272). (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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 | « chrome/common/common_param_traits.h ('k') | chrome/common/devtools_messages.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/common/common_param_traits.h" 5 #include "chrome/common/common_param_traits.h"
6 6
7 #include "chrome/common/chrome_constants.h" 7 #include "chrome/common/chrome_constants.h"
8 #include "chrome/common/content_settings.h" 8 #include "chrome/common/content_settings.h"
9 #include "chrome/common/thumbnail_score.h" 9 #include "chrome/common/thumbnail_score.h"
10 #include "gfx/rect.h" 10 #include "gfx/rect.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 L"%.6f %.6f %.6f %.6f " 400 L"%.6f %.6f %.6f %.6f "
401 L"%.6f %.6f %.6f ", 401 L"%.6f %.6f %.6f ",
402 p.latitude, p.longitude, p.accuracy, p.altitude, 402 p.latitude, p.longitude, p.accuracy, p.altitude,
403 p.altitude_accuracy, p.speed, p.heading)); 403 p.altitude_accuracy, p.speed, p.heading));
404 LogParam(p.timestamp, l); 404 LogParam(p.timestamp, l);
405 l->append(L" "); 405 l->append(L" ");
406 l->append(UTF8ToWide(p.error_message)); 406 l->append(UTF8ToWide(p.error_message));
407 LogParam(p.error_code, l); 407 LogParam(p.error_code, l);
408 } 408 }
409 409
410 void ParamTraits<webkit_glue::PasswordForm>::Write(Message* m,
411 const param_type& p) {
412 WriteParam(m, p.signon_realm);
413 WriteParam(m, p.origin);
414 WriteParam(m, p.action);
415 WriteParam(m, p.submit_element);
416 WriteParam(m, p.username_element);
417 WriteParam(m, p.username_value);
418 WriteParam(m, p.password_element);
419 WriteParam(m, p.password_value);
420 WriteParam(m, p.old_password_element);
421 WriteParam(m, p.old_password_value);
422 WriteParam(m, p.ssl_valid);
423 WriteParam(m, p.preferred);
424 WriteParam(m, p.blacklisted_by_user);
425 }
426
427 bool ParamTraits<webkit_glue::PasswordForm>::Read(const Message* m, void** iter,
428 param_type* p) {
429 return
430 ReadParam(m, iter, &p->signon_realm) &&
431 ReadParam(m, iter, &p->origin) &&
432 ReadParam(m, iter, &p->action) &&
433 ReadParam(m, iter, &p->submit_element) &&
434 ReadParam(m, iter, &p->username_element) &&
435 ReadParam(m, iter, &p->username_value) &&
436 ReadParam(m, iter, &p->password_element) &&
437 ReadParam(m, iter, &p->password_value) &&
438 ReadParam(m, iter, &p->old_password_element) &&
439 ReadParam(m, iter, &p->old_password_value) &&
440 ReadParam(m, iter, &p->ssl_valid) &&
441 ReadParam(m, iter, &p->preferred) &&
442 ReadParam(m, iter, &p->blacklisted_by_user);
443 }
444 void ParamTraits<webkit_glue::PasswordForm>::Log(const param_type& p,
445 std::wstring* l) {
446 l->append(L"<PasswordForm>");
447 }
448
410 void ParamTraits<printing::PageRange>::Write(Message* m, const param_type& p) { 449 void ParamTraits<printing::PageRange>::Write(Message* m, const param_type& p) {
411 WriteParam(m, p.from); 450 WriteParam(m, p.from);
412 WriteParam(m, p.to); 451 WriteParam(m, p.to);
413 } 452 }
414 453
415 bool ParamTraits<printing::PageRange>::Read( 454 bool ParamTraits<printing::PageRange>::Read(
416 const Message* m, void** iter, param_type* p) { 455 const Message* m, void** iter, param_type* p) {
417 return ReadParam(m, iter, &p->from) && 456 return ReadParam(m, iter, &p->from) &&
418 ReadParam(m, iter, &p->to); 457 ReadParam(m, iter, &p->to);
419 } 458 }
(...skipping 29 matching lines...) Expand all
449 p->Init(&buffer.front(), static_cast<uint32>(buffer.size())); 488 p->Init(&buffer.front(), static_cast<uint32>(buffer.size()));
450 #endif // defined(OS_WIN) 489 #endif // defined(OS_WIN)
451 } 490 }
452 491
453 void ParamTraits<printing::NativeMetafile>::Log( 492 void ParamTraits<printing::NativeMetafile>::Log(
454 const param_type& p, std::wstring* l) { 493 const param_type& p, std::wstring* l) {
455 l->append(StringPrintf(L"<printing::NativeMetafile>")); 494 l->append(StringPrintf(L"<printing::NativeMetafile>"));
456 } 495 }
457 496
458 } // namespace IPC 497 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/common_param_traits.h ('k') | chrome/common/devtools_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698