| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 entry. | 3 // found in the LICENSE entry. |
| 4 | 4 |
| 5 #include "chrome/browser/sync/engine/syncer.h" | 5 #include "chrome/browser/sync/engine/syncer.h" |
| 6 | 6 |
| 7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
| 8 #include "chrome/browser/sync/engine/apply_updates_command.h" | 8 #include "chrome/browser/sync/engine/apply_updates_command.h" |
| 9 #include "chrome/browser/sync/engine/build_and_process_conflict_sets_command.h" | 9 #include "chrome/browser/sync/engine/build_and_process_conflict_sets_command.h" |
| 10 #include "chrome/browser/sync/engine/build_commit_command.h" | 10 #include "chrome/browser/sync/engine/build_commit_command.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 111 } |
| 112 | 112 |
| 113 void Syncer::SyncShare(SyncerSession* session, | 113 void Syncer::SyncShare(SyncerSession* session, |
| 114 const SyncerStep first_step, | 114 const SyncerStep first_step, |
| 115 const SyncerStep last_step) { | 115 const SyncerStep last_step) { |
| 116 SyncerStep current_step = first_step; | 116 SyncerStep current_step = first_step; |
| 117 | 117 |
| 118 // Reset silenced_until_, it is the callers responsibility to honor throttles. | 118 // Reset silenced_until_, it is the callers responsibility to honor throttles. |
| 119 silenced_until_ = session->silenced_until(); | 119 silenced_until_ = session->silenced_until(); |
| 120 | 120 |
| 121 SyncerStep next_step; | 121 SyncerStep next_step = current_step; |
| 122 while (!ExitRequested()) { | 122 while (!ExitRequested()) { |
| 123 switch (current_step) { | 123 switch (current_step) { |
| 124 case SYNCER_BEGIN: | 124 case SYNCER_BEGIN: |
| 125 LOG(INFO) << "Syncer Begin"; | 125 LOG(INFO) << "Syncer Begin"; |
| 126 next_step = DOWNLOAD_UPDATES; | 126 next_step = DOWNLOAD_UPDATES; |
| 127 break; | 127 break; |
| 128 case DOWNLOAD_UPDATES: { | 128 case DOWNLOAD_UPDATES: { |
| 129 LOG(INFO) << "Downloading Updates"; | 129 LOG(INFO) << "Downloading Updates"; |
| 130 DownloadUpdatesCommand download_updates; | 130 DownloadUpdatesCommand download_updates; |
| 131 download_updates.Execute(session); | 131 download_updates.Execute(session); |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 entry.id_string().c_str(), | 331 entry.id_string().c_str(), |
| 332 entry.parent_id_string().c_str(), | 332 entry.parent_id_string().c_str(), |
| 333 entry.version(), | 333 entry.version(), |
| 334 entry.mtime(), ServerTimeToClientTime(entry.mtime()), | 334 entry.mtime(), ServerTimeToClientTime(entry.mtime()), |
| 335 entry.ctime(), ServerTimeToClientTime(entry.ctime()), | 335 entry.ctime(), ServerTimeToClientTime(entry.ctime()), |
| 336 entry.name().c_str(), entry.sync_timestamp(), | 336 entry.name().c_str(), entry.sync_timestamp(), |
| 337 entry.deleted() ? "deleted, ":""); | 337 entry.deleted() ? "deleted, ":""); |
| 338 } | 338 } |
| 339 | 339 |
| 340 } // namespace browser_sync | 340 } // namespace browser_sync |
| OLD | NEW |