| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/engine/sync_scheduler.h" | 5 #include "chrome/browser/sync/engine/sync_scheduler.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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 SDVLOG(2) << "Dropping a nudge in " | 755 SDVLOG(2) << "Dropping a nudge in " |
| 756 << "DoSyncSessionJob because another nudge was scheduled"; | 756 << "DoSyncSessionJob because another nudge was scheduled"; |
| 757 return; // Another nudge must have been scheduled in in the meantime. | 757 return; // Another nudge must have been scheduled in in the meantime. |
| 758 } | 758 } |
| 759 pending_nudge_.reset(); | 759 pending_nudge_.reset(); |
| 760 | 760 |
| 761 // Create the session with the latest model safe table and use it to purge | 761 // Create the session with the latest model safe table and use it to purge |
| 762 // and update any disabled or modified entries in the job. | 762 // and update any disabled or modified entries in the job. |
| 763 scoped_ptr<SyncSession> session(CreateSyncSession(job.session->source())); | 763 scoped_ptr<SyncSession> session(CreateSyncSession(job.session->source())); |
| 764 | 764 |
| 765 job.session->RebaseRoutingInfoWithLatest(session.get()); | 765 job.session->RebaseRoutingInfoWithLatest(*session); |
| 766 } | 766 } |
| 767 SDVLOG(2) << "DoSyncSessionJob with " | 767 SDVLOG(2) << "DoSyncSessionJob with " |
| 768 << SyncSessionJob::GetPurposeString(job.purpose) << " job"; | 768 << SyncSessionJob::GetPurposeString(job.purpose) << " job"; |
| 769 | 769 |
| 770 SyncerStep begin(SYNCER_END); | 770 SyncerStep begin(SYNCER_END); |
| 771 SyncerStep end(SYNCER_END); | 771 SyncerStep end(SYNCER_END); |
| 772 SetSyncerStepsForPurpose(job.purpose, &begin, &end); | 772 SetSyncerStepsForPurpose(job.purpose, &begin, &end); |
| 773 | 773 |
| 774 bool has_more_to_sync = true; | 774 bool has_more_to_sync = true; |
| 775 while (ShouldRunJob(job) && has_more_to_sync) { | 775 while (ShouldRunJob(job) && has_more_to_sync) { |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 | 1187 |
| 1188 #undef SDVLOG_LOC | 1188 #undef SDVLOG_LOC |
| 1189 | 1189 |
| 1190 #undef SDVLOG | 1190 #undef SDVLOG |
| 1191 | 1191 |
| 1192 #undef SLOG | 1192 #undef SLOG |
| 1193 | 1193 |
| 1194 #undef ENUM_CASE | 1194 #undef ENUM_CASE |
| 1195 | 1195 |
| 1196 } // browser_sync | 1196 } // browser_sync |
| OLD | NEW |