| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/sync/engine_impl/get_updates_processor.h" | 5 #include "components/sync/engine_impl/get_updates_processor.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 for (int i = 0; i < update_count; ++i) { | 69 for (int i = 0; i < update_count; ++i) { |
| 70 const sync_pb::SyncEntity& update = gu_response.entries(i); | 70 const sync_pb::SyncEntity& update = gu_response.entries(i); |
| 71 ModelType type = GetModelType(update); | 71 ModelType type = GetModelType(update); |
| 72 if (!IsRealDataType(type)) { | 72 if (!IsRealDataType(type)) { |
| 73 NOTREACHED() << "Received update with invalid type."; | 73 NOTREACHED() << "Received update with invalid type."; |
| 74 continue; | 74 continue; |
| 75 } | 75 } |
| 76 | 76 |
| 77 TypeSyncEntityMap::iterator it = updates_by_type->find(type); | 77 TypeSyncEntityMap::iterator it = updates_by_type->find(type); |
| 78 if (it == updates_by_type->end()) { | 78 if (it == updates_by_type->end()) { |
| 79 DLOG(WARNING) | 79 DLOG(WARNING) << "Received update for unexpected type, or the type is " |
| 80 << "Received update for unexpected type or the type is throttled:" | 80 "throttled or failed with partial failure:" |
| 81 << ModelTypeToString(type); | 81 << ModelTypeToString(type); |
| 82 continue; | 82 continue; |
| 83 } | 83 } |
| 84 | 84 |
| 85 it->second.push_back(&update); | 85 it->second.push_back(&update); |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 // Builds a map of ModelTypes to indices to progress markers in the given | 89 // Builds a map of ModelTypes to indices to progress markers in the given |
| 90 // |gu_response| message. The map is returned in the |index_map| parameter. | 90 // |gu_response| message. The map is returned in the |index_map| parameter. |
| 91 void PartitionProgressMarkersByType( | 91 void PartitionProgressMarkersByType( |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } | 360 } |
| 361 | 361 |
| 362 void GetUpdatesProcessor::CopyClientDebugInfo( | 362 void GetUpdatesProcessor::CopyClientDebugInfo( |
| 363 DebugInfoGetter* debug_info_getter, | 363 DebugInfoGetter* debug_info_getter, |
| 364 sync_pb::DebugInfo* debug_info) { | 364 sync_pb::DebugInfo* debug_info) { |
| 365 DVLOG(1) << "Copying client debug info to send."; | 365 DVLOG(1) << "Copying client debug info to send."; |
| 366 debug_info_getter->GetDebugInfo(debug_info); | 366 debug_info_getter->GetDebugInfo(debug_info); |
| 367 } | 367 } |
| 368 | 368 |
| 369 } // namespace syncer | 369 } // namespace syncer |
| OLD | NEW |