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

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: Add missing files 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 SDVLOG(2) << "Reconfiguring syncer."; 285 SDVLOG(2) << "Reconfiguring syncer.";
286 286
287 // Only one configuration is allowed at a time. Verify we're not waiting 287 // Only one configuration is allowed at a time. Verify we're not waiting
288 // for a pending configure job. 288 // for a pending configure job.
289 DCHECK(!pending_configure_params_); 289 DCHECK(!pending_configure_params_);
290 290
291 ModelSafeRoutingInfo restricted_routes; 291 ModelSafeRoutingInfo restricted_routes;
292 BuildModelSafeParams(params.types_to_download, 292 BuildModelSafeParams(params.types_to_download,
293 params.routing_info, 293 params.routing_info,
294 &restricted_routes); 294 &restricted_routes);
295 session_context_->set_routing_info(restricted_routes); 295 session_context_->SetRoutingInfo(restricted_routes);
296 296
297 // Only reconfigure if we have types to download. 297 // Only reconfigure if we have types to download.
298 if (!params.types_to_download.Empty()) { 298 if (!params.types_to_download.Empty()) {
299 pending_configure_params_.reset(new ConfigurationParams(params)); 299 pending_configure_params_.reset(new ConfigurationParams(params));
300 TrySyncSessionJob(NORMAL_PRIORITY); 300 TrySyncSessionJob(NORMAL_PRIORITY);
301 } else { 301 } else {
302 SDVLOG(2) << "No change in routing info, calling ready task directly."; 302 SDVLOG(2) << "No change in routing info, calling ready task directly.";
303 params.ready_task.Run(); 303 params.ready_task.Run();
304 } 304 }
305 } 305 }
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 902
903 #undef SDVLOG_LOC 903 #undef SDVLOG_LOC
904 904
905 #undef SDVLOG 905 #undef SDVLOG
906 906
907 #undef SLOG 907 #undef SLOG
908 908
909 #undef ENUM_CASE 909 #undef ENUM_CASE
910 910
911 } // namespace syncer 911 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698