diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 05:08:27 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 05:08:27 +0000 |
commit | e76194bc8b83d0304f7a10b624d25068d4e8cbca (patch) | |
tree | 535265d290c8a531f7e5587f1d8a979bd625af9a /chrome/browser/sync/internal_api/base_node.h | |
parent | 0f890af15d5175dc303aa5f8547390ede9385d95 (diff) | |
download | chromium_src-e76194bc8b83d0304f7a10b624d25068d4e8cbca.zip chromium_src-e76194bc8b83d0304f7a10b624d25068d4e8cbca.tar.gz chromium_src-e76194bc8b83d0304f7a10b624d25068d4e8cbca.tar.bz2 |
[Sync] Add HasChildren() function and use it instead of GetFirstChildId()
This avoids some crashes when we try to traverse the list to find the
first child and encounter a dangling Id.
Remove some spurious virtual keywords.
BUG=100907
TEST=
Review URL: http://codereview.chromium.org/8396022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/internal_api/base_node.h')
-rw-r--r-- | chrome/browser/sync/internal_api/base_node.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/sync/internal_api/base_node.h b/chrome/browser/sync/internal_api/base_node.h index a2286c3..362fdc3 100644 --- a/chrome/browser/sync/internal_api/base_node.h +++ b/chrome/browser/sync/internal_api/base_node.h @@ -156,17 +156,20 @@ class BaseNode { // Returns the local external ID associated with the node. int64 GetExternalId() const; + // Returns true iff this node has children. + bool HasChildren() const; + // Return the ID of the node immediately before this in the sibling order. // For the first node in the ordering, return 0. int64 GetPredecessorId() const; // Return the ID of the node immediately after this in the sibling order. // For the last node in the ordering, return 0. - virtual int64 GetSuccessorId() const; + int64 GetSuccessorId() const; // Return the ID of the first child of this node. If this node has no // children, return 0. - virtual int64 GetFirstChildId() const; + int64 GetFirstChildId() const; // These virtual accessors provide access to data members of derived classes. virtual const syncable::Entry* GetEntry() const = 0; |