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

Side by Side Diff: sync/internal_api/public/sessions/model_neutral_state.cc

Issue 10917234: sync: make scheduling logic and job ownership more obvious. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: eof 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
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/internal_api/public/sessions/model_neutral_state.h" 5 #include "sync/internal_api/public/sessions/model_neutral_state.h"
6 6
7 namespace syncer { 7 namespace syncer {
8 namespace sessions { 8 namespace sessions {
9 9
10 ModelNeutralState::ModelNeutralState() 10 ModelNeutralState::ModelNeutralState()
(...skipping 12 matching lines...) Expand all
23 last_download_updates_result(UNSET), 23 last_download_updates_result(UNSET),
24 commit_result(UNSET), 24 commit_result(UNSET),
25 conflicts_resolved(false), 25 conflicts_resolved(false),
26 items_committed(false), 26 items_committed(false),
27 debug_info_sent(false), 27 debug_info_sent(false),
28 num_server_changes_remaining(0) { 28 num_server_changes_remaining(0) {
29 } 29 }
30 30
31 ModelNeutralState::~ModelNeutralState() {} 31 ModelNeutralState::~ModelNeutralState() {}
32 32
33 bool HasSyncerError(const ModelNeutralState& state) {
34 const bool get_key_error = SyncerErrorIsError(state.last_get_key_result);
35 const bool download_updates_error =
36 SyncerErrorIsError(state.last_download_updates_result);
37 const bool commit_error = SyncerErrorIsError(state.commit_result);
38 return get_key_error || download_updates_error || commit_error;
39 }
40
33 } // namespace sessions 41 } // namespace sessions
34 } // namespace syncer 42 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/public/sessions/model_neutral_state.h ('k') | sync/internal_api/public/sessions/sync_session_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698