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

Unified Diff: chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h

Issue 536343002: [SyncFS] CountDirtyTracke() does not run a full scan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h b/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h
index 8dae9ce8fc1d930221d3d81f13c21aeb2c959528..440e9f4d871e6517d5757ea6567af14090a8a7cb 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h
@@ -151,6 +151,9 @@ class MetadataDatabaseIndexOnDisk : public MetadataDatabaseIndexInterface {
// Checks if |db_| has an entry whose key is |key|.
bool DBHasKey(const std::string& key);
+ // Returns the number of dirty trackers, actually counting them.
+ size_t CountDirtyTrackerInternal() const;
+
// Returns the number of entries starting with |prefix| in NumEntries format.
// Entries for |ignored_id| are not counted in.
NumEntries CountWithPrefix(const std::string& prefix, int64 ignored_id);
@@ -161,6 +164,8 @@ class MetadataDatabaseIndexOnDisk : public MetadataDatabaseIndexInterface {
LevelDBWrapper* db_; // Not owned.
scoped_ptr<ServiceMetadata> service_metadata_;
+ size_t num_dirty_trackers_;
+
DISALLOW_COPY_AND_ASSIGN(MetadataDatabaseIndexOnDisk);
};
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698