| 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/sessions/sync_session.h" | 5 #include "sync/sessions/sync_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // | 227 // |
| 228 bool IsError(SyncerError error) { | 228 bool IsError(SyncerError error) { |
| 229 return error != UNSET | 229 return error != UNSET |
| 230 && error != SYNCER_OK; | 230 && error != SYNCER_OK; |
| 231 } | 231 } |
| 232 } // namespace | 232 } // namespace |
| 233 | 233 |
| 234 bool SyncSession::Succeeded() const { | 234 bool SyncSession::Succeeded() const { |
| 235 const bool download_updates_error = | 235 const bool download_updates_error = |
| 236 IsError(status_controller_->error().last_download_updates_result); | 236 IsError(status_controller_->error().last_download_updates_result); |
| 237 const bool post_commit_error = | 237 const bool commit_error = |
| 238 IsError(status_controller_->error().last_post_commit_result); | 238 IsError(status_controller_->error().commit_result); |
| 239 const bool process_commit_response_error = | 239 return !download_updates_error && !commit_error; |
| 240 IsError(status_controller_->error().last_process_commit_response_result); | |
| 241 return !download_updates_error | |
| 242 && !post_commit_error | |
| 243 && !process_commit_response_error; | |
| 244 } | 240 } |
| 245 | 241 |
| 246 } // namespace sessions | 242 } // namespace sessions |
| 247 } // namespace browser_sync | 243 } // namespace browser_sync |
| OLD | NEW |