| Index: sync/syncable/directory.cc
|
| diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
|
| index 33b7e15be6cbd41170167848665f776c45dcbc57..d83b1f6e2a2c8438082f43f3d562444c092f88b8 100644
|
| --- a/sync/syncable/directory.cc
|
| +++ b/sync/syncable/directory.cc
|
| @@ -271,24 +271,6 @@ bool Directory::GetChildHandlesById(
|
| return true;
|
| }
|
|
|
| -bool Directory::GetChildHandlesByHandle(
|
| - BaseTransaction* trans, int64 handle,
|
| - Directory::Metahandles* result) {
|
| - if (!SyncAssert(this == trans->directory(), FROM_HERE,
|
| - "Directories don't match", trans))
|
| - return false;
|
| -
|
| - result->clear();
|
| -
|
| - ScopedKernelLock lock(this);
|
| - EntryKernel* kernel = GetEntryByHandle(handle, &lock);
|
| - if (!kernel)
|
| - return true;
|
| -
|
| - AppendChildHandles(lock, kernel->ref(ID), result);
|
| - return true;
|
| -}
|
| -
|
| int Directory::GetTotalNodeCount(
|
| BaseTransaction* trans,
|
| EntryKernel* kernel) const {
|
| @@ -887,16 +869,6 @@ void Directory::GetAllMetaHandles(BaseTransaction* trans,
|
| }
|
| }
|
|
|
| -void Directory::GetAllEntryKernels(BaseTransaction* trans,
|
| - std::vector<const EntryKernel*>* result) {
|
| - result->clear();
|
| - ScopedKernelLock lock(this);
|
| - for (MetahandlesMap::iterator i = kernel_->metahandles_map.begin();
|
| - i != kernel_->metahandles_map.end(); ++i) {
|
| - result->push_back(i->second);
|
| - }
|
| -}
|
| -
|
| void Directory::GetUnsyncedMetaHandles(BaseTransaction* trans,
|
| Metahandles* result) {
|
| result->clear();
|
| @@ -947,6 +919,30 @@ void Directory::CollectMetaHandleCounts(
|
| }
|
| }
|
|
|
| +scoped_ptr<base::ListValue> Directory::GetAllNodeDetails(
|
| + BaseTransaction* trans) {
|
| + scoped_ptr<base::ListValue> nodes(new base::ListValue());
|
| +
|
| + ScopedKernelLock lock(this);
|
| + for (MetahandlesMap::iterator it = kernel_->metahandles_map.begin();
|
| + it != kernel_->metahandles_map.end(); ++it) {
|
| + EntryKernel* kernel = it->second;
|
| + scoped_ptr<base::DictionaryValue> node(
|
| + kernel->ToValue(GetCryptographer(trans)));
|
| +
|
| + // Add the position index if appropriate. This must be done here (and not
|
| + // in EntryKernel) because the EntryKernel does not have access to its
|
| + // siblings.
|
| + if (kernel->ShouldMaintainPosition() && !kernel->ref(IS_DEL)) {
|
| + node->SetInteger("positionIndex", GetPositionIndex(trans, kernel));
|
| + }
|
| +
|
| + nodes->Append(node.release());
|
| + }
|
| +
|
| + return nodes.Pass();
|
| +}
|
| +
|
| bool Directory::CheckInvariantsOnTransactionClose(
|
| syncable::BaseTransaction* trans,
|
| const MetahandleSet& modified_handles) {
|
|
|