| 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 #include "sync/engine/sync_scheduler_impl.h" | 5 #include "sync/engine/sync_scheduler_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // Helper to extract the routing info and workers corresponding to types in | 306 // Helper to extract the routing info and workers corresponding to types in |
| 307 // |types| from |current_routes| and |current_workers|. | 307 // |types| from |current_routes| and |current_workers|. |
| 308 void BuildModelSafeParams( | 308 void BuildModelSafeParams( |
| 309 const ModelTypeSet& types_to_download, | 309 const ModelTypeSet& types_to_download, |
| 310 const ModelSafeRoutingInfo& current_routes, | 310 const ModelSafeRoutingInfo& current_routes, |
| 311 const std::vector<ModelSafeWorker*>& current_workers, | 311 const std::vector<ModelSafeWorker*>& current_workers, |
| 312 ModelSafeRoutingInfo* result_routes, | 312 ModelSafeRoutingInfo* result_routes, |
| 313 std::vector<ModelSafeWorker*>* result_workers) { | 313 std::vector<ModelSafeWorker*>* result_workers) { |
| 314 std::set<ModelSafeGroup> active_groups; | 314 std::set<ModelSafeGroup> active_groups; |
| 315 active_groups.insert(GROUP_PASSIVE); | 315 active_groups.insert(GROUP_PASSIVE); |
| 316 active_groups.insert(GROUP_CONTROL); |
| 316 for (ModelTypeSet::Iterator iter = types_to_download.First(); iter.Good(); | 317 for (ModelTypeSet::Iterator iter = types_to_download.First(); iter.Good(); |
| 317 iter.Inc()) { | 318 iter.Inc()) { |
| 318 ModelType type = iter.Get(); | 319 ModelType type = iter.Get(); |
| 319 ModelSafeRoutingInfo::const_iterator route = current_routes.find(type); | 320 ModelSafeRoutingInfo::const_iterator route = current_routes.find(type); |
| 320 DCHECK(route != current_routes.end()); | 321 DCHECK(route != current_routes.end()); |
| 321 ModelSafeGroup group = route->second; | 322 ModelSafeGroup group = route->second; |
| 322 (*result_routes)[type] = group; | 323 (*result_routes)[type] = group; |
| 323 active_groups.insert(group); | 324 active_groups.insert(group); |
| 324 } | 325 } |
| 325 | 326 |
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 | 1193 |
| 1193 #undef SDVLOG_LOC | 1194 #undef SDVLOG_LOC |
| 1194 | 1195 |
| 1195 #undef SDVLOG | 1196 #undef SDVLOG |
| 1196 | 1197 |
| 1197 #undef SLOG | 1198 #undef SLOG |
| 1198 | 1199 |
| 1199 #undef ENUM_CASE | 1200 #undef ENUM_CASE |
| 1200 | 1201 |
| 1201 } // namespace syncer | 1202 } // namespace syncer |
| OLD | NEW |