| OLD | NEW |
| 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 |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "chrome/browser/sync/engine/syncer.h" | 16 #include "chrome/browser/sync/engine/syncer.h" |
| 17 #include "chrome/browser/sync/engine/syncer_types.h" | 17 #include "chrome/browser/sync/engine/syncer_types.h" |
| 18 #include "chrome/browser/sync/syncable/syncable.h" | 18 #include "chrome/browser/sync/syncable/syncable.h" |
| 19 #include "chrome/browser/sync/syncable/syncable_id.h" | 19 #include "chrome/browser/sync/syncable/syncable_id.h" |
| 20 #include "chrome/browser/sync/util/path_helpers.h" | |
| 21 #include "chrome/browser/sync/util/sync_types.h" | 20 #include "chrome/browser/sync/util/sync_types.h" |
| 22 | 21 |
| 23 namespace browser_sync { | 22 namespace browser_sync { |
| 24 | 23 |
| 25 class SyncEntity; | 24 class SyncEntity; |
| 26 | 25 |
| 27 class SyncerUtil { | 26 class SyncerUtil { |
| 28 public: | 27 public: |
| 29 static void ChangeEntryIDAndUpdateChildren( | 28 static void ChangeEntryIDAndUpdateChildren( |
| 30 syncable::WriteTransaction* trans, | 29 syncable::WriteTransaction* trans, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 186 |
| 188 inline bool ClientAndServerTimeMatch(int64 client_time, int64 server_time) { | 187 inline bool ClientAndServerTimeMatch(int64 client_time, int64 server_time) { |
| 189 // Compare at the coarser timescale (server) | 188 // Compare at the coarser timescale (server) |
| 190 return ClientTimeToServerTime(client_time) == server_time; | 189 return ClientTimeToServerTime(client_time) == server_time; |
| 191 } | 190 } |
| 192 #endif | 191 #endif |
| 193 | 192 |
| 194 } // namespace browser_sync | 193 } // namespace browser_sync |
| 195 | 194 |
| 196 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_ | 195 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_ |
| OLD | NEW |