| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // A class that watches the syncer and attempts to resolve any conflicts that | 5 // A class that watches the syncer and attempts to resolve any conflicts that |
| 6 // occur. | 6 // occur. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SYNC_ENGINE_CONFLICT_RESOLVER_H_ | 8 #ifndef CHROME_BROWSER_SYNC_ENGINE_CONFLICT_RESOLVER_H_ |
| 9 #define CHROME_BROWSER_SYNC_ENGINE_CONFLICT_RESOLVER_H_ | 9 #define CHROME_BROWSER_SYNC_ENGINE_CONFLICT_RESOLVER_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Returns true if we're stuck. | 80 // Returns true if we're stuck. |
| 81 template <typename InputIt> | 81 template <typename InputIt> |
| 82 bool LogAndSignalIfConflictStuck(syncable::BaseTransaction* trans, | 82 bool LogAndSignalIfConflictStuck(syncable::BaseTransaction* trans, |
| 83 int attempt_count, | 83 int attempt_count, |
| 84 InputIt start, InputIt end, | 84 InputIt start, InputIt end, |
| 85 sessions::StatusController* status); | 85 sessions::StatusController* status); |
| 86 | 86 |
| 87 ConflictSetCountMap conflict_set_count_map_; | 87 ConflictSetCountMap conflict_set_count_map_; |
| 88 SimpleConflictCountMap simple_conflict_count_map_; | 88 SimpleConflictCountMap simple_conflict_count_map_; |
| 89 | 89 |
| 90 // Contains the ids of uncommitted items that are children of entries merged | |
| 91 // in the previous cycle. This is used to speed up the merge resolution of | |
| 92 // deep trees. Used to happen in store refresh. | |
| 93 // TODO(chron): Can we get rid of this optimization? | |
| 94 std::set<syncable::Id> children_of_merged_dirs_; | |
| 95 | |
| 96 DISALLOW_COPY_AND_ASSIGN(ConflictResolver); | 90 DISALLOW_COPY_AND_ASSIGN(ConflictResolver); |
| 97 }; | 91 }; |
| 98 | 92 |
| 99 } // namespace browser_sync | 93 } // namespace browser_sync |
| 100 | 94 |
| 101 #endif // CHROME_BROWSER_SYNC_ENGINE_CONFLICT_RESOLVER_H_ | 95 #endif // CHROME_BROWSER_SYNC_ENGINE_CONFLICT_RESOLVER_H_ |
| OLD | NEW |