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

Unified Diff: sync/engine/store_timestamps_command.cc

Issue 10916174: Implement a bag of chips for sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Follow review Created 8 years, 3 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/store_timestamps_command.cc
diff --git a/sync/engine/store_timestamps_command.cc b/sync/engine/store_timestamps_command.cc
index bab995e7a99ce830607fabf324245874bed17349..d13f4a18b30b4ba686543abc55593581038d9c94 100644
--- a/sync/engine/store_timestamps_command.cc
+++ b/sync/engine/store_timestamps_command.cc
@@ -4,6 +4,7 @@
#include "sync/engine/store_timestamps_command.h"
+#include "sync/engine/syncer_proto_util.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/status_controller.h"
#include "sync/sessions/sync_session.h"
@@ -18,11 +19,15 @@ SyncerError StoreTimestampsCommand::ExecuteImpl(
sessions::SyncSession* session) {
syncable::Directory* dir = session->context()->directory();
- const sync_pb::GetUpdatesResponse& updates =
- session->status_controller().updates_response().get_updates();
+ const sync_pb::ClientToServerResponse& response =
+ session->status_controller().updates_response();
+ const sync_pb::GetUpdatesResponse& updates = response.get_updates();
sessions::StatusController* status = session->mutable_status_controller();
+ // Persist a bag of chips if it has been sent by the server.
+ SyncerProtoUtil::PersistBagOfChips(dir, response);
+
// Update the progress marker tokens from the server result. If a marker
// was omitted for any one type, that indicates no change from the previous
// state.

Powered by Google App Engine
This is Rietveld 408576698