|  | // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
|  | // Use of this source code is governed by a BSD-style license that can be | 
|  | // found in the LICENSE file. | 
|  | // | 
|  | // Sync protocol for debug info clients can send to the sync server. | 
|  |  | 
|  | // If you change or add any fields in this file, update proto_visitors.h and | 
|  | // potentially proto_enum_conversions.{h, cc}. | 
|  |  | 
|  | syntax = "proto2"; | 
|  |  | 
|  | option java_multiple_files = true; | 
|  | option java_package = "org.chromium.components.sync.protocol"; | 
|  |  | 
|  | option optimize_for = LITE_RUNTIME; | 
|  |  | 
|  | package sync_pb; | 
|  |  | 
|  | import "components/sync/protocol/get_updates_caller_info.proto"; | 
|  | import "components/sync/protocol/sync_enums.proto"; | 
|  |  | 
|  | // Per-type hint information. | 
|  | message TypeHint { | 
|  | // The data type this hint applied to. | 
|  | optional int32 data_type_id = 1; | 
|  |  | 
|  | // Whether or not a valid hint is provided. | 
|  | optional bool has_valid_hint = 2; | 
|  | } | 
|  |  | 
|  | // The additional info here is from the StatusController. They get sent when | 
|  | // the event SYNC_CYCLE_COMPLETED  is sent. | 
|  | message SyncCycleCompletedEventInfo { | 
|  | reserved 1; | 
|  | reserved "syncer_stuck"; | 
|  | reserved 2; | 
|  | reserved "num_blocking_conflicts"; | 
|  | reserved 3; | 
|  | reserved "num_non_blocking_conflicts"; | 
|  |  | 
|  | // These new conflict counters replace the ones above. | 
|  | optional int32 num_encryption_conflicts = 4; | 
|  | optional int32 num_hierarchy_conflicts = 5; | 
|  | optional int32 num_simple_conflicts = 6;  // No longer sent since M24. | 
|  | optional int32 num_server_conflicts = 7; | 
|  |  | 
|  | // Counts to track the effective usefulness of our GetUpdate requests. | 
|  | optional int32 num_updates_downloaded = 8; | 
|  | optional int32 num_reflected_updates_downloaded = 9; | 
|  |  | 
|  | // |caller_info| was mostly replaced by |get_updates_origin|; now it only | 
|  | // contains the |notifications_enabled| flag. | 
|  | optional GetUpdatesCallerInfo caller_info = 10; | 
|  |  | 
|  | // Deprecated in M67. | 
|  | reserved 11; | 
|  | reserved "source_info"; | 
|  |  | 
|  | optional SyncEnums.GetUpdatesOrigin get_updates_origin = 12; | 
|  | } | 
|  |  | 
|  | // Datatype specifics statistics gathered at association time. | 
|  | message DatatypeAssociationStats { | 
|  | // The datatype that was associated. | 
|  | optional int32 data_type_id = 1; | 
|  |  | 
|  | // Waiting time before downloading starts. This measures the time between | 
|  | // receiving configuration request for a set of data types to starting | 
|  | // downloading data of this type. | 
|  | optional int64 download_wait_time_us = 15; | 
|  |  | 
|  | // Time spent on downloading sync data for first time sync. | 
|  | // Note: This measures the time between asking backend to download data to | 
|  | //       being notified of download-ready by backend. So it consists of | 
|  | //       time on data downloading and processing at sync backend. But | 
|  | //       downloading time should dominate. It's also the total time spent on | 
|  | //       downloading data of all types in the priority group of | 
|  | //       |data_type_id| instead of just one data type. | 
|  | optional int64 download_time_us = 13; | 
|  |  | 
|  | // Higher priority type that's configured before this type. | 
|  | repeated int32 high_priority_type_configured_before = 18; | 
|  |  | 
|  | // Same priority type that's configured before this type. | 
|  | repeated int32 same_priority_type_configured_before = 19; | 
|  |  | 
|  | reserved "num_local_items_before_association"; | 
|  | reserved 2; | 
|  | reserved "num_sync_items_before_association"; | 
|  | reserved 3; | 
|  | reserved "num_local_items_after_association"; | 
|  | reserved 4; | 
|  | reserved "num_sync_items_after_association"; | 
|  | reserved 5; | 
|  | reserved "num_local_items_added"; | 
|  | reserved 6; | 
|  | reserved "num_local_items_deleted"; | 
|  | reserved 7; | 
|  | reserved "num_local_items_modified"; | 
|  | reserved 8; | 
|  | reserved "num_sync_items_added"; | 
|  | reserved 9; | 
|  | reserved "num_sync_items_deleted"; | 
|  | reserved 10; | 
|  | reserved "num_sync_items_modified"; | 
|  | reserved 11; | 
|  | reserved "had_error"; | 
|  | reserved 12; | 
|  | reserved "association_wait_time_for_same_priority_us"; | 
|  | reserved 14; | 
|  | reserved "association_wait_time_for_high_priority_us"; | 
|  | reserved 16; | 
|  | reserved "association_time_us"; | 
|  | reserved 17; | 
|  | reserved "local_version_pre_association"; | 
|  | reserved 20; | 
|  | reserved "sync_version_pre_association"; | 
|  | reserved 21; | 
|  | } | 
|  |  | 
|  | message DebugEventInfo { | 
|  | // Each of the following fields correspond to different kinds of events. as | 
|  | // a result, only one is set during any single DebugEventInfo. | 
|  | // A singleton event. See enum definition. | 
|  | optional SyncEnums.SingletonDebugEventType singleton_event = 1; | 
|  | // A sync cycle completed. | 
|  | optional SyncCycleCompletedEventInfo sync_cycle_completed_event_info = 2; | 
|  | // A datatype triggered a nudge. | 
|  | optional int32 nudging_datatype = 3; | 
|  | // A notification triggered a nudge. | 
|  | repeated int32 datatypes_notified_from_server = 4; | 
|  | // A datatype finished model association. | 
|  | optional DatatypeAssociationStats datatype_association_stats = 5; | 
|  | } | 
|  |  | 
|  | message DebugInfo { | 
|  | repeated DebugEventInfo events = 1; | 
|  |  | 
|  | // Whether cryptographer is ready to encrypt and decrypt data. | 
|  | optional bool cryptographer_ready = 2; | 
|  |  | 
|  | // Cryptographer has pending keys which indicates the correct passphrase | 
|  | // has not been provided yet. | 
|  | optional bool cryptographer_has_pending_keys = 3; | 
|  |  | 
|  | // Indicates client has dropped some events to save bandwidth. | 
|  | optional bool events_dropped = 4; | 
|  | } |