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

Side by Side Diff: sync/engine/sync_session_job.cc

Issue 11314008: sync: Follow-up to conflict resolution refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/engine/sync_scheduler_impl.cc ('k') | sync/engine/syncer.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "sync/engine/sync_session_job.h" 5 #include "sync/engine/sync_session_job.h"
6 #include "sync/internal_api/public/sessions/model_neutral_state.h" 6 #include "sync/internal_api/public/sessions/model_neutral_state.h"
7 7
8 namespace syncer { 8 namespace syncer {
9 9
10 SyncSessionJob::~SyncSessionJob() {} 10 SyncSessionJob::~SyncSessionJob() {}
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // until the SyncSession returned !HasMoreToSync()? 43 // until the SyncSession returned !HasMoreToSync()?
44 // Note: if not, it's possible the scheduler hasn't started with 44 // Note: if not, it's possible the scheduler hasn't started with
45 // SyncShare yet, it's possible there is still more to sync in the session, 45 // SyncShare yet, it's possible there is still more to sync in the session,
46 // and it's also possible the job quit part way through due to a premature 46 // and it's also possible the job quit part way through due to a premature
47 // exit condition (such as shutdown). 47 // exit condition (such as shutdown).
48 finished_ = early_exit ? EARLY_EXIT : FINISHED; 48 finished_ = early_exit ? EARLY_EXIT : FINISHED;
49 49
50 if (early_exit) 50 if (early_exit)
51 return false; 51 return false;
52 52
53 DCHECK(!session_->HasMoreToSync());
54
55 // Did we hit any errors along the way? 53 // Did we hit any errors along the way?
56 if (sessions::HasSyncerError( 54 if (sessions::HasSyncerError(
57 session_->status_controller().model_neutral_state())) { 55 session_->status_controller().model_neutral_state())) {
58 return false; 56 return false;
59 } 57 }
60 58
61 const sessions::ModelNeutralState& state( 59 const sessions::ModelNeutralState& state(
62 session_->status_controller().model_neutral_state()); 60 session_->status_controller().model_neutral_state());
63 switch (purpose_) { 61 switch (purpose_) {
64 case POLL: 62 case POLL:
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return; 173 return;
176 default: 174 default:
177 NOTREACHED(); 175 NOTREACHED();
178 *start = SYNCER_END; 176 *start = SYNCER_END;
179 *end = SYNCER_END; 177 *end = SYNCER_END;
180 return; 178 return;
181 } 179 }
182 } 180 }
183 181
184 } // namespace syncer 182 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler_impl.cc ('k') | sync/engine/syncer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698