OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "sync/engine/download.h" | 5 #include "sync/engine/download.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "sync/engine/syncer.h" | 10 #include "sync/engine/syncer.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 // Get progress markers and other data for requested types. | 138 // Get progress markers and other data for requested types. |
139 get_updates_processor->PrepareGetUpdates(proto_request_types, get_updates); | 139 get_updates_processor->PrepareGetUpdates(proto_request_types, get_updates); |
140 | 140 |
141 // Set legacy GetUpdatesMessage.GetUpdatesCallerInfo information. | 141 // Set legacy GetUpdatesMessage.GetUpdatesCallerInfo information. |
142 get_updates->mutable_caller_info()->set_source( | 142 get_updates->mutable_caller_info()->set_source( |
143 nudge_tracker.updates_source()); | 143 nudge_tracker.updates_source()); |
144 | 144 |
145 // Set the new and improved version of source, too. | 145 // Set the new and improved version of source, too. |
146 get_updates->set_get_updates_origin(sync_pb::SyncEnums::GU_TRIGGER); | 146 get_updates->set_get_updates_origin(sync_pb::SyncEnums::GU_TRIGGER); |
147 get_updates->set_is_retry( | 147 get_updates->set_is_retry(nudge_tracker.IsRetryRequired()); |
148 nudge_tracker.IsRetryRequired(base::TimeTicks::Now())); | |
149 | 148 |
150 // Fill in the notification hints. | 149 // Fill in the notification hints. |
151 for (int i = 0; i < get_updates->from_progress_marker_size(); ++i) { | 150 for (int i = 0; i < get_updates->from_progress_marker_size(); ++i) { |
152 sync_pb::DataTypeProgressMarker* progress_marker = | 151 sync_pb::DataTypeProgressMarker* progress_marker = |
153 get_updates->mutable_from_progress_marker(i); | 152 get_updates->mutable_from_progress_marker(i); |
154 ModelType type = GetModelTypeFromSpecificsFieldNumber( | 153 ModelType type = GetModelTypeFromSpecificsFieldNumber( |
155 progress_marker->data_type_id()); | 154 progress_marker->data_type_id()); |
156 | 155 |
157 DCHECK(!nudge_tracker.IsTypeThrottled(type)) | 156 DCHECK(!nudge_tracker.IsTypeThrottled(type)) |
158 << "Throttled types should have been removed from the request_types."; | 157 << "Throttled types should have been removed from the request_types."; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 void CopyClientDebugInfo( | 362 void CopyClientDebugInfo( |
364 sessions::DebugInfoGetter* debug_info_getter, | 363 sessions::DebugInfoGetter* debug_info_getter, |
365 sync_pb::DebugInfo* debug_info) { | 364 sync_pb::DebugInfo* debug_info) { |
366 DVLOG(1) << "Copying client debug info to send."; | 365 DVLOG(1) << "Copying client debug info to send."; |
367 debug_info_getter->GetDebugInfo(debug_info); | 366 debug_info_getter->GetDebugInfo(debug_info); |
368 } | 367 } |
369 | 368 |
370 } // namespace download | 369 } // namespace download |
371 | 370 |
372 } // namespace syncer | 371 } // namespace syncer |
OLD | NEW |