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

Unified Diff: chrome/browser/sync/engine/syncer.cc

Issue 1161006: Make it clear what last_sync_timestamp actually tracks. Update (Closed)
Patch Set: Undo accidental patch-juggling mistake. Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/engine/syncer.h ('k') | chrome/browser/sync/engine/syncer_end_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncer.cc
diff --git a/chrome/browser/sync/engine/syncer.cc b/chrome/browser/sync/engine/syncer.cc
index d6656b581504e96664c228bd81c45acca6afa566..26b98b3fb8000217383d0f5ef5a61e4f98fe49d7 100644
--- a/chrome/browser/sync/engine/syncer.cc
+++ b/chrome/browser/sync/engine/syncer.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/sync/engine/process_commit_response_command.h"
#include "chrome/browser/sync/engine/process_updates_command.h"
#include "chrome/browser/sync/engine/resolve_conflicts_command.h"
+#include "chrome/browser/sync/engine/store_timestamps_command.h"
#include "chrome/browser/sync/engine/syncer_end_command.h"
#include "chrome/browser/sync/engine/syncer_types.h"
#include "chrome/browser/sync/engine/syncer_util.h"
@@ -139,9 +140,18 @@ void Syncer::SyncShare(sessions::SyncSession* session,
LOG(INFO) << "Processing Updates";
ProcessUpdatesCommand process_updates;
process_updates.Execute(session);
+ next_step = STORE_TIMESTAMPS;
+ break;
+ }
+ case STORE_TIMESTAMPS: {
+ LOG(INFO) << "Storing timestamps";
+ StoreTimestampsCommand store_timestamps;
+ store_timestamps.Execute(session);
// We should download all of the updates before attempting to process
// them.
- if (session->status_controller()->CountUpdates() == 0) {
+ if (session->status_controller()->
+ server_says_nothing_more_to_download() ||
+ !session->status_controller()->download_updates_succeeded()) {
next_step = APPLY_UPDATES;
} else {
next_step = DOWNLOAD_UPDATES;
« no previous file with comments | « chrome/browser/sync/engine/syncer.h ('k') | chrome/browser/sync/engine/syncer_end_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698