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

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

Issue 6691002: Move AppCache common code to content and split off AppCache messages into the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 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
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/common/web_database_observer_impl.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Get basic type definitions. 5 // Get basic type definitions.
6 #define IPC_MESSAGE_IMPL 6 #define IPC_MESSAGE_IMPL
7 #include "chrome/common/render_messages.h" 7 #include "chrome/common/render_messages.h"
8 #include "chrome/common/common_param_traits.h" 8 #include "chrome/common/common_param_traits.h"
9 9
10 // Generate constructors. 10 // Generate constructors.
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 644
645 for (size_t i = 0; i < patterns.size(); ++i) 645 for (size_t i = 0; i < patterns.size(); ++i)
646 p->AddPattern(patterns[i]); 646 p->AddPattern(patterns[i]);
647 return true; 647 return true;
648 } 648 }
649 649
650 void ParamTraits<ExtensionExtent>::Log(const param_type& p, std::string* l) { 650 void ParamTraits<ExtensionExtent>::Log(const param_type& p, std::string* l) {
651 LogParam(p.patterns(), l); 651 LogParam(p.patterns(), l);
652 } 652 }
653 653
654 void ParamTraits<appcache::AppCacheResourceInfo>::Write(Message* m,
655 const param_type& p) {
656 WriteParam(m, p.url);
657 WriteParam(m, p.size);
658 WriteParam(m, p.is_manifest);
659 WriteParam(m, p.is_master);
660 WriteParam(m, p.is_fallback);
661 WriteParam(m, p.is_foreign);
662 WriteParam(m, p.is_explicit);
663 }
664
665 bool ParamTraits<appcache::AppCacheResourceInfo>::Read(
666 const Message* m, void** iter, param_type* p) {
667 return ReadParam(m, iter, &p->url) &&
668 ReadParam(m, iter, &p->size) &&
669 ReadParam(m, iter, &p->is_manifest) &&
670 ReadParam(m, iter, &p->is_master) &&
671 ReadParam(m, iter, &p->is_fallback) &&
672 ReadParam(m, iter, &p->is_foreign) &&
673 ReadParam(m, iter, &p->is_explicit);
674 }
675
676 void ParamTraits<appcache::AppCacheResourceInfo>::Log(const param_type& p,
677 std::string* l) {
678 l->append("(");
679 LogParam(p.url, l);
680 l->append(", ");
681 LogParam(p.size, l);
682 l->append(", ");
683 LogParam(p.is_manifest, l);
684 l->append(", ");
685 LogParam(p.is_master, l);
686 l->append(", ");
687 LogParam(p.is_fallback, l);
688 l->append(", ");
689 LogParam(p.is_foreign, l);
690 l->append(", ");
691 LogParam(p.is_explicit, l);
692 l->append(")");
693 }
694
695 void ParamTraits<appcache::AppCacheInfo>::Write(Message* m,
696 const param_type& p) {
697 WriteParam(m, p.manifest_url);
698 WriteParam(m, p.creation_time);
699 WriteParam(m, p.last_update_time);
700 WriteParam(m, p.last_access_time);
701 WriteParam(m, p.cache_id);
702 WriteParam(m, p.status);
703 WriteParam(m, p.size);
704 WriteParam(m, p.is_complete);
705 }
706
707 bool ParamTraits<appcache::AppCacheInfo>::Read(const Message* m, void** iter,
708 param_type* p) {
709 return ReadParam(m, iter, &p->manifest_url) &&
710 ReadParam(m, iter, &p->creation_time) &&
711 ReadParam(m, iter, &p->last_update_time) &&
712 ReadParam(m, iter, &p->last_access_time) &&
713 ReadParam(m, iter, &p->cache_id) &&
714 ReadParam(m, iter, &p->status) &&
715 ReadParam(m, iter, &p->size) &&
716 ReadParam(m, iter, &p->is_complete);
717 }
718
719 void ParamTraits<appcache::AppCacheInfo>::Log(const param_type& p,
720 std::string* l) {
721 l->append("(");
722 LogParam(p.manifest_url, l);
723 l->append(", ");
724 LogParam(p.creation_time, l);
725 l->append(", ");
726 LogParam(p.last_update_time, l);
727 l->append(", ");
728 LogParam(p.last_access_time, l);
729 l->append(", ");
730 LogParam(p.cache_id, l);
731 l->append(", ");
732 LogParam(p.status, l);
733 l->append(", ");
734 LogParam(p.size, l);
735 l->append(")");
736 LogParam(p.is_complete, l);
737 l->append(", ");
738 }
739
740 void ParamTraits<webkit_glue::WebAccessibility>::Write(Message* m, 654 void ParamTraits<webkit_glue::WebAccessibility>::Write(Message* m,
741 const param_type& p) { 655 const param_type& p) {
742 WriteParam(m, p.id); 656 WriteParam(m, p.id);
743 WriteParam(m, p.name); 657 WriteParam(m, p.name);
744 WriteParam(m, p.value); 658 WriteParam(m, p.value);
745 WriteParam(m, static_cast<int>(p.role)); 659 WriteParam(m, static_cast<int>(p.role));
746 WriteParam(m, static_cast<int>(p.state)); 660 WriteParam(m, static_cast<int>(p.state));
747 WriteParam(m, p.location); 661 WriteParam(m, p.location);
748 WriteParam(m, p.attributes); 662 WriteParam(m, p.attributes);
749 WriteParam(m, p.children); 663 WriteParam(m, p.children);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 l->append("("); 833 l->append("(");
920 LogParam(p.pending_bytes, l); 834 LogParam(p.pending_bytes, l);
921 l->append(", "); 835 l->append(", ");
922 LogParam(p.hardware_delay_bytes, l); 836 LogParam(p.hardware_delay_bytes, l);
923 l->append(", "); 837 l->append(", ");
924 LogParam(p.timestamp, l); 838 LogParam(p.timestamp, l);
925 l->append(")"); 839 l->append(")");
926 } 840 }
927 841
928 } // namespace IPC 842 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/common/web_database_observer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698