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

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

Issue 553015: Support for multiple sync ModelSafeWorkers.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Utility functions manipulating syncable::Entries, intended for use by the 5 // Utility functions manipulating syncable::Entries, intended for use by the
6 // syncer. 6 // syncer.
7 7
8 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_ 8 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_
9 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_ 9 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 static void MarkDeletedChildrenSynced( 140 static void MarkDeletedChildrenSynced(
141 const syncable::ScopedDirLookup &dir, 141 const syncable::ScopedDirLookup &dir,
142 std::set<syncable::Id>* deleted_folders); 142 std::set<syncable::Id>* deleted_folders);
143 143
144 // Examine the up-to-date predecessors of this item according to the server 144 // Examine the up-to-date predecessors of this item according to the server
145 // position, and then again according to the local position. Return true 145 // position, and then again according to the local position. Return true
146 // if they match. For an up-to-date item, this should be the case. 146 // if they match. For an up-to-date item, this should be the case.
147 static bool ServerAndLocalOrdersMatch(syncable::Entry* entry); 147 static bool ServerAndLocalOrdersMatch(syncable::Entry* entry);
148 148
149 static browser_sync::SyncDataType GetSyncDataType(const SyncEntity& entry); 149 static syncable::ModelType GetModelType(const SyncEntity& entry);
150 150
151 private: 151 private:
152 // Private ctor/dtor since this class shouldn't be instantiated. 152 DISALLOW_IMPLICIT_CONSTRUCTORS(SyncerUtil);
153 SyncerUtil() {}
154 virtual ~SyncerUtil() {}
155 DISALLOW_COPY_AND_ASSIGN(SyncerUtil);
156 }; 153 };
157 154
158 #ifndef OS_WIN 155 #ifndef OS_WIN
159 156
160 // time.h on Linux and Mac both return seconds since the epoch, this should 157 // time.h on Linux and Mac both return seconds since the epoch, this should
161 // be converted to milliseconds. 158 // be converted to milliseconds.
162 inline int64 ServerTimeToClientTime(int64 server_time) { 159 inline int64 ServerTimeToClientTime(int64 server_time) {
163 return server_time / GG_LONGLONG(1000); 160 return server_time / GG_LONGLONG(1000);
164 } 161 }
165 162
(...skipping 22 matching lines...) Expand all
188 185
189 inline bool ClientAndServerTimeMatch(int64 client_time, int64 server_time) { 186 inline bool ClientAndServerTimeMatch(int64 client_time, int64 server_time) {
190 // Compare at the coarser timescale (server) 187 // Compare at the coarser timescale (server)
191 return ClientTimeToServerTime(client_time) == server_time; 188 return ClientTimeToServerTime(client_time) == server_time;
192 } 189 }
193 #endif 190 #endif
194 191
195 } // namespace browser_sync 192 } // namespace browser_sync
196 193
197 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_ 194 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer_unittest.cc ('k') | chrome/browser/sync/engine/syncer_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698