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

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

Issue 8772074: [Sync] Convert syncable/ directory to ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 9 years 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 | « no previous file | chrome/browser/sync/engine/cleanup_disabled_types_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/apply_updates_command.cc
diff --git a/chrome/browser/sync/engine/apply_updates_command.cc b/chrome/browser/sync/engine/apply_updates_command.cc
index 98331f0a0be9c93031cea1a9c40badd52c30a8d3..a95f75f701632973770b2ed29b53051050953f93 100644
--- a/chrome/browser/sync/engine/apply_updates_command.cc
+++ b/chrome/browser/sync/engine/apply_updates_command.cc
@@ -93,13 +93,10 @@ void ApplyUpdatesCommand::ModelChangingExecuteImpl(SyncSession* session) {
// some subset of the currently synced datatypes.
const sessions::StatusController& status(session->status_controller());
if (status.ServerSaysNothingMoreToDownload()) {
- for (int i = syncable::FIRST_REAL_MODEL_TYPE;
- i < syncable::MODEL_TYPE_COUNT; ++i) {
- syncable::ModelType model_type = syncable::ModelTypeFromInt(i);
- if (status.updates_request_types()[i]) {
- // This gets persisted to the directory's backing store.
- dir->set_initial_sync_ended_for_type(model_type, true);
- }
+ for (syncable::ModelEnumSet::Iterator it =
+ status.updates_request_types().First(); it.Good(); it.Inc()) {
+ // This gets persisted to the directory's backing store.
+ dir->set_initial_sync_ended_for_type(it.Get(), true);
}
}
}
« no previous file with comments | « no previous file | chrome/browser/sync/engine/cleanup_disabled_types_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698