OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // the child will have a bad parent causing an error. As this is not a | 96 // the child will have a bad parent causing an error. As this is not a |
97 // critical error, we trap it and don't LOG(ERROR). To enable this we keep | 97 // critical error, we trap it and don't LOG(ERROR). To enable this we keep |
98 // a map of conflicting new folders. | 98 // a map of conflicting new folders. |
99 int transient_error_commits = 0; | 99 int transient_error_commits = 0; |
100 int conflicting_commits = 0; | 100 int conflicting_commits = 0; |
101 int error_commits = 0; | 101 int error_commits = 0; |
102 int successes = 0; | 102 int successes = 0; |
103 bool over_quota = false; | 103 bool over_quota = false; |
104 set<syncable::Id> conflicting_new_folder_ids; | 104 set<syncable::Id> conflicting_new_folder_ids; |
105 set<syncable::Id> deleted_folders; | 105 set<syncable::Id> deleted_folders; |
106 bool truncated_commit_logged = false; | |
107 { // Scope for WriteTransaction. | 106 { // Scope for WriteTransaction. |
108 WriteTransaction trans(dir, SYNCER, __FILE__, __LINE__); | 107 WriteTransaction trans(dir, SYNCER, __FILE__, __LINE__); |
109 for (int i = 0; i < cr.entryresponse_size(); i++) { | 108 for (int i = 0; i < cr.entryresponse_size(); i++) { |
110 CommitResponse::RESPONSE_TYPE response_type = | 109 CommitResponse::RESPONSE_TYPE response_type = |
111 ProcessSingleCommitResponse(&trans, cr.entryresponse(i), | 110 ProcessSingleCommitResponse(&trans, cr.entryresponse(i), |
112 commit_ids[i], | 111 commit_ids[i], |
113 &conflicting_new_folder_ids, | 112 &conflicting_new_folder_ids, |
114 &deleted_folders, session); | 113 &deleted_folders, session); |
115 switch (response_type) { | 114 switch (response_type) { |
116 case CommitResponse::INVALID_MESSAGE: | 115 case CommitResponse::INVALID_MESSAGE: |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 364 |
366 LOG(INFO) << "Server commit moved aside entry: " << old_name.db_value() | 365 LOG(INFO) << "Server commit moved aside entry: " << old_name.db_value() |
367 << " to new name " << db_name; | 366 << " to new name " << db_name; |
368 | 367 |
369 // Should be safe since we're in a "commit lock." | 368 // Should be safe since we're in a "commit lock." |
370 local_entry->PutName(Name::FromDBNameAndSyncName(db_name, server_name)); | 369 local_entry->PutName(Name::FromDBNameAndSyncName(db_name, server_name)); |
371 } | 370 } |
372 } | 371 } |
373 | 372 |
374 } // namespace browser_sync | 373 } // namespace browser_sync |
OLD | NEW |