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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/engine/cleanup_disabled_types_command.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/engine/apply_updates_command.h" 5 #include "chrome/browser/sync/engine/apply_updates_command.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "chrome/browser/sync/engine/update_applicator.h" 8 #include "chrome/browser/sync/engine/update_applicator.h"
9 #include "chrome/browser/sync/sessions/sync_session.h" 9 #include "chrome/browser/sync/sessions/sync_session.h"
10 #include "chrome/browser/sync/syncable/directory_manager.h" 10 #include "chrome/browser/sync/syncable/directory_manager.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 session->status_controller().group_restriction()); 86 session->status_controller().group_restriction());
87 while (applicator.AttemptOneApplication(&trans)) {} 87 while (applicator.AttemptOneApplication(&trans)) {}
88 applicator.SaveProgressIntoSessionState( 88 applicator.SaveProgressIntoSessionState(
89 session->mutable_status_controller()->mutable_conflict_progress(), 89 session->mutable_status_controller()->mutable_conflict_progress(),
90 session->mutable_status_controller()->mutable_update_progress()); 90 session->mutable_status_controller()->mutable_update_progress());
91 91
92 // This might be the first time we've fully completed a sync cycle, for 92 // This might be the first time we've fully completed a sync cycle, for
93 // some subset of the currently synced datatypes. 93 // some subset of the currently synced datatypes.
94 const sessions::StatusController& status(session->status_controller()); 94 const sessions::StatusController& status(session->status_controller());
95 if (status.ServerSaysNothingMoreToDownload()) { 95 if (status.ServerSaysNothingMoreToDownload()) {
96 for (int i = syncable::FIRST_REAL_MODEL_TYPE; 96 for (syncable::ModelEnumSet::Iterator it =
97 i < syncable::MODEL_TYPE_COUNT; ++i) { 97 status.updates_request_types().First(); it.Good(); it.Inc()) {
98 syncable::ModelType model_type = syncable::ModelTypeFromInt(i); 98 // This gets persisted to the directory's backing store.
99 if (status.updates_request_types()[i]) { 99 dir->set_initial_sync_ended_for_type(it.Get(), true);
100 // This gets persisted to the directory's backing store.
101 dir->set_initial_sync_ended_for_type(model_type, true);
102 }
103 } 100 }
104 } 101 }
105 } 102 }
106 103
107 } // namespace browser_sync 104 } // namespace browser_sync
OLDNEW
« 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