Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2441)

Unified Diff: chrome/browser/sync/syncable/syncable.h

Issue 7033043: [Sync] Speed up sync node browser/search in about:sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/syncable/syncable.h
diff --git a/chrome/browser/sync/syncable/syncable.h b/chrome/browser/sync/syncable/syncable.h
index cace53e327a93e1d251231a2d5de470f94ce88ac..f6d51de0fc7197102445d15357ccade701b6001c 100644
--- a/chrome/browser/sync/syncable/syncable.h
+++ b/chrome/browser/sync/syncable/syncable.h
@@ -847,7 +847,11 @@ class Directory {
typedef std::vector<int64> ChildHandles;
// Returns the child meta handles for given parent id.
- void GetChildHandles(BaseTransaction*, const Id& parent_id,
+ void GetChildHandlesById(BaseTransaction*, const Id& parent_id,
+ ChildHandles* result);
+
+ // Returns the child meta handles for given meta handle.
+ void GetChildHandlesByHandle(BaseTransaction*, int64 handle,
ChildHandles* result);
// Find the first or last child in the positional ordering under a parent,
@@ -873,6 +877,9 @@ class Directory {
// WARNING: THIS METHOD PERFORMS SYNCHRONOUS I/O VIA SQLITE.
bool SaveChanges();
+ // Fill in |result| with all meta handles.
+ void GetAllMetaHandles(BaseTransaction* trans, MetahandleSet* result);
+
// Returns the number of entities with the unsynced bit set.
int64 unsynced_entity_count() const;
@@ -942,7 +949,6 @@ class Directory {
void InsertEntry(EntryKernel* entry);
// Used by CheckTreeInvariants
- void GetAllMetaHandles(BaseTransaction* trans, MetahandleSet* result);
bool SafeToPurgeFromMemory(const EntryKernel* const entry) const;
// Internal setters that do not acquire a lock internally. These are unsafe
@@ -1072,6 +1078,11 @@ class Directory {
const ScopedKernelLock& lock,
const Id& parent_id);
+ // Fill in |result| with the handles of the children of |parent_id|.
+ void GetChildHandles(
+ const ScopedKernelLock& lock,
+ const Id& parent_id, Directory::ChildHandles* result);
+
Kernel* kernel_;
DirectoryBackingStore* store_;

Powered by Google App Engine
This is Rietveld 408576698