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

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

Issue 93433006: sync: Introduce ModelTypeRegistry and helpers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renames and moves Created 6 years, 11 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/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 SDVLOG(2) << "Reconfiguring syncer."; 286 SDVLOG(2) << "Reconfiguring syncer.";
287 287
288 // Only one configuration is allowed at a time. Verify we're not waiting 288 // Only one configuration is allowed at a time. Verify we're not waiting
289 // for a pending configure job. 289 // for a pending configure job.
290 DCHECK(!pending_configure_params_); 290 DCHECK(!pending_configure_params_);
291 291
292 ModelSafeRoutingInfo restricted_routes; 292 ModelSafeRoutingInfo restricted_routes;
293 BuildModelSafeParams(params.types_to_download, 293 BuildModelSafeParams(params.types_to_download,
294 params.routing_info, 294 params.routing_info,
295 &restricted_routes); 295 &restricted_routes);
296 session_context_->set_routing_info(restricted_routes); 296 session_context_->SetRoutingInfo(restricted_routes);
297 297
298 // Only reconfigure if we have types to download. 298 // Only reconfigure if we have types to download.
299 if (!params.types_to_download.Empty()) { 299 if (!params.types_to_download.Empty()) {
300 pending_configure_params_.reset(new ConfigurationParams(params)); 300 pending_configure_params_.reset(new ConfigurationParams(params));
301 TrySyncSessionJob(); 301 TrySyncSessionJob();
302 } else { 302 } else {
303 SDVLOG(2) << "No change in routing info, calling ready task directly."; 303 SDVLOG(2) << "No change in routing info, calling ready task directly.";
304 params.ready_task.Run(); 304 params.ready_task.Run();
305 } 305 }
306 } 306 }
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 906
907 #undef SDVLOG_LOC 907 #undef SDVLOG_LOC
908 908
909 #undef SDVLOG 909 #undef SDVLOG
910 910
911 #undef SLOG 911 #undef SLOG
912 912
913 #undef ENUM_CASE 913 #undef ENUM_CASE
914 914
915 } // namespace syncer 915 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698