| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Sync protocol for communication between sync client and server. | 5 // Sync protocol for communication between sync client and server. | 
| 6 | 6 | 
| 7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change | 7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change | 
| 8 // any fields in this file. | 8 // any fields in this file. | 
| 9 | 9 | 
| 10 syntax = "proto2"; | 10 syntax = "proto2"; | 
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 394   // make commit-time decisions about how to process datatypes that might | 394   // make commit-time decisions about how to process datatypes that might | 
| 395   // involve server-side interaction, and e.g require explicit user intent for | 395   // involve server-side interaction, and e.g require explicit user intent for | 
| 396   // syncing a particular data type regardless of whether a commit for that | 396   // syncing a particular data type regardless of whether a commit for that | 
| 397   // datatype is currently being sent up. | 397   // datatype is currently being sent up. | 
| 398   optional ClientConfigParams config_params = 4; | 398   optional ClientConfigParams config_params = 4; | 
| 399 }; | 399 }; | 
| 400 | 400 | 
| 401 // This message communicates additional per-type information related to | 401 // This message communicates additional per-type information related to | 
| 402 // requests with origin GU_TRIGGER.  This message is not relevant when any | 402 // requests with origin GU_TRIGGER.  This message is not relevant when any | 
| 403 // other origin value is used. | 403 // other origin value is used. | 
| 404 // Introduced in M28. | 404 // Introduced in M29. | 
| 405 message GetUpdateTriggers { | 405 message GetUpdateTriggers { | 
| 406   // An opaque-to-the-client string of bytes, received through a notification, | 406   // An opaque-to-the-client string of bytes, received through a notification, | 
| 407   // that the server may interpret as a hint about the location of the latest | 407   // that the server may interpret as a hint about the location of the latest | 
| 408   // version of the data for this type. | 408   // version of the data for this type. | 
| 409   // | 409   // | 
| 410   // Note that this will eventually replace the 'optional' field of the same | 410   // Note that this will eventually replace the 'optional' field of the same | 
| 411   // name defined in the progress marker, but the client and server should | 411   // name defined in the progress marker, but the client and server should | 
| 412   // support both until it's safe to deprecate the old one. | 412   // support both until it's safe to deprecate the old one. | 
| 413   // | 413   // | 
| 414   // This field was introduced in M28. | 414   // This field was introduced in M29. | 
| 415   repeated string notification_hint = 1; | 415   repeated string notification_hint = 1; | 
| 416 | 416 | 
| 417   // This flag is set if the client was forced to drop hints because the number | 417   // This flag is set if the client was forced to drop hints because the number | 
| 418   // of queued hints exceeded its limit.  The oldest hints will be discarded | 418   // of queued hints exceeded its limit.  The oldest hints will be discarded | 
| 419   // first.  Introduced in M28. | 419   // first.  Introduced in M29. | 
| 420   optional bool client_dropped_hints = 2; | 420   optional bool client_dropped_hints = 2; | 
| 421 | 421 | 
| 422   // This flag is set if the invalidation server reports that it may have | 422   // This flag is set if the invalidation server reports that it may have | 
| 423   // dropped some invalidations at some point.  The client will also drop any | 423   // dropped some invalidations at some point.  The client will also drop any | 
| 424   // locally cached hints that are older than the server-did-drop notification. | 424   // locally cached hints that are older than the server-did-drop notification. | 
| 425   // | 425   // | 
| 426   // TODO(sync): Determine the format for this. | 426   // TODO(sync): Determine the format for this. | 
| 427   // | 427   // | 
| 428   // optional bool server_dropped_hints = 6; | 428   // optional bool server_dropped_hints = 6; | 
| 429 | 429 | 
| 430   // This flag is set when the client suspects that its list of invalidation | 430   // This flag is set when the client suspects that its list of invalidation | 
| 431   // hints may be incomplete.  This may be the case if: | 431   // hints may be incomplete.  This may be the case if: | 
| 432   // - The client is syncing for the first time. | 432   // - The client is syncing for the first time. | 
| 433   // - The client has just restarted and it was unable to keep track of | 433   // - The client has just restarted and it was unable to keep track of | 
| 434   //   invalidations that were received prior to the restart. | 434   //   invalidations that were received prior to the restart. | 
| 435   // - The client's connection to the invalidation server is currently or | 435   // - The client's connection to the invalidation server is currently or | 
| 436   //   was recently broken. | 436   //   was recently broken. | 
| 437   // | 437   // | 
| 438   // It's difficult to provide more details here.  This is implemented by | 438   // It's difficult to provide more details here.  This is implemented by | 
| 439   // setting the flag to false whenever anything that might adversely affect | 439   // setting the flag to false whenever anything that might adversely affect | 
| 440   // notifications happens (eg. a crash, restart on a platform that doesn't | 440   // notifications happens (eg. a crash, restart on a platform that doesn't | 
| 441   // support invalidation ack-tracking, transient invalidation error) and is | 441   // support invalidation ack-tracking, transient invalidation error) and is | 
| 442   // unset only after we've experienced one successful sync cycle while | 442   // unset only after we've experienced one successful sync cycle while | 
| 443   // notifications were enabled. | 443   // notifications were enabled. | 
| 444   // | 444   // | 
| 445   // This flag was introduced in M28. | 445   // This flag was introduced in M29. | 
| 446   optional bool invalidations_out_of_sync = 3; | 446   optional bool invalidations_out_of_sync = 3; | 
| 447 | 447 | 
| 448   // This counts the number of times the syncer has been asked to commit | 448   // This counts the number of times the syncer has been asked to commit | 
| 449   // changes for this type since the last successful sync cycle.  The number of | 449   // changes for this type since the last successful sync cycle.  The number of | 
| 450   // nudges may not be related to the actual number of items modified.  It | 450   // nudges may not be related to the actual number of items modified.  It | 
| 451   // often correlates with the number of user actions, but that's not always | 451   // often correlates with the number of user actions, but that's not always | 
| 452   // the case. | 452   // the case. | 
| 453   // Introduced in M28. | 453   // Introduced in M29. | 
| 454   optional int64 local_modification_nudges = 4; | 454   optional int64 local_modification_nudges = 4; | 
| 455 | 455 | 
| 456   // This counts the number of times the syncer has been explicitly asked to | 456   // This counts the number of times the syncer has been explicitly asked to | 
| 457   // fetch updates for this type since the last successful sync cycle.  These | 457   // fetch updates for this type since the last successful sync cycle.  These | 
| 458   // explicit refresh requests should be relatively rare on most platforms, and | 458   // explicit refresh requests should be relatively rare on most platforms, and | 
| 459   // associated with user actions.  For example, at the time of this writing | 459   // associated with user actions.  For example, at the time of this writing | 
| 460   // the most common (only?) source of refresh requests is when a user opens | 460   // the most common (only?) source of refresh requests is when a user opens | 
| 461   // the new tab page on a platform that does not support sessions | 461   // the new tab page on a platform that does not support sessions | 
| 462   // invalidations. | 462   // invalidations. | 
| 463   // Introduced in M28. | 463   // Introduced in M29. | 
| 464   optional int64 datatype_refresh_nudges = 5; | 464   optional int64 datatype_refresh_nudges = 5; | 
| 465 } | 465 } | 
| 466 | 466 | 
| 467 message DataTypeProgressMarker { | 467 message DataTypeProgressMarker { | 
| 468   // An integer identifying the data type whose progress is tracked by this | 468   // An integer identifying the data type whose progress is tracked by this | 
| 469   // marker.  The legitimate values of this field correspond to the protobuf | 469   // marker.  The legitimate values of this field correspond to the protobuf | 
| 470   // field numbers of all EntitySpecifics fields supported by the server. | 470   // field numbers of all EntitySpecifics fields supported by the server. | 
| 471   // These values are externally declared in per-datatype .proto files. | 471   // These values are externally declared in per-datatype .proto files. | 
| 472   optional int32 data_type_id = 1; | 472   optional int32 data_type_id = 1; | 
| 473 | 473 | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 498   // progress tracking mechanism, but which wish to switch over to the opaque | 498   // progress tracking mechanism, but which wish to switch over to the opaque | 
| 499   // token mechanism can set this field in a GetUpdatesMessage.  The server | 499   // token mechanism can set this field in a GetUpdatesMessage.  The server | 
| 500   // will perform a get updates operation as normal from the indicated | 500   // will perform a get updates operation as normal from the indicated | 
| 501   // timestamp, and return only an opaque progress token. | 501   // timestamp, and return only an opaque progress token. | 
| 502   optional int64 timestamp_token_for_migration = 3; | 502   optional int64 timestamp_token_for_migration = 3; | 
| 503 | 503 | 
| 504   // An opaque-to-the-client string of bytes, received through a notification, | 504   // An opaque-to-the-client string of bytes, received through a notification, | 
| 505   // that the server may interpret as a hint about the location of the latest | 505   // that the server may interpret as a hint about the location of the latest | 
| 506   // version of the data for this type. | 506   // version of the data for this type. | 
| 507   // | 507   // | 
| 508   // Deprecated in M28.  We should use the repeated field version in the | 508   // Deprecated in M29.  We should use the repeated field version in the | 
| 509   // PerClientTypeState instead. | 509   // PerClientTypeState instead. | 
| 510   optional string notification_hint = 4; | 510   optional string notification_hint = 4; | 
| 511 | 511 | 
| 512   // This field will be included only in GetUpdates with origin GU_TRIGGER. | 512   // This field will be included only in GetUpdates with origin GU_TRIGGER. | 
| 513   optional GetUpdateTriggers get_update_triggers = 5; | 513   optional GetUpdateTriggers get_update_triggers = 5; | 
| 514 } | 514 } | 
| 515 | 515 | 
| 516 message GetUpdatesMessage { | 516 message GetUpdatesMessage { | 
| 517   // Indicates the client's current progress in downloading updates.  A | 517   // Indicates the client's current progress in downloading updates.  A | 
| 518   // from_timestamp value of zero means that the client is requesting a first- | 518   // from_timestamp value of zero means that the client is requesting a first- | 
| 519   // time sync.  After that point, clients should fill in this value with the | 519   // time sync.  After that point, clients should fill in this value with the | 
| 520   // value returned in the last-seen GetUpdatesResponse.new_timestamp. | 520   // value returned in the last-seen GetUpdatesResponse.new_timestamp. | 
| 521   // | 521   // | 
| 522   // from_timestamp has been deprecated; clients should use | 522   // from_timestamp has been deprecated; clients should use | 
| 523   // |from_progress_marker| instead, which allows more flexibility. | 523   // |from_progress_marker| instead, which allows more flexibility. | 
| 524   optional int64 from_timestamp = 1; | 524   optional int64 from_timestamp = 1; | 
| 525 | 525 | 
| 526   // Indicates the reason for the GetUpdatesMessage. | 526   // Indicates the reason for the GetUpdatesMessage. | 
| 527   // Deprecated in M28.  We should eventually rely on GetUpdatesOrigin instead. | 527   // Deprecated in M29.  We should eventually rely on GetUpdatesOrigin instead. | 
| 528   // Newer clients will support both systems during the transition period. | 528   // Newer clients will support both systems during the transition period. | 
| 529   optional GetUpdatesCallerInfo caller_info = 2; | 529   optional GetUpdatesCallerInfo caller_info = 2; | 
| 530 | 530 | 
| 531   // Indicates whether related folders should be fetched. | 531   // Indicates whether related folders should be fetched. | 
| 532   optional bool fetch_folders = 3 [default = true]; | 532   optional bool fetch_folders = 3 [default = true]; | 
| 533 | 533 | 
| 534   // The presence of an individual EntitySpecifics field indicates that the | 534   // The presence of an individual EntitySpecifics field indicates that the | 
| 535   // client requests sync object types associated with that field.  This | 535   // client requests sync object types associated with that field.  This | 
| 536   // determination depends only on the presence of the field, not its | 536   // determination depends only on the presence of the field, not its | 
| 537   // contents -- thus clients should send empty messages as the field value. | 537   // contents -- thus clients should send empty messages as the field value. | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 573   // The allowed frequency for requesting encryption keys is much lower than | 573   // The allowed frequency for requesting encryption keys is much lower than | 
| 574   // other datatypes, so repeated usage will likely result in throttling. | 574   // other datatypes, so repeated usage will likely result in throttling. | 
| 575   optional bool need_encryption_key = 8 [default = false]; | 575   optional bool need_encryption_key = 8 [default = false]; | 
| 576 | 576 | 
| 577   // Whether to create the mobile bookmarks folder if it's not | 577   // Whether to create the mobile bookmarks folder if it's not | 
| 578   // already created.  Should be set to true only by mobile clients. | 578   // already created.  Should be set to true only by mobile clients. | 
| 579   optional bool create_mobile_bookmarks_folder = 1000 [default = false]; | 579   optional bool create_mobile_bookmarks_folder = 1000 [default = false]; | 
| 580 | 580 | 
| 581   // This value is an udpated version of the GetUpdatesCallerInfo's | 581   // This value is an udpated version of the GetUpdatesCallerInfo's | 
| 582   // GetUpdatesSource.  It describes the reason for the GetUpdate request. | 582   // GetUpdatesSource.  It describes the reason for the GetUpdate request. | 
| 583   // Introduced in M28. | 583   // Introduced in M29. | 
| 584   optional SyncEnums.GetUpdatesOrigin get_updates_origin = 9; | 584   optional SyncEnums.GetUpdatesOrigin get_updates_origin = 9; | 
| 585 }; | 585 }; | 
| 586 | 586 | 
| 587 message AuthenticateMessage { | 587 message AuthenticateMessage { | 
| 588   required string auth_token = 1; | 588   required string auth_token = 1; | 
| 589 }; | 589 }; | 
| 590 | 590 | 
| 591 // The client must preserve, store, and resend the chip bag with | 591 // The client must preserve, store, and resend the chip bag with | 
| 592 // every request.  The server depends on the chip bag in order | 592 // every request.  The server depends on the chip bag in order | 
| 593 // to precisely choreograph a client-server state machines. | 593 // to precisely choreograph a client-server state machines. | 
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 855     // is absent then the whole client (all datatypes) is throttled. | 855     // is absent then the whole client (all datatypes) is throttled. | 
| 856     repeated int32 error_data_type_ids = 5; | 856     repeated int32 error_data_type_ids = 5; | 
| 857   } | 857   } | 
| 858   optional Error error = 13; | 858   optional Error error = 13; | 
| 859 | 859 | 
| 860   // The new per-client state for this client. If set, should be persisted and | 860   // The new per-client state for this client. If set, should be persisted and | 
| 861   // sent with any subsequent ClientToServerMessages. | 861   // sent with any subsequent ClientToServerMessages. | 
| 862   optional ChipBag new_bag_of_chips = 14; | 862   optional ChipBag new_bag_of_chips = 14; | 
| 863 }; | 863 }; | 
| 864 | 864 | 
| OLD | NEW | 
|---|