Index: chrome/browser/sync/syncable/syncable.h |
diff --git a/chrome/browser/sync/syncable/syncable.h b/chrome/browser/sync/syncable/syncable.h |
index 4f8875f92ddac46987a8a898a70f446fbde1fc8c..73409a4ad1ad4ea473b1aafa592401c97732a96f 100644 |
--- a/chrome/browser/sync/syncable/syncable.h |
+++ b/chrome/browser/sync/syncable/syncable.h |
@@ -910,19 +910,24 @@ class Directory { |
public: |
typedef std::vector<int64> ChildHandles; |
- // Returns the child meta handles for given parent id. Clears |
- // |result| if there are no children. |
+ // Returns the child meta handles (even those for deleted/unlinked |
+ // nodes) for given parent id. Clears |result| if there are no |
+ // children. |
void GetChildHandlesById(BaseTransaction*, const Id& parent_id, |
ChildHandles* result); |
- // Returns the child meta handles for given meta handle. Clears |
- // |result| if there are no children. |
+ // Returns the child meta handles (even those for deleted/unlinked |
+ // nodes) for given meta handle. Clears |result| if there are no |
+ // children. |
void GetChildHandlesByHandle(BaseTransaction*, int64 handle, |
ChildHandles* result); |
+ // Returns true iff |id| has children. |
+ bool HasChildren(BaseTransaction* trans, const Id& id); |
+ |
// Find the first or last child in the positional ordering under a parent, |
// and return its id. Returns a root Id if parent has no children. |
- virtual Id GetFirstChildId(BaseTransaction* trans, const Id& parent_id); |
+ Id GetFirstChildId(BaseTransaction* trans, const Id& parent_id); |
Id GetLastChildId(BaseTransaction* trans, const Id& parent_id); |
// Compute a local predecessor position for |update_item|. The position |
@@ -1149,6 +1154,12 @@ class Directory { |
const ScopedKernelLock& lock, |
const Id& parent_id, Directory::ChildHandles* result); |
+ // Returns a pointer to what is probably (but not certainly) the |
+ // first child of |parent_id|, or NULL if |parent_id| definitely has |
+ // no children. |
+ EntryKernel* GetPossibleFirstChild( |
+ const ScopedKernelLock& lock, const Id& parent_id); |
+ |
Kernel* kernel_; |
DirectoryBackingStore* store_; |