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

Unified Diff: sync/engine/syncer.cc

Issue 19309002: sync: Add pre-commit update avoidance mode + flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
Index: sync/engine/syncer.cc
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
index 9b1adb3791e0c84f5ea4a0c26d54a5f88a91cb5b..8992496cdf149e9a7554fdc41bc33da22efcec00 100644
--- a/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -64,14 +64,17 @@ bool Syncer::NormalSyncShare(ModelTypeSet request_types,
SyncSession* session) {
HandleCycleBegin(session);
VLOG(1) << "Downloading types " << ModelTypeSetToString(request_types);
- if (!DownloadAndApplyUpdates(
- session,
- base::Bind(&NormalDownloadUpdates,
- session,
- kCreateMobileBookmarksFolder,
- request_types,
- base::ConstRef(nudge_tracker)))) {
- return HandleCycleEnd(session);
+ if (nudge_tracker.IsGetUpdatesRequired()
+ || session->context()->should_fetch_updates_before_commit()) {
Nicolas Zea 2013/07/16 00:24:32 || on previous line
rlarocque 2013/07/16 01:08:27 Done.
+ if (!DownloadAndApplyUpdates(
+ session,
+ base::Bind(&NormalDownloadUpdates,
+ session,
+ kCreateMobileBookmarksFolder,
+ request_types,
+ base::ConstRef(nudge_tracker)))) {
+ return HandleCycleEnd(session);
+ }
}
VLOG(1) << "Committing from types " << ModelTypeSetToString(request_types);

Powered by Google App Engine
This is Rietveld 408576698