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/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |