| 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 "chrome/browser/sync/engine/process_commit_response_command.h" | 5 #include "chrome/browser/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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 status->GetCommitIdAt(proj[i]), | 158 status->GetCommitIdAt(proj[i]), |
| 159 &conflicting_new_folder_ids, | 159 &conflicting_new_folder_ids, |
| 160 &deleted_folders); | 160 &deleted_folders); |
| 161 switch (response_type) { | 161 switch (response_type) { |
| 162 case CommitResponse::INVALID_MESSAGE: | 162 case CommitResponse::INVALID_MESSAGE: |
| 163 ++error_commits; | 163 ++error_commits; |
| 164 break; | 164 break; |
| 165 case CommitResponse::CONFLICT: | 165 case CommitResponse::CONFLICT: |
| 166 ++conflicting_commits; | 166 ++conflicting_commits; |
| 167 // Only server CONFLICT responses will activate conflict resolution. | 167 // Only server CONFLICT responses will activate conflict resolution. |
| 168 conflict_progress->AddConflictingItemById( | 168 conflict_progress->AddServerConflictingItemById( |
| 169 status->GetCommitIdAt(proj[i])); | 169 status->GetCommitIdAt(proj[i])); |
| 170 break; | 170 break; |
| 171 case CommitResponse::SUCCESS: | 171 case CommitResponse::SUCCESS: |
| 172 // TODO(sync): worry about sync_rate_ rate calc? | 172 // TODO(sync): worry about sync_rate_ rate calc? |
| 173 ++successes; | 173 ++successes; |
| 174 if (status->GetCommitModelTypeAt(proj[i]) == syncable::BOOKMARKS) | 174 if (status->GetCommitModelTypeAt(proj[i]) == syncable::BOOKMARKS) |
| 175 status->increment_num_successful_bookmark_commits(); | 175 status->increment_num_successful_bookmark_commits(); |
| 176 status->increment_num_successful_commits(); | 176 status->increment_num_successful_commits(); |
| 177 break; | 177 break; |
| 178 case CommitResponse::OVER_QUOTA: | 178 case CommitResponse::OVER_QUOTA: |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 // been recursively deleted. | 494 // been recursively deleted. |
| 495 // TODO(nick): Here, commit_message.deleted() would be more correct than | 495 // TODO(nick): Here, commit_message.deleted() would be more correct than |
| 496 // local_entry->Get(IS_DEL). For example, an item could be renamed, and then | 496 // local_entry->Get(IS_DEL). For example, an item could be renamed, and then |
| 497 // deleted during the commit of the rename. Unit test & fix. | 497 // deleted during the commit of the rename. Unit test & fix. |
| 498 if (local_entry->Get(IS_DIR) && local_entry->Get(IS_DEL)) { | 498 if (local_entry->Get(IS_DIR) && local_entry->Get(IS_DEL)) { |
| 499 deleted_folders->insert(local_entry->Get(ID)); | 499 deleted_folders->insert(local_entry->Get(ID)); |
| 500 } | 500 } |
| 501 } | 501 } |
| 502 | 502 |
| 503 } // namespace browser_sync | 503 } // namespace browser_sync |
| OLD | NEW |