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

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

Issue 2382443006: Sync MDP: implement MemoryDumpProvider
Patch Set: Created 4 years, 2 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
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 // Keep this file in sync with the .proto files in this directory. 5 // Keep this file in sync with the .proto files in this directory.
6 6
7 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_VISITOR_CONVERSIONS_H_ 7 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_VISITOR_CONVERSIONS_H_
8 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_VISITOR_CONVERSIONS_H_ 8 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_VISITOR_CONVERSIONS_H_
9 9
10 #include "components/sync/protocol/app_list_specifics.pb.h" 10 #include "components/sync/protocol/app_list_specifics.pb.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 template <class V> 137 template <class V>
138 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecificsData& proto) { 138 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecificsData& proto) {
139 VISIT(scheme); 139 VISIT(scheme);
140 VISIT(signon_realm); 140 VISIT(signon_realm);
141 VISIT(origin); 141 VISIT(origin);
142 VISIT(action); 142 VISIT(action);
143 VISIT(username_element); 143 VISIT(username_element);
144 VISIT(username_value); 144 VISIT(username_value);
145 VISIT(password_element); 145 VISIT(password_element);
146 VISIT(password_value);
146 VISIT(preferred); 147 VISIT(preferred);
147 VISIT(date_created); 148 VISIT(date_created);
148 VISIT(blacklisted); 149 VISIT(blacklisted);
149 VISIT(type); 150 VISIT(type);
150 VISIT(times_used); 151 VISIT(times_used);
151 VISIT(display_name); 152 VISIT(display_name);
152 VISIT(avatar_url); 153 VISIT(avatar_url);
153 VISIT(federation_url); 154 VISIT(federation_url);
154 } 155 }
155 156
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 void VisitProtoFields(V& visitor, const sync_pb::GcmChannelFlags& proto) { 352 void VisitProtoFields(V& visitor, const sync_pb::GcmChannelFlags& proto) {
352 VISIT(enabled); 353 VISIT(enabled);
353 } 354 }
354 355
355 template <class V> 356 template <class V>
356 void VisitProtoFields(V& visitor, const sync_pb::GcmInvalidationsFlags& proto) { 357 void VisitProtoFields(V& visitor, const sync_pb::GcmInvalidationsFlags& proto) {
357 VISIT(enabled); 358 VISIT(enabled);
358 } 359 }
359 360
360 template <class V> 361 template <class V>
362 void VisitProtoFields(V& visitor, const sync_pb::EnhancedBookmarksFlags& proto) {
363 VISIT(enabled);
364 VISIT(extension_id);
365 }
366
367 template <class V>
368 void VisitProtoFields(V& visitor, const sync_pb::WalletSyncFlags& proto) {
369 VISIT(enabled);
370 }
371
372 template <class V>
361 void VisitProtoFields(V& visitor, const sync_pb::ExperimentsSpecifics& proto) { 373 void VisitProtoFields(V& visitor, const sync_pb::ExperimentsSpecifics& proto) {
362 VISIT(keystore_encryption); 374 VISIT(keystore_encryption);
363 VISIT(history_delete_directives); 375 VISIT(history_delete_directives);
364 VISIT(autofill_culling); 376 VISIT(autofill_culling);
365 VISIT(pre_commit_update_avoidance); 377 VISIT(pre_commit_update_avoidance);
366 VISIT(favicon_sync); 378 VISIT(favicon_sync);
367 VISIT(gcm_channel); 379 VISIT(gcm_channel);
368 VISIT(gcm_invalidations); 380 VISIT(gcm_invalidations);
381 VISIT(obsolete_enhanced_bookmarks); // excluded from ToValue
382 VISIT(obsolete_wallet_sync); // excluded from ToValue
369 } 383 }
370 384
371 template <class V> 385 template <class V>
372 void VisitProtoFields(V& visitor, const sync_pb::ExtensionSettingSpecifics& prot o) { 386 void VisitProtoFields(V& visitor, const sync_pb::ExtensionSettingSpecifics& prot o) {
373 VISIT(extension_id); 387 VISIT(extension_id);
374 VISIT(key); 388 VISIT(key);
375 VISIT(value); 389 VISIT(value);
376 } 390 }
377 391
378 template <class V> 392 template <class V>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 439 }
426 440
427 template <class V> 441 template <class V>
428 void VisitProtoFields(V& visitor, const sync_pb::ManagedUserSpecifics& proto) { 442 void VisitProtoFields(V& visitor, const sync_pb::ManagedUserSpecifics& proto) {
429 VISIT(id); 443 VISIT(id);
430 VISIT(name); 444 VISIT(name);
431 VISIT(acknowledged); 445 VISIT(acknowledged);
432 VISIT(master_key); 446 VISIT(master_key);
433 VISIT(chrome_avatar); 447 VISIT(chrome_avatar);
434 VISIT(chromeos_avatar); 448 VISIT(chromeos_avatar);
449 VISIT(password_signature_key); // TODO(dskiba): exclude from ToValue?
450 VISIT(password_encryption_key); // TODO(dskiba): exclude from ToValue?
435 } 451 }
436 452
437 template <class V> 453 template <class V>
438 void VisitProtoFields(V& visitor, const sync_pb::ManagedUserSharedSettingSpecifi cs& proto) { 454 void VisitProtoFields(V& visitor, const sync_pb::ManagedUserSharedSettingSpecifi cs& proto) {
439 VISIT(mu_id); 455 VISIT(mu_id);
440 VISIT(key); 456 VISIT(key);
441 VISIT(value); 457 VISIT(value);
442 VISIT(acknowledged); 458 VISIT(acknowledged);
443 } 459 }
444 460
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 template <class V> 497 template <class V>
482 void VisitProtoFields(V& visitor, const sync_pb::ArticlePage& proto) { 498 void VisitProtoFields(V& visitor, const sync_pb::ArticlePage& proto) {
483 VISIT(url); 499 VISIT(url);
484 } 500 }
485 501
486 template <class V> 502 template <class V>
487 void VisitProtoFields(V& visitor, const sync_pb::ArticleSpecifics& proto) { 503 void VisitProtoFields(V& visitor, const sync_pb::ArticleSpecifics& proto) {
488 VISIT(entry_id); 504 VISIT(entry_id);
489 VISIT(title); 505 VISIT(title);
490 VISIT_REP(pages); 506 VISIT_REP(pages);
507 VISIT(attachments); // TODO(dskiba): exclude from ToValue?
508 }
509
510 template <class V>
511 void VisitProtoFields(V& visitor, const sync_pb::ArticleAttachments& proto) {
512 VISIT(distilled_article);
491 } 513 }
492 514
493 template <class V> 515 template <class V>
494 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecifics& proto) { 516 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecifics& proto) {
495 VISIT(encrypted); 517 VISIT(encrypted);
496 VISIT(unencrypted_metadata); 518 VISIT(unencrypted_metadata);
519 VISIT(client_only_encrypted_data); // TODO(dskiba): exclude from ToValue?
497 } 520 }
498 521
499 template <class V> 522 template <class V>
500 void VisitProtoFields(V& visitor, const sync_pb::PreferenceSpecifics& proto) { 523 void VisitProtoFields(V& visitor, const sync_pb::PreferenceSpecifics& proto) {
501 VISIT(name); 524 VISIT(name);
502 VISIT(value); 525 VISIT(value);
503 } 526 }
504 527
505 template <class V> 528 template <class V>
506 void VisitProtoFields(V& visitor, const sync_pb::PrinterSpecifics& proto) { 529 void VisitProtoFields(V& visitor, const sync_pb::PrinterSpecifics& proto) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 634
612 template <class V> 635 template <class V>
613 void VisitProtoFields(V& visitor, const sync_pb::WifiCredentialSpecifics& proto) { 636 void VisitProtoFields(V& visitor, const sync_pb::WifiCredentialSpecifics& proto) {
614 VISIT_BYTES(ssid); 637 VISIT_BYTES(ssid);
615 VISIT_ENUM(security_class); 638 VISIT_ENUM(security_class);
616 VISIT_BYTES(passphrase); 639 VISIT_BYTES(passphrase);
617 } 640 }
618 641
619 template <class V> 642 template <class V>
620 void VisitProtoFields(V& visitor, const sync_pb::EntitySpecifics& proto) { 643 void VisitProtoFields(V& visitor, const sync_pb::EntitySpecifics& proto) {
644 VISIT(encrypted); // TODO(dskiba): exclude from ToValue?
621 VISIT(app); 645 VISIT(app);
622 VISIT(app_list); 646 VISIT(app_list);
623 VISIT(app_notification); 647 VISIT(app_notification);
624 VISIT(app_setting); 648 VISIT(app_setting);
625 VISIT(arc_package); 649 VISIT(arc_package);
626 VISIT(article); 650 VISIT(article);
627 VISIT(autofill); 651 VISIT(autofill);
628 VISIT(autofill_profile); 652 VISIT(autofill_profile);
629 VISIT(autofill_wallet); 653 VISIT(autofill_wallet);
630 VISIT(wallet_metadata); 654 VISIT(wallet_metadata);
(...skipping 19 matching lines...) Expand all
650 VISIT(search_engine); 674 VISIT(search_engine);
651 VISIT(session); 675 VISIT(session);
652 VISIT(synced_notification); 676 VISIT(synced_notification);
653 VISIT(synced_notification_app_info); 677 VISIT(synced_notification_app_info);
654 VISIT(theme); 678 VISIT(theme);
655 VISIT(typed_url); 679 VISIT(typed_url);
656 VISIT(wifi_credential); 680 VISIT(wifi_credential);
657 } 681 }
658 682
659 template <class V> 683 template <class V>
684 void VisitProtoFields(V& visitor, const sync_pb::SyncEntity::BookmarkData& proto ) {
685 VISIT(bookmark_folder);
686 VISIT(bookmark_url);
687 VISIT(bookmark_favicon);
688 }
689
690 template <class V>
660 void VisitProtoFields(V& visitor, const sync_pb::SyncEntity& proto) { 691 void VisitProtoFields(V& visitor, const sync_pb::SyncEntity& proto) {
661 VISIT(id_string); 692 VISIT(id_string);
662 VISIT(parent_id_string); 693 VISIT(parent_id_string);
663 VISIT(old_parent_id); 694 VISIT(old_parent_id);
664 VISIT(version); 695 VISIT(version);
665 VISIT(mtime); 696 VISIT(mtime);
666 VISIT(ctime); 697 VISIT(ctime);
667 VISIT(name); 698 VISIT(name);
668 VISIT(non_unique_name); 699 VISIT(non_unique_name);
669 VISIT(sync_timestamp); 700 VISIT(sync_timestamp);
670 VISIT(server_defined_unique_tag); 701 VISIT(server_defined_unique_tag);
671 VISIT(position_in_parent); 702 VISIT(position_in_parent);
672 VISIT(unique_position); 703 VISIT(unique_position);
673 VISIT(insert_after_item_id); 704 VISIT(insert_after_item_id);
674 VISIT(deleted); 705 VISIT(deleted);
675 VISIT(originator_cache_guid); 706 VISIT(originator_cache_guid);
676 VISIT(originator_client_item_id); 707 VISIT(originator_client_item_id);
677 VISIT(specifics); 708 VISIT(specifics);
678 VISIT(folder); 709 VISIT(folder);
679 VISIT(client_defined_unique_tag); 710 VISIT(client_defined_unique_tag);
680 VISIT_REP(attachment_id); 711 VISIT_REP(attachment_id);
712 VISIT_BYTES(ordinal_in_parent); // TODO(dskiba): exclude from ToValue?
713 VISIT(bookmarkdata); // TODO(dskiba): exclude from ToValue?
681 } 714 }
682 715
683 template <class V> 716 template <class V>
684 void VisitProtoFields(V& visitor, const sync_pb::ChromiumExtensionsActivity& pro to) { 717 void VisitProtoFields(V& visitor, const sync_pb::ChromiumExtensionsActivity& pro to) {
685 VISIT(extension_id); 718 VISIT(extension_id);
686 VISIT(bookmark_writes_since_last_commit); 719 VISIT(bookmark_writes_since_last_commit);
687 } 720 }
688 721
689 template <class V> 722 template <class V>
690 void VisitProtoFields(V& visitor, const sync_pb::CommitMessage& proto) { 723 void VisitProtoFields(V& visitor, const sync_pb::CommitMessage& proto) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 VISIT(num_sync_items_added); 856 VISIT(num_sync_items_added);
824 VISIT(num_sync_items_deleted); 857 VISIT(num_sync_items_deleted);
825 VISIT(num_sync_items_modified); 858 VISIT(num_sync_items_modified);
826 VISIT(local_version_pre_association); 859 VISIT(local_version_pre_association);
827 VISIT(sync_version_pre_association); 860 VISIT(sync_version_pre_association);
828 VISIT(had_error); 861 VISIT(had_error);
829 VISIT(download_wait_time_us); 862 VISIT(download_wait_time_us);
830 VISIT(download_time_us); 863 VISIT(download_time_us);
831 VISIT(association_wait_time_for_high_priority_us); 864 VISIT(association_wait_time_for_high_priority_us);
832 VISIT(association_wait_time_for_same_priority_us); 865 VISIT(association_wait_time_for_same_priority_us);
866 VISIT_REP(high_priority_type_configured_before); // TODO(dskiba): exclude from ToValue?
867 VISIT_REP(same_priority_type_configured_before); // TODO(dskiba): exclude from ToValue?
833 } 868 }
834 869
835 template <class V> 870 template <class V>
836 void VisitProtoFields(V& visitor, const sync_pb::DebugEventInfo& proto) { 871 void VisitProtoFields(V& visitor, const sync_pb::DebugEventInfo& proto) {
837 VISIT_ENUM(singleton_event); 872 VISIT_ENUM(singleton_event);
838 VISIT(sync_cycle_completed_event_info); 873 VISIT(sync_cycle_completed_event_info);
839 VISIT(nudging_datatype); 874 VISIT(nudging_datatype);
840 VISIT_REP(datatypes_notified_from_server); 875 VISIT_REP(datatypes_notified_from_server);
841 VISIT(datatype_association_stats); 876 VISIT(datatype_association_stats);
842 } 877 }
843 878
844 template <class V> 879 template <class V>
845 void VisitProtoFields(V& visitor, const sync_pb::DebugInfo& proto) { 880 void VisitProtoFields(V& visitor, const sync_pb::DebugInfo& proto) {
846 VISIT_REP(events); 881 VISIT_REP(events);
847 VISIT(cryptographer_ready); 882 VISIT(cryptographer_ready);
848 VISIT(cryptographer_has_pending_keys); 883 VISIT(cryptographer_has_pending_keys);
849 VISIT(events_dropped); 884 VISIT(events_dropped);
850 } 885 }
851 886
852 template <class V> 887 template <class V>
853 void VisitProtoFields(V& visitor, const sync_pb::SyncCycleCompletedEventInfo& pr oto) { 888 void VisitProtoFields(V& visitor, const sync_pb::SyncCycleCompletedEventInfo& pr oto) {
854 VISIT(num_encryption_conflicts); 889 VISIT(num_encryption_conflicts);
855 VISIT(num_hierarchy_conflicts); 890 VISIT(num_hierarchy_conflicts);
856 VISIT(num_server_conflicts); 891 VISIT(num_server_conflicts);
857 VISIT(num_updates_downloaded); 892 VISIT(num_updates_downloaded);
858 VISIT(num_reflected_updates_downloaded); 893 VISIT(num_reflected_updates_downloaded);
859 VISIT(caller_info); 894 VISIT(caller_info);
895 VISIT_REP(source_info); // TODO(dskiba): exclude from ToValue?
860 } 896 }
861 897
862 template <class V> 898 template <class V>
863 void VisitProtoFields(V& visitor, const sync_pb::ClientConfigParams& proto) { 899 void VisitProtoFields(V& visitor, const sync_pb::ClientConfigParams& proto) {
864 VISIT_REP(enabled_type_ids); 900 VISIT_REP(enabled_type_ids);
865 VISIT(tabs_datatype_enabled); 901 VISIT(tabs_datatype_enabled);
866 VISIT(cookie_jar_mismatch); 902 VISIT(cookie_jar_mismatch);
867 } 903 }
868 904
869 template <class V> 905 template <class V>
870 void VisitProtoFields(V& visitor, const sync_pb::AttachmentIdProto& proto) { 906 void VisitProtoFields(V& visitor, const sync_pb::AttachmentIdProto& proto) {
871 VISIT(unique_id); 907 VISIT(unique_id);
872 } 908 }
873 909
874 template <class V> 910 template <class V>
911 void VisitProtoFields(V& visitor, const sync_pb::AttachmentMetadataRecord& proto ) {
912 VISIT(id);
913 VISIT(is_on_server);
914 }
915
916 template <class V>
917 void VisitProtoFields(V& visitor, const sync_pb::AttachmentMetadata& proto) {
918 VISIT_REP(record);
919 }
920
921 template <class V>
875 void VisitProtoFields(V& visitor, const sync_pb::EntityMetadata& proto) { 922 void VisitProtoFields(V& visitor, const sync_pb::EntityMetadata& proto) {
876 VISIT(client_tag_hash); 923 VISIT(client_tag_hash);
877 VISIT(server_id); 924 VISIT(server_id);
878 VISIT(is_deleted); 925 VISIT(is_deleted);
879 VISIT(sequence_number); 926 VISIT(sequence_number);
880 VISIT(acked_sequence_number); 927 VISIT(acked_sequence_number);
881 VISIT(server_version); 928 VISIT(server_version);
882 VISIT(creation_time); 929 VISIT(creation_time);
883 VISIT(modification_time); 930 VISIT(modification_time);
884 VISIT(specifics_hash); 931 VISIT(specifics_hash);
885 VISIT(base_specifics_hash); 932 VISIT(base_specifics_hash);
886 } 933 }
887 934
935 template <class V>
936 void VisitProtoFields(V& visitor, const sync_pb::UniquePosition& proto) {
937 VISIT_BYTES(value);
938 VISIT_BYTES(compressed_value);
939 VISIT(uncompressed_length);
940 VISIT_BYTES(custom_compressed_v1);
941 }
942
943 template <class V>
944 void VisitProtoFields(V& visitor, const sync_pb::TypeHint& proto) {
945 VISIT(data_type_id);
946 VISIT(has_valid_hint);
947 }
948
949 template <class V>
950 void VisitProtoFields(V& visitor, const sync_pb::SourceInfo& proto) {
951 VISIT_ENUM(source);
952 VISIT_REP(type_hint);
953 }
954
888 } // namespace syncer 955 } // namespace syncer
889 956
890 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_VISITOR_CONVERSIONS_H_ 957 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_VISITOR_CONVERSIONS_H_
OLDNEW
« no previous file with comments | « components/sync/protocol/proto_value_conversions.cc ('k') | components/sync/syncable/directory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698