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

Side by Side Diff: components/sync/protocol/proto_visitors.h

Issue 2452713003: [Sync] Implement MemoryDumpProvider. (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_ 5 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_
6 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_ 6 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_
7 7
8 #include "components/sync/protocol/app_list_specifics.pb.h" 8 #include "components/sync/protocol/app_list_specifics.pb.h"
9 #include "components/sync/protocol/app_notification_specifics.pb.h" 9 #include "components/sync/protocol/app_notification_specifics.pb.h"
10 #include "components/sync/protocol/app_setting_specifics.pb.h" 10 #include "components/sync/protocol/app_setting_specifics.pb.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 template <class V> 164 template <class V>
165 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecificsData& proto) { 165 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecificsData& proto) {
166 VISIT(scheme); 166 VISIT(scheme);
167 VISIT(signon_realm); 167 VISIT(signon_realm);
168 VISIT(origin); 168 VISIT(origin);
169 VISIT(action); 169 VISIT(action);
170 VISIT(username_element); 170 VISIT(username_element);
171 VISIT(username_value); 171 VISIT(username_value);
172 VISIT(password_element); 172 VISIT(password_element);
173 VISIT(password_value);
173 VISIT(preferred); 174 VISIT(preferred);
174 VISIT(date_created); 175 VISIT(date_created);
175 VISIT(blacklisted); 176 VISIT(blacklisted);
176 VISIT(type); 177 VISIT(type);
177 VISIT(times_used); 178 VISIT(times_used);
178 VISIT(display_name); 179 VISIT(display_name);
179 VISIT(avatar_url); 180 VISIT(avatar_url);
180 VISIT(federation_url); 181 VISIT(federation_url);
181 } 182 }
182 183
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 void VisitProtoFields(V& visitor, const sync_pb::GcmChannelFlags& proto) { 380 void VisitProtoFields(V& visitor, const sync_pb::GcmChannelFlags& proto) {
380 VISIT(enabled); 381 VISIT(enabled);
381 } 382 }
382 383
383 template <class V> 384 template <class V>
384 void VisitProtoFields(V& visitor, const sync_pb::GcmInvalidationsFlags& proto) { 385 void VisitProtoFields(V& visitor, const sync_pb::GcmInvalidationsFlags& proto) {
385 VISIT(enabled); 386 VISIT(enabled);
386 } 387 }
387 388
388 template <class V> 389 template <class V>
390 void VisitProtoFields(V& visitor,
391 const sync_pb::EnhancedBookmarksFlags& proto) {
392 VISIT(enabled);
393 VISIT(extension_id);
394 }
395
396 template <class V>
397 void VisitProtoFields(V& visitor, const sync_pb::WalletSyncFlags& proto) {
398 VISIT(enabled);
399 }
400
401 template <class V>
389 void VisitProtoFields(V& visitor, const sync_pb::ExperimentsSpecifics& proto) { 402 void VisitProtoFields(V& visitor, const sync_pb::ExperimentsSpecifics& proto) {
390 VISIT(keystore_encryption); 403 VISIT(keystore_encryption);
391 VISIT(history_delete_directives); 404 VISIT(history_delete_directives);
392 VISIT(autofill_culling); 405 VISIT(autofill_culling);
393 VISIT(pre_commit_update_avoidance); 406 VISIT(pre_commit_update_avoidance);
394 VISIT(favicon_sync); 407 VISIT(favicon_sync);
395 VISIT(gcm_channel); 408 VISIT(gcm_channel);
396 VISIT(gcm_invalidations); 409 VISIT(gcm_invalidations);
410 VISIT(obsolete_enhanced_bookmarks);
411 VISIT(obsolete_wallet_sync);
397 } 412 }
398 413
399 template <class V> 414 template <class V>
400 void VisitProtoFields(V& visitor, 415 void VisitProtoFields(V& visitor,
401 const sync_pb::ExtensionSettingSpecifics& proto) { 416 const sync_pb::ExtensionSettingSpecifics& proto) {
402 VISIT(extension_id); 417 VISIT(extension_id);
403 VISIT(key); 418 VISIT(key);
404 VISIT(value); 419 VISIT(value);
405 } 420 }
406 421
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } 472 }
458 473
459 template <class V> 474 template <class V>
460 void VisitProtoFields(V& visitor, const sync_pb::ManagedUserSpecifics& proto) { 475 void VisitProtoFields(V& visitor, const sync_pb::ManagedUserSpecifics& proto) {
461 VISIT(id); 476 VISIT(id);
462 VISIT(name); 477 VISIT(name);
463 VISIT(acknowledged); 478 VISIT(acknowledged);
464 VISIT(master_key); 479 VISIT(master_key);
465 VISIT(chrome_avatar); 480 VISIT(chrome_avatar);
466 VISIT(chromeos_avatar); 481 VISIT(chromeos_avatar);
482 VISIT(password_signature_key);
483 VISIT(password_encryption_key);
467 } 484 }
468 485
469 template <class V> 486 template <class V>
470 void VisitProtoFields(V& visitor, 487 void VisitProtoFields(V& visitor,
471 const sync_pb::ManagedUserSharedSettingSpecifics& proto) { 488 const sync_pb::ManagedUserSharedSettingSpecifics& proto) {
472 VISIT(mu_id); 489 VISIT(mu_id);
473 VISIT(key); 490 VISIT(key);
474 VISIT(value); 491 VISIT(value);
475 VISIT(acknowledged); 492 VISIT(acknowledged);
476 } 493 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 template <class V> 532 template <class V>
516 void VisitProtoFields(V& visitor, const sync_pb::ArticlePage& proto) { 533 void VisitProtoFields(V& visitor, const sync_pb::ArticlePage& proto) {
517 VISIT(url); 534 VISIT(url);
518 } 535 }
519 536
520 template <class V> 537 template <class V>
521 void VisitProtoFields(V& visitor, const sync_pb::ArticleSpecifics& proto) { 538 void VisitProtoFields(V& visitor, const sync_pb::ArticleSpecifics& proto) {
522 VISIT(entry_id); 539 VISIT(entry_id);
523 VISIT(title); 540 VISIT(title);
524 VISIT_REP(pages); 541 VISIT_REP(pages);
542 VISIT(attachments);
543 }
544
545 template <class V>
546 void VisitProtoFields(V& visitor, const sync_pb::ArticleAttachments& proto) {
547 VISIT(distilled_article);
525 } 548 }
526 549
527 template <class V> 550 template <class V>
528 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecifics& proto) { 551 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecifics& proto) {
529 VISIT(encrypted); 552 VISIT(encrypted);
530 VISIT(unencrypted_metadata); 553 VISIT(unencrypted_metadata);
554 VISIT(client_only_encrypted_data);
pavely 2016/10/28 22:55:32 We shouldn't convert client_only_encrypted_data to
531 } 555 }
532 556
533 template <class V> 557 template <class V>
534 void VisitProtoFields(V& visitor, const sync_pb::PreferenceSpecifics& proto) { 558 void VisitProtoFields(V& visitor, const sync_pb::PreferenceSpecifics& proto) {
535 VISIT(name); 559 VISIT(name);
536 VISIT(value); 560 VISIT(value);
537 } 561 }
538 562
539 template <class V> 563 template <class V>
540 void VisitProtoFields(V& visitor, const sync_pb::PrinterSpecifics& proto) { 564 void VisitProtoFields(V& visitor, const sync_pb::PrinterSpecifics& proto) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 template <class V> 675 template <class V>
652 void VisitProtoFields(V& visitor, 676 void VisitProtoFields(V& visitor,
653 const sync_pb::WifiCredentialSpecifics& proto) { 677 const sync_pb::WifiCredentialSpecifics& proto) {
654 VISIT_BYTES(ssid); 678 VISIT_BYTES(ssid);
655 VISIT_ENUM(security_class); 679 VISIT_ENUM(security_class);
656 VISIT_BYTES(passphrase); 680 VISIT_BYTES(passphrase);
657 } 681 }
658 682
659 template <class V> 683 template <class V>
660 void VisitProtoFields(V& visitor, const sync_pb::EntitySpecifics& proto) { 684 void VisitProtoFields(V& visitor, const sync_pb::EntitySpecifics& proto) {
685 VISIT(encrypted);
661 VISIT(app); 686 VISIT(app);
662 VISIT(app_list); 687 VISIT(app_list);
663 VISIT(app_notification); 688 VISIT(app_notification);
664 VISIT(app_setting); 689 VISIT(app_setting);
665 VISIT(arc_package); 690 VISIT(arc_package);
666 VISIT(article); 691 VISIT(article);
667 VISIT(autofill); 692 VISIT(autofill);
668 VISIT(autofill_profile); 693 VISIT(autofill_profile);
669 VISIT(autofill_wallet); 694 VISIT(autofill_wallet);
670 VISIT(wallet_metadata); 695 VISIT(wallet_metadata);
(...skipping 19 matching lines...) Expand all
690 VISIT(search_engine); 715 VISIT(search_engine);
691 VISIT(session); 716 VISIT(session);
692 VISIT(synced_notification); 717 VISIT(synced_notification);
693 VISIT(synced_notification_app_info); 718 VISIT(synced_notification_app_info);
694 VISIT(theme); 719 VISIT(theme);
695 VISIT(typed_url); 720 VISIT(typed_url);
696 VISIT(wifi_credential); 721 VISIT(wifi_credential);
697 } 722 }
698 723
699 template <class V> 724 template <class V>
725 void VisitProtoFields(V& visitor,
726 const sync_pb::SyncEntity::BookmarkData& proto) {
727 VISIT(bookmark_folder);
728 VISIT(bookmark_url);
729 VISIT(bookmark_favicon);
730 }
731
732 template <class V>
700 void VisitProtoFields(V& visitor, const sync_pb::SyncEntity& proto) { 733 void VisitProtoFields(V& visitor, const sync_pb::SyncEntity& proto) {
701 VISIT(id_string); 734 VISIT(id_string);
702 VISIT(parent_id_string); 735 VISIT(parent_id_string);
703 VISIT(old_parent_id); 736 VISIT(old_parent_id);
704 VISIT(version); 737 VISIT(version);
705 VISIT(mtime); 738 VISIT(mtime);
706 VISIT(ctime); 739 VISIT(ctime);
707 VISIT(name); 740 VISIT(name);
708 VISIT(non_unique_name); 741 VISIT(non_unique_name);
709 VISIT(sync_timestamp); 742 VISIT(sync_timestamp);
710 VISIT(server_defined_unique_tag); 743 VISIT(server_defined_unique_tag);
711 VISIT(position_in_parent); 744 VISIT(position_in_parent);
712 VISIT(unique_position); 745 VISIT(unique_position);
713 VISIT(insert_after_item_id); 746 VISIT(insert_after_item_id);
714 VISIT(deleted); 747 VISIT(deleted);
715 VISIT(originator_cache_guid); 748 VISIT(originator_cache_guid);
716 VISIT(originator_client_item_id); 749 VISIT(originator_client_item_id);
717 VISIT(specifics); 750 VISIT(specifics);
718 VISIT(folder); 751 VISIT(folder);
719 VISIT(client_defined_unique_tag); 752 VISIT(client_defined_unique_tag);
720 VISIT_REP(attachment_id); 753 VISIT_REP(attachment_id);
754 VISIT_BYTES(ordinal_in_parent);
755 VISIT(bookmarkdata);
721 } 756 }
722 757
723 template <class V> 758 template <class V>
724 void VisitProtoFields(V& visitor, 759 void VisitProtoFields(V& visitor,
725 const sync_pb::ChromiumExtensionsActivity& proto) { 760 const sync_pb::ChromiumExtensionsActivity& proto) {
726 VISIT(extension_id); 761 VISIT(extension_id);
727 VISIT(bookmark_writes_since_last_commit); 762 VISIT(bookmark_writes_since_last_commit);
728 } 763 }
729 764
730 template <class V> 765 template <class V>
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 VISIT(num_sync_items_added); 904 VISIT(num_sync_items_added);
870 VISIT(num_sync_items_deleted); 905 VISIT(num_sync_items_deleted);
871 VISIT(num_sync_items_modified); 906 VISIT(num_sync_items_modified);
872 VISIT(local_version_pre_association); 907 VISIT(local_version_pre_association);
873 VISIT(sync_version_pre_association); 908 VISIT(sync_version_pre_association);
874 VISIT(had_error); 909 VISIT(had_error);
875 VISIT(download_wait_time_us); 910 VISIT(download_wait_time_us);
876 VISIT(download_time_us); 911 VISIT(download_time_us);
877 VISIT(association_wait_time_for_high_priority_us); 912 VISIT(association_wait_time_for_high_priority_us);
878 VISIT(association_wait_time_for_same_priority_us); 913 VISIT(association_wait_time_for_same_priority_us);
914 VISIT_REP(high_priority_type_configured_before);
915 VISIT_REP(same_priority_type_configured_before);
879 } 916 }
880 917
881 template <class V> 918 template <class V>
882 void VisitProtoFields(V& visitor, const sync_pb::DebugEventInfo& proto) { 919 void VisitProtoFields(V& visitor, const sync_pb::DebugEventInfo& proto) {
883 VISIT_ENUM(singleton_event); 920 VISIT_ENUM(singleton_event);
884 VISIT(sync_cycle_completed_event_info); 921 VISIT(sync_cycle_completed_event_info);
885 VISIT(nudging_datatype); 922 VISIT(nudging_datatype);
886 VISIT_REP(datatypes_notified_from_server); 923 VISIT_REP(datatypes_notified_from_server);
887 VISIT(datatype_association_stats); 924 VISIT(datatype_association_stats);
888 } 925 }
889 926
890 template <class V> 927 template <class V>
891 void VisitProtoFields(V& visitor, const sync_pb::DebugInfo& proto) { 928 void VisitProtoFields(V& visitor, const sync_pb::DebugInfo& proto) {
892 VISIT_REP(events); 929 VISIT_REP(events);
893 VISIT(cryptographer_ready); 930 VISIT(cryptographer_ready);
894 VISIT(cryptographer_has_pending_keys); 931 VISIT(cryptographer_has_pending_keys);
895 VISIT(events_dropped); 932 VISIT(events_dropped);
896 } 933 }
897 934
898 template <class V> 935 template <class V>
899 void VisitProtoFields(V& visitor, 936 void VisitProtoFields(V& visitor,
900 const sync_pb::SyncCycleCompletedEventInfo& proto) { 937 const sync_pb::SyncCycleCompletedEventInfo& proto) {
901 VISIT(num_encryption_conflicts); 938 VISIT(num_encryption_conflicts);
902 VISIT(num_hierarchy_conflicts); 939 VISIT(num_hierarchy_conflicts);
903 VISIT(num_server_conflicts); 940 VISIT(num_server_conflicts);
904 VISIT(num_updates_downloaded); 941 VISIT(num_updates_downloaded);
905 VISIT(num_reflected_updates_downloaded); 942 VISIT(num_reflected_updates_downloaded);
906 VISIT(caller_info); 943 VISIT(caller_info);
944 VISIT_REP(source_info);
907 } 945 }
908 946
909 template <class V> 947 template <class V>
910 void VisitProtoFields(V& visitor, const sync_pb::ClientConfigParams& proto) { 948 void VisitProtoFields(V& visitor, const sync_pb::ClientConfigParams& proto) {
911 VISIT_REP(enabled_type_ids); 949 VISIT_REP(enabled_type_ids);
912 VISIT(tabs_datatype_enabled); 950 VISIT(tabs_datatype_enabled);
913 VISIT(cookie_jar_mismatch); 951 VISIT(cookie_jar_mismatch);
914 } 952 }
915 953
916 template <class V> 954 template <class V>
917 void VisitProtoFields(V& visitor, const sync_pb::AttachmentIdProto& proto) { 955 void VisitProtoFields(V& visitor, const sync_pb::AttachmentIdProto& proto) {
918 VISIT(unique_id); 956 VISIT(unique_id);
919 } 957 }
920 958
921 template <class V> 959 template <class V>
960 void VisitProtoFields(V& visitor,
961 const sync_pb::AttachmentMetadataRecord& proto) {
962 VISIT(id);
963 VISIT(is_on_server);
964 }
965
966 template <class V>
967 void VisitProtoFields(V& visitor, const sync_pb::AttachmentMetadata& proto) {
968 VISIT_REP(record);
969 }
970
971 template <class V>
922 void VisitProtoFields(V& visitor, const sync_pb::EntityMetadata& proto) { 972 void VisitProtoFields(V& visitor, const sync_pb::EntityMetadata& proto) {
923 VISIT(client_tag_hash); 973 VISIT(client_tag_hash);
924 VISIT(server_id); 974 VISIT(server_id);
925 VISIT(is_deleted); 975 VISIT(is_deleted);
926 VISIT(sequence_number); 976 VISIT(sequence_number);
927 VISIT(acked_sequence_number); 977 VISIT(acked_sequence_number);
928 VISIT(server_version); 978 VISIT(server_version);
929 VISIT(creation_time); 979 VISIT(creation_time);
930 VISIT(modification_time); 980 VISIT(modification_time);
931 VISIT(specifics_hash); 981 VISIT(specifics_hash);
932 VISIT(base_specifics_hash); 982 VISIT(base_specifics_hash);
933 } 983 }
934 984
985 template <class V>
986 void VisitProtoFields(V& visitor, const sync_pb::UniquePosition& proto) {
987 VISIT_BYTES(value);
988 VISIT_BYTES(compressed_value);
989 VISIT(uncompressed_length);
990 VISIT_BYTES(custom_compressed_v1);
991 }
992
993 template <class V>
994 void VisitProtoFields(V& visitor, const sync_pb::TypeHint& proto) {
995 VISIT(data_type_id);
996 VISIT(has_valid_hint);
997 }
998
999 template <class V>
1000 void VisitProtoFields(V& visitor, const sync_pb::SourceInfo& proto) {
1001 VISIT_ENUM(source);
1002 VISIT_REP(type_hint);
1003 }
1004
935 } // namespace syncer 1005 } // namespace syncer
936 1006
937 #undef VISIT_ 1007 #undef VISIT_
938 #undef VISIT_BYTES 1008 #undef VISIT_BYTES
939 #undef VISIT_ENUM 1009 #undef VISIT_ENUM
940 #undef VISIT 1010 #undef VISIT
941 #undef VISIT_REP 1011 #undef VISIT_REP
942 1012
943 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_ 1013 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698