Chromium Code Reviews| Index: chrome/browser/sync/syncable/syncable.h |
| diff --git a/chrome/browser/sync/syncable/syncable.h b/chrome/browser/sync/syncable/syncable.h |
| index 73409a4ad1ad4ea473b1aafa592401c97732a96f..bb7b0b2490cfeb40103da5029ef501df4f7b3779 100644 |
| --- a/chrome/browser/sync/syncable/syncable.h |
| +++ b/chrome/browser/sync/syncable/syncable.h |
| @@ -925,10 +925,20 @@ class Directory { |
| // 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. |
| - Id GetFirstChildId(BaseTransaction* trans, const Id& parent_id); |
| - Id GetLastChildId(BaseTransaction* trans, const Id& parent_id); |
| + // Find the first child in the positional ordering under a parent, |
| + // and fill in |*first_child_id| with its id. Fills in a root Id if |
| + // parent has no children. Returns true if the first child was |
| + // successfully found, or false if an error was encountered. |
| + bool GetFirstChildId(BaseTransaction* trans, const Id& parent_id, |
|
Nicolas Zea
2011/10/27 18:28:30
WARN_UNUSED_RESULT for new methods that return err
akalin
2011/10/27 21:11:43
Done.
|
| + Id* first_child_id); |
| + |
| + // Find the last child in the positional ordering under a parent, |
| + // and fill in |*first_child_id| with its id. Fills in a root Id if |
| + // parent has no children. Returns true if the first child was |
| + // successfully found, or false if an error was encountered. |
| + bool GetLastChildIdForTest( |
|
Nicolas Zea
2011/10/27 18:28:30
Prefer having first argument on this line and othe
akalin
2011/10/27 21:11:43
Done.
|
| + BaseTransaction* trans, const Id& parent_id, |
| + Id* last_child_id); |
| // Compute a local predecessor position for |update_item|. The position |
| // is determined by the SERVER_POSITION_IN_PARENT value of |update_item|, |
| @@ -1154,12 +1164,18 @@ class Directory { |
| const ScopedKernelLock& lock, |
| const Id& parent_id, Directory::ChildHandles* result); |
| - // Returns a pointer to what is probably (but not certainly) the |
| + // Return 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); |
| + // Return a pointer to what is probably (but not certainly) the last |
| + // child of |parent_id|, or NULL if |parent_id| definitely has no |
| + // children. |
| + EntryKernel* GetPossibleLastChildForTest( |
| + const ScopedKernelLock& lock, const Id& parent_id); |
| + |
| Kernel* kernel_; |
| DirectoryBackingStore* store_; |