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

Side by Side Diff: chrome/browser/sync/engine/process_commit_response_command.cc

Issue 9305001: sync: Remove the remaining conflict sets code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More renames, refactors and fixes Created 8 years, 10 months 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 "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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 status->GetCommitIdAt(proj[i]), 167 status->GetCommitIdAt(proj[i]),
168 &conflicting_new_folder_ids, 168 &conflicting_new_folder_ids,
169 &deleted_folders); 169 &deleted_folders);
170 switch (response_type) { 170 switch (response_type) {
171 case CommitResponse::INVALID_MESSAGE: 171 case CommitResponse::INVALID_MESSAGE:
172 ++error_commits; 172 ++error_commits;
173 break; 173 break;
174 case CommitResponse::CONFLICT: 174 case CommitResponse::CONFLICT:
175 ++conflicting_commits; 175 ++conflicting_commits;
176 // Only server CONFLICT responses will activate conflict resolution. 176 // Only server CONFLICT responses will activate conflict resolution.
177 conflict_progress->AddConflictingItemById( 177 conflict_progress->AddServerConflictingItemById(
178 status->GetCommitIdAt(proj[i])); 178 status->GetCommitIdAt(proj[i]));
179 break; 179 break;
180 case CommitResponse::SUCCESS: 180 case CommitResponse::SUCCESS:
181 // TODO(sync): worry about sync_rate_ rate calc? 181 // TODO(sync): worry about sync_rate_ rate calc?
182 ++successes; 182 ++successes;
183 if (status->GetCommitModelTypeAt(proj[i]) == syncable::BOOKMARKS) 183 if (status->GetCommitModelTypeAt(proj[i]) == syncable::BOOKMARKS)
184 status->increment_num_successful_bookmark_commits(); 184 status->increment_num_successful_bookmark_commits();
185 status->increment_num_successful_commits(); 185 status->increment_num_successful_commits();
186 break; 186 break;
187 case CommitResponse::OVER_QUOTA: 187 case CommitResponse::OVER_QUOTA:
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 // been recursively deleted. 515 // been recursively deleted.
516 // TODO(nick): Here, commit_message.deleted() would be more correct than 516 // TODO(nick): Here, commit_message.deleted() would be more correct than
517 // local_entry->Get(IS_DEL). For example, an item could be renamed, and then 517 // local_entry->Get(IS_DEL). For example, an item could be renamed, and then
518 // deleted during the commit of the rename. Unit test & fix. 518 // deleted during the commit of the rename. Unit test & fix.
519 if (local_entry->Get(IS_DIR) && local_entry->Get(IS_DEL)) { 519 if (local_entry->Get(IS_DIR) && local_entry->Get(IS_DEL)) {
520 deleted_folders->insert(local_entry->Get(ID)); 520 deleted_folders->insert(local_entry->Get(ID));
521 } 521 }
522 } 522 }
523 523
524 } // namespace browser_sync 524 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698