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

Unified Diff: sync/engine/syncer.cc

Issue 38803003: sync: Implement per-type update processing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 7 years, 2 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 | « sync/engine/syncer.h ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer.cc
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
index 9f2c378b5cc42391d14b3c7f7a5f8be09758f227..50cc167bb968e8c85c38f2a344abd7cda98ec136 100644
--- a/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -61,6 +61,7 @@ bool Syncer::NormalSyncShare(ModelTypeSet request_types,
if (nudge_tracker.IsGetUpdatesRequired() ||
session->context()->ShouldFetchUpdatesBeforeCommit()) {
if (!DownloadAndApplyUpdates(
+ request_types,
session,
base::Bind(&BuildNormalDownloadUpdates,
session,
@@ -85,6 +86,7 @@ bool Syncer::ConfigureSyncShare(
HandleCycleBegin(session);
VLOG(1) << "Configuring types " << ModelTypeSetToString(request_types);
DownloadAndApplyUpdates(
+ request_types,
session,
base::Bind(&BuildDownloadUpdatesForConfigure,
session,
@@ -99,6 +101,7 @@ bool Syncer::PollSyncShare(ModelTypeSet request_types,
HandleCycleBegin(session);
VLOG(1) << "Polling types " << ModelTypeSetToString(request_types);
DownloadAndApplyUpdates(
+ request_types,
session,
base::Bind(&BuildDownloadUpdatesForPoll,
session,
@@ -122,13 +125,15 @@ void Syncer::ApplyUpdates(SyncSession* session) {
}
bool Syncer::DownloadAndApplyUpdates(
+ ModelTypeSet request_types,
SyncSession* session,
base::Callback<void(sync_pb::ClientToServerMessage*)> build_fn) {
while (!session->status_controller().ServerSaysNothingMoreToDownload()) {
TRACE_EVENT0("sync", "DownloadUpdates");
sync_pb::ClientToServerMessage msg;
build_fn.Run(&msg);
- SyncerError download_result = ExecuteDownloadUpdates(session, &msg);
+ SyncerError download_result =
+ ExecuteDownloadUpdates(request_types, session, &msg);
session->mutable_status_controller()->set_last_download_updates_result(
download_result);
if (download_result != SYNCER_OK) {
« no previous file with comments | « sync/engine/syncer.h ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698