| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 SYNC_SYNCABLE_SYNCABLE_UTIL_H_ | 5 #ifndef SYNC_SYNCABLE_SYNCABLE_UTIL_H_ |
| 6 #define SYNC_SYNCABLE_SYNCABLE_UTIL_H_ | 6 #define SYNC_SYNCABLE_SYNCABLE_UTIL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 | 11 |
| 12 namespace tracked_objects { | 12 namespace tracked_objects { |
| 13 class Location; | 13 class Location; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace syncer { |
| 16 namespace syncable { | 17 namespace syncable { |
| 17 | 18 |
| 18 class BaseTransaction; | 19 class BaseTransaction; |
| 19 class WriteTransaction; | 20 class WriteTransaction; |
| 20 class MutableEntry; | 21 class MutableEntry; |
| 21 class Id; | 22 class Id; |
| 22 | 23 |
| 23 void ChangeEntryIDAndUpdateChildren(WriteTransaction* trans, | 24 void ChangeEntryIDAndUpdateChildren(WriteTransaction* trans, |
| 24 MutableEntry* entry, | 25 MutableEntry* entry, |
| 25 const Id& new_id); | 26 const Id& new_id); |
| 26 | 27 |
| 27 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid); | 28 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid); |
| 28 | 29 |
| 29 bool SyncAssert(bool condition, | 30 bool SyncAssert(bool condition, |
| 30 const tracked_objects::Location& location, | 31 const tracked_objects::Location& location, |
| 31 const char* msg, | 32 const char* msg, |
| 32 BaseTransaction* trans); | 33 BaseTransaction* trans); |
| 33 | 34 |
| 34 int GetUnsyncedEntries(BaseTransaction* trans, | 35 int GetUnsyncedEntries(BaseTransaction* trans, |
| 35 std::vector<int64> *handles); | 36 std::vector<int64> *handles); |
| 36 | 37 |
| 37 } // namespace syncable | 38 } // namespace syncable |
| 39 } // namespace syncer |
| 38 | 40 |
| 39 #endif // SYNC_SYNCABLE_SYNCABLE_UTIL_H_ | 41 #endif // SYNC_SYNCABLE_SYNCABLE_UTIL_H_ |
| OLD | NEW |