Index: sync/engine/get_updates_delegate.cc |
diff --git a/sync/engine/get_updates_delegate.cc b/sync/engine/get_updates_delegate.cc |
index d0c7a173ad9898c5e33c4ef53033ff85ed3dcdcf..4697485b52f9de2cad1af415edf1bad5b6098bbf 100644 |
--- a/sync/engine/get_updates_delegate.cc |
+++ b/sync/engine/get_updates_delegate.cc |
@@ -46,12 +46,17 @@ void NormalGetUpdatesDelegate::HelpPopulateGuMessage( |
sync_pb::GetUpdatesMessage* get_updates) const { |
// Set legacy GetUpdatesMessage.GetUpdatesCallerInfo information. |
get_updates->mutable_caller_info()->set_source( |
- nudge_tracker_.updates_source()); |
+ nudge_tracker_.GetLegacySource()); |
// Set the new and improved version of source, too. |
get_updates->set_get_updates_origin(sync_pb::SyncEnums::GU_TRIGGER); |
get_updates->set_is_retry(nudge_tracker_.IsRetryRequired()); |
+ // Special case: A GU performed for no other reason than retry will have its |
+ // origin set to RETRY. |
+ if (nudge_tracker_.GetLegacySource() == sync_pb::GetUpdatesCallerInfo::RETRY) |
+ get_updates->set_get_updates_origin(sync_pb::SyncEnums::RETRY); |
+ |
// Fill in the notification hints. |
for (int i = 0; i < get_updates->from_progress_marker_size(); ++i) { |
sync_pb::DataTypeProgressMarker* progress_marker = |
@@ -75,27 +80,6 @@ void NormalGetUpdatesDelegate::ApplyUpdates( |
NonPassiveApplyUpdates(status_controller, update_handler_map); |
} |
-RetryGetUpdatesDelegate::RetryGetUpdatesDelegate() {} |
- |
-RetryGetUpdatesDelegate::~RetryGetUpdatesDelegate() {} |
- |
-void RetryGetUpdatesDelegate::HelpPopulateGuMessage( |
- sync_pb::GetUpdatesMessage* get_updates) const { |
- // Set legacy GetUpdatesMessage.GetUpdatesCallerInfo information. |
- get_updates->mutable_caller_info()->set_source( |
- sync_pb::GetUpdatesCallerInfo::RETRY); |
- |
- // Set the new and improved version of source, too. |
- get_updates->set_get_updates_origin(sync_pb::SyncEnums::RETRY); |
- get_updates->set_is_retry(true); |
-} |
- |
-void RetryGetUpdatesDelegate::ApplyUpdates( |
- sessions::StatusController* status_controller, |
- UpdateHandlerMap* update_handler_map) const { |
- NonPassiveApplyUpdates(status_controller, update_handler_map); |
-} |
- |
ConfigureGetUpdatesDelegate::ConfigureGetUpdatesDelegate( |
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source) : source_(source) {} |