| Index: sync/internal_api/base_node.cc
|
| diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc
|
| index 1e1513b1b7bf0c2bf74b116c1783230dbfcad77c..cbc58df409d087aa7a81afe4529ab77020a32f66 100644
|
| --- a/sync/internal_api/base_node.cc
|
| +++ b/sync/internal_api/base_node.cc
|
| @@ -216,31 +216,7 @@ int64 BaseNode::GetFirstChildId() const {
|
| }
|
|
|
| int BaseNode::GetTotalNodeCount() const {
|
| - syncable::BaseTransaction* trans = GetTransaction()->GetWrappedTrans();
|
| -
|
| - int count = 1; // Start with one to include the node itself.
|
| -
|
| - std::stack<int64> stack;
|
| - stack.push(GetFirstChildId());
|
| - while (!stack.empty()) {
|
| - int64 handle = stack.top();
|
| - stack.pop();
|
| - if (handle == kInvalidId)
|
| - continue;
|
| - count++;
|
| - syncable::Entry entry(trans, syncable::GET_BY_HANDLE, handle);
|
| - if (!entry.good())
|
| - continue;
|
| - syncable::Id successor_id = entry.GetSuccessorId();
|
| - if (!successor_id.IsRoot())
|
| - stack.push(IdToMetahandle(trans, successor_id));
|
| - if (!entry.Get(syncable::IS_DIR))
|
| - continue;
|
| - syncable::Id child_id = entry.GetFirstChildId();
|
| - if (!child_id.IsRoot())
|
| - stack.push(IdToMetahandle(trans, child_id));
|
| - }
|
| - return count;
|
| + return GetEntry()->GetTotalNodeCount();
|
| }
|
|
|
| DictionaryValue* BaseNode::GetSummaryAsValue() const {
|
|
|