OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "sync/syncable/directory.h" | 5 #include "sync/syncable/directory.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 // Add the position index if appropriate. This must be done here (and not | 1153 // Add the position index if appropriate. This must be done here (and not |
1154 // in EntryKernel) because the EntryKernel does not have access to its | 1154 // in EntryKernel) because the EntryKernel does not have access to its |
1155 // siblings. | 1155 // siblings. |
1156 if (kernel->ShouldMaintainPosition() && !kernel->ref(IS_DEL)) { | 1156 if (kernel->ShouldMaintainPosition() && !kernel->ref(IS_DEL)) { |
1157 node->SetInteger("positionIndex", GetPositionIndex(trans, kernel)); | 1157 node->SetInteger("positionIndex", GetPositionIndex(trans, kernel)); |
1158 } | 1158 } |
1159 | 1159 |
1160 nodes->Append(node.release()); | 1160 nodes->Append(node.release()); |
1161 } | 1161 } |
1162 | 1162 |
1163 return nodes.Pass(); | 1163 return nodes; |
1164 } | 1164 } |
1165 | 1165 |
1166 bool Directory::CheckInvariantsOnTransactionClose( | 1166 bool Directory::CheckInvariantsOnTransactionClose( |
1167 syncable::BaseTransaction* trans, | 1167 syncable::BaseTransaction* trans, |
1168 const MetahandleSet& modified_handles) { | 1168 const MetahandleSet& modified_handles) { |
1169 // NOTE: The trans may be in the process of being destructed. Be careful if | 1169 // NOTE: The trans may be in the process of being destructed. Be careful if |
1170 // you wish to call any of its virtual methods. | 1170 // you wish to call any of its virtual methods. |
1171 switch (invariant_check_level_) { | 1171 switch (invariant_check_level_) { |
1172 case FULL_DB_VERIFICATION: { | 1172 case FULL_DB_VERIFICATION: { |
1173 MetahandleSet all_handles; | 1173 MetahandleSet all_handles; |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 Directory::Kernel* Directory::kernel() { | 1578 Directory::Kernel* Directory::kernel() { |
1579 return kernel_; | 1579 return kernel_; |
1580 } | 1580 } |
1581 | 1581 |
1582 const Directory::Kernel* Directory::kernel() const { | 1582 const Directory::Kernel* Directory::kernel() const { |
1583 return kernel_; | 1583 return kernel_; |
1584 } | 1584 } |
1585 | 1585 |
1586 } // namespace syncable | 1586 } // namespace syncable |
1587 } // namespace syncer | 1587 } // namespace syncer |
OLD | NEW |