Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: sync/engine/sync_scheduler_impl.cc

Issue 10825137: FYI: Control Data + Per-Device Metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PER_USER_METADATA, refactor some encryption code Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // Helper to extract the routing info and workers corresponding to types in 300 // Helper to extract the routing info and workers corresponding to types in
301 // |types| from |current_routes| and |current_workers|. 301 // |types| from |current_routes| and |current_workers|.
302 void BuildModelSafeParams( 302 void BuildModelSafeParams(
303 const ModelTypeSet& types_to_download, 303 const ModelTypeSet& types_to_download,
304 const ModelSafeRoutingInfo& current_routes, 304 const ModelSafeRoutingInfo& current_routes,
305 const std::vector<ModelSafeWorker*>& current_workers, 305 const std::vector<ModelSafeWorker*>& current_workers,
306 ModelSafeRoutingInfo* result_routes, 306 ModelSafeRoutingInfo* result_routes,
307 std::vector<ModelSafeWorker*>* result_workers) { 307 std::vector<ModelSafeWorker*>* result_workers) {
308 std::set<ModelSafeGroup> active_groups; 308 std::set<ModelSafeGroup> active_groups;
309 active_groups.insert(GROUP_PASSIVE); 309 active_groups.insert(GROUP_PASSIVE);
310 active_groups.insert(GROUP_CONTROL);
310 for (ModelTypeSet::Iterator iter = types_to_download.First(); iter.Good(); 311 for (ModelTypeSet::Iterator iter = types_to_download.First(); iter.Good();
311 iter.Inc()) { 312 iter.Inc()) {
312 ModelType type = iter.Get(); 313 ModelType type = iter.Get();
313 ModelSafeRoutingInfo::const_iterator route = current_routes.find(type); 314 ModelSafeRoutingInfo::const_iterator route = current_routes.find(type);
314 DCHECK(route != current_routes.end()); 315 DCHECK(route != current_routes.end());
315 ModelSafeGroup group = route->second; 316 ModelSafeGroup group = route->second;
316 (*result_routes)[type] = group; 317 (*result_routes)[type] = group;
317 active_groups.insert(group); 318 active_groups.insert(group);
318 } 319 }
319 320
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 1148
1148 #undef SDVLOG_LOC 1149 #undef SDVLOG_LOC
1149 1150
1150 #undef SDVLOG 1151 #undef SDVLOG
1151 1152
1152 #undef SLOG 1153 #undef SLOG
1153 1154
1154 #undef ENUM_CASE 1155 #undef ENUM_CASE
1155 1156
1156 } // namespace syncer 1157 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698