| 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/engine/process_commit_response_command.h" | 5 #include "sync/engine/process_commit_response_command.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 ++error_commits; | 127 ++error_commits; |
| 128 break; | 128 break; |
| 129 case CommitResponse::CONFLICT: | 129 case CommitResponse::CONFLICT: |
| 130 ++conflicting_commits; | 130 ++conflicting_commits; |
| 131 conflict_progress->AddServerConflictingItemById( | 131 conflict_progress->AddServerConflictingItemById( |
| 132 commit_set_.GetCommitIdAt(proj[i])); | 132 commit_set_.GetCommitIdAt(proj[i])); |
| 133 break; | 133 break; |
| 134 case CommitResponse::SUCCESS: | 134 case CommitResponse::SUCCESS: |
| 135 // TODO(sync): worry about sync_rate_ rate calc? | 135 // TODO(sync): worry about sync_rate_ rate calc? |
| 136 ++successes; | 136 ++successes; |
| 137 if (commit_set_.GetModelTypeAt(proj[i]) == syncable::BOOKMARKS) | 137 if (commit_set_.GetModelTypeAt(proj[i]) == syncer::BOOKMARKS) |
| 138 status->increment_num_successful_bookmark_commits(); | 138 status->increment_num_successful_bookmark_commits(); |
| 139 status->increment_num_successful_commits(); | 139 status->increment_num_successful_commits(); |
| 140 break; | 140 break; |
| 141 case CommitResponse::OVER_QUOTA: | 141 case CommitResponse::OVER_QUOTA: |
| 142 // We handle over quota like a retry, which is same as transient. | 142 // We handle over quota like a retry, which is same as transient. |
| 143 case CommitResponse::RETRY: | 143 case CommitResponse::RETRY: |
| 144 case CommitResponse::TRANSIENT_ERROR: | 144 case CommitResponse::TRANSIENT_ERROR: |
| 145 ++transient_error_commits; | 145 ++transient_error_commits; |
| 146 break; | 146 break; |
| 147 default: | 147 default: |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 // been recursively deleted. | 469 // been recursively deleted. |
| 470 // TODO(nick): Here, commit_message.deleted() would be more correct than | 470 // TODO(nick): Here, commit_message.deleted() would be more correct than |
| 471 // local_entry->Get(IS_DEL). For example, an item could be renamed, and then | 471 // local_entry->Get(IS_DEL). For example, an item could be renamed, and then |
| 472 // deleted during the commit of the rename. Unit test & fix. | 472 // deleted during the commit of the rename. Unit test & fix. |
| 473 if (local_entry->Get(IS_DIR) && local_entry->Get(IS_DEL)) { | 473 if (local_entry->Get(IS_DIR) && local_entry->Get(IS_DEL)) { |
| 474 deleted_folders->insert(local_entry->Get(ID)); | 474 deleted_folders->insert(local_entry->Get(ID)); |
| 475 } | 475 } |
| 476 } | 476 } |
| 477 | 477 |
| 478 } // namespace syncer | 478 } // namespace syncer |
| OLD | NEW |