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

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

Issue 8638001: [Sync] Made some sync session member functions const (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix latent bug in StatusController Created 9 years, 1 month 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/apply_updates_command_unittest.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 6d1f9583da1db07b210a81b2bc5231cbeba0a035..8b5a6b8db8d28e10eca8fe405b2cb0b2b03df8d0 100644
--- a/chrome/browser/sync/engine/apply_updates_command.cc
+++ b/chrome/browser/sync/engine/apply_updates_command.cc
@@ -32,16 +32,16 @@ void ApplyUpdatesCommand::ModelChangingExecuteImpl(SyncSession* session) {
session->context()->resolver(),
session->context()->directory_manager()->GetCryptographer(&trans),
handles.begin(), handles.end(), session->routing_info(),
- session->status_controller()->group_restriction());
+ session->status_controller().group_restriction());
while (applicator.AttemptOneApplication(&trans)) {}
applicator.SaveProgressIntoSessionState(
- session->status_controller()->mutable_conflict_progress(),
- session->status_controller()->mutable_update_progress());
+ session->mutable_status_controller()->mutable_conflict_progress(),
+ session->mutable_status_controller()->mutable_update_progress());
// This might be the first time we've fully completed a sync cycle, for
// some subset of the currently synced datatypes.
- sessions::StatusController* status(session->status_controller());
- if (status->ServerSaysNothingMoreToDownload()) {
+ const sessions::StatusController& status(session->status_controller());
+ if (status.ServerSaysNothingMoreToDownload()) {
syncable::ScopedDirLookup dir(session->context()->directory_manager(),
session->context()->account_name());
if (!dir.good()) {
@@ -52,7 +52,7 @@ void ApplyUpdatesCommand::ModelChangingExecuteImpl(SyncSession* session) {
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]) {
+ 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);
}
« no previous file with comments | « no previous file | chrome/browser/sync/engine/apply_updates_command_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698