Index: chrome/browser/sync/engine/process_updates_command.cc |
diff --git a/chrome/browser/sync/engine/process_updates_command.cc b/chrome/browser/sync/engine/process_updates_command.cc |
index c6d41411be5659d36c5541a38417177a683e29f7..367be000a8463ffc7d09b3d6915300a64881ef2e 100644 |
--- a/chrome/browser/sync/engine/process_updates_command.cc |
+++ b/chrome/browser/sync/engine/process_updates_command.cc |
@@ -28,7 +28,7 @@ ProcessUpdatesCommand::~ProcessUpdatesCommand() {} |
bool ProcessUpdatesCommand::ModelNeutralExecuteImpl(SyncSession* session) { |
const GetUpdatesResponse& updates = |
- session->status_controller()->updates_response().get_updates(); |
+ session->status_controller().updates_response().get_updates(); |
const int update_count = updates.entries_size(); |
// Don't bother processing updates if there were none. |
@@ -43,13 +43,15 @@ void ProcessUpdatesCommand::ModelChangingExecuteImpl(SyncSession* session) { |
return; |
} |
- StatusController* status = session->status_controller(); |
- |
syncable::WriteTransaction trans(FROM_HERE, syncable::SYNCER, dir); |
Nicolas Zea
2011/11/22 20:18:45
Any reason you moved the transaction up? Seems bet
akalin
2011/11/22 22:06:07
Definitely unintentional. Fixed.
|
- const sessions::UpdateProgress& progress(status->update_progress()); |
+ const sessions::UpdateProgress* progress = |
+ session->status_controller().update_progress(); |
+ if (!progress) |
+ return; // Nothing to do. |
+ |
vector<sessions::VerifiedUpdate>::const_iterator it; |
- for (it = progress.VerifiedUpdatesBegin(); |
- it != progress.VerifiedUpdatesEnd(); |
+ for (it = progress->VerifiedUpdatesBegin(); |
+ it != progress->VerifiedUpdatesEnd(); |
++it) { |
const sync_pb::SyncEntity& update = it->second; |
@@ -65,10 +67,9 @@ void ProcessUpdatesCommand::ModelChangingExecuteImpl(SyncSession* session) { |
} |
} |
+ StatusController* status = session->mutable_status_controller(); |
status->set_num_consecutive_errors(0); |
- |
status->mutable_update_progress()->ClearVerifiedUpdates(); |
- return; |
} |
namespace { |