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

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: Fix memory leak in tests 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 SDVLOG(2) << "Reconfiguring syncer."; 287 SDVLOG(2) << "Reconfiguring syncer.";
288 288
289 // Only one configuration is allowed at a time. Verify we're not waiting 289 // Only one configuration is allowed at a time. Verify we're not waiting
290 // for a pending configure job. 290 // for a pending configure job.
291 DCHECK(!pending_configure_params_); 291 DCHECK(!pending_configure_params_);
292 292
293 ModelSafeRoutingInfo restricted_routes; 293 ModelSafeRoutingInfo restricted_routes;
294 BuildModelSafeParams(params.types_to_download, 294 BuildModelSafeParams(params.types_to_download,
295 params.routing_info, 295 params.routing_info,
296 &restricted_routes); 296 &restricted_routes);
297 session_context_->set_routing_info(restricted_routes); 297 session_context_->SetRoutingInfo(restricted_routes);
298 298
299 // Only reconfigure if we have types to download. 299 // Only reconfigure if we have types to download.
300 if (!params.types_to_download.Empty()) { 300 if (!params.types_to_download.Empty()) {
301 pending_configure_params_.reset(new ConfigurationParams(params)); 301 pending_configure_params_.reset(new ConfigurationParams(params));
302 TrySyncSessionJob(); 302 TrySyncSessionJob();
303 } else { 303 } else {
304 SDVLOG(2) << "No change in routing info, calling ready task directly."; 304 SDVLOG(2) << "No change in routing info, calling ready task directly.";
305 params.ready_task.Run(); 305 params.ready_task.Run();
306 } 306 }
307 } 307 }
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 927
928 #undef SDVLOG_LOC 928 #undef SDVLOG_LOC
929 929
930 #undef SDVLOG 930 #undef SDVLOG
931 931
932 #undef SLOG 932 #undef SLOG
933 933
934 #undef ENUM_CASE 934 #undef ENUM_CASE
935 935
936 } // namespace syncer 936 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/sync_directory_update_handler_unittest.cc ('k') | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698