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

Side by Side Diff: chrome/browser/sync/engine/syncer.h

Issue 7042028: Detect & destroy dead conflictresolver paths. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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) 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 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ 6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 LongChangelistCreatesFakeOrphanedEntries); 123 LongChangelistCreatesFakeOrphanedEntries);
124 FRIEND_TEST_ALL_PREFIXES(SyncerTest, QuicklyMergeDualCreatedHierarchy); 124 FRIEND_TEST_ALL_PREFIXES(SyncerTest, QuicklyMergeDualCreatedHierarchy);
125 FRIEND_TEST_ALL_PREFIXES(SyncerTest, LongChangelistWithApplicationConflict); 125 FRIEND_TEST_ALL_PREFIXES(SyncerTest, LongChangelistWithApplicationConflict);
126 FRIEND_TEST_ALL_PREFIXES(SyncerTest, DeletingEntryWithLocalEdits); 126 FRIEND_TEST_ALL_PREFIXES(SyncerTest, DeletingEntryWithLocalEdits);
127 FRIEND_TEST_ALL_PREFIXES(EntryCreatedInNewFolderTest, 127 FRIEND_TEST_ALL_PREFIXES(EntryCreatedInNewFolderTest,
128 EntryCreatedInNewFolderMidSync); 128 EntryCreatedInNewFolderMidSync);
129 129
130 DISALLOW_COPY_AND_ASSIGN(Syncer); 130 DISALLOW_COPY_AND_ASSIGN(Syncer);
131 }; 131 };
132 132
133 // Inline utility functions.
134
135 // Given iterator ranges from two collections sorted according to a common
136 // strict weak ordering, return true if the two ranges contain any common
137 // items, and false if they do not. This function is in this header so that it
138 // can be tested.
139 template <class Iterator1, class Iterator2>
140 bool SortedCollectionsIntersect(Iterator1 begin1, Iterator1 end1,
141 Iterator2 begin2, Iterator2 end2) {
142 Iterator1 i1 = begin1;
143 Iterator2 i2 = begin2;
144 while (i1 != end1 && i2 != end2) {
145 if (*i1 == *i2)
146 return true;
147 if (*i1 > *i2)
148 ++i2;
149 else
150 ++i1;
151 }
152 return false;
153 }
154 // Utility function declarations. 133 // Utility function declarations.
155 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); 134 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest);
156 void ClearServerData(syncable::MutableEntry* entry); 135 void ClearServerData(syncable::MutableEntry* entry);
157 136
158 } // namespace browser_sync 137 } // namespace browser_sync
159 138
160 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ 139 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_
161 140
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/conflict_resolver.cc ('k') | chrome/browser/sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698