| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |