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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/metadata_database_index_interface.h

Issue 377463002: [SyncFS] Handle dirty tracker IDs in MetadataDatabaseIndexOnDisk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Work for comments Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX_IN TERFACE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX_IN TERFACE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX_IN TERFACE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX_IN TERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Returns a pair of |parent_tracker_id| and |title| that has multiple file 88 // Returns a pair of |parent_tracker_id| and |title| that has multiple file
89 // at the path. 89 // at the path.
90 virtual ParentIDAndTitle PickMultiBackingFilePath() const = 0; 90 virtual ParentIDAndTitle PickMultiBackingFilePath() const = 0;
91 91
92 // Returns a FileTracker whose |dirty| is set and which isn't demoted. 92 // Returns a FileTracker whose |dirty| is set and which isn't demoted.
93 // Returns 0 if not found. 93 // Returns 0 if not found.
94 virtual int64 PickDirtyTracker() const = 0; 94 virtual int64 PickDirtyTracker() const = 0;
95 95
96 // Demotes a dirty tracker. 96 // Demotes a dirty tracker.
97 virtual void DemoteDirtyTracker(int64 tracker_id) = 0; 97 virtual void DemoteDirtyTracker(
98 int64 tracker_id, leveldb::WriteBatch* batch) = 0;
98 99
99 virtual bool HasDemotedDirtyTracker() const = 0; 100 virtual bool HasDemotedDirtyTracker() const = 0;
100 101
101 // Promotes all demoted dirty trackers to normal dirty trackers. 102 // Promotes all demoted dirty trackers to normal dirty trackers.
102 virtual void PromoteDemotedDirtyTrackers() = 0; 103 virtual void PromoteDemotedDirtyTrackers(leveldb::WriteBatch* batch) = 0;
103 104
104 virtual size_t CountDirtyTracker() const = 0; 105 virtual size_t CountDirtyTracker() const = 0;
105 virtual size_t CountFileMetadata() const = 0; 106 virtual size_t CountFileMetadata() const = 0;
106 virtual size_t CountFileTracker() const = 0; 107 virtual size_t CountFileTracker() const = 0;
107 108
108 virtual std::vector<std::string> GetRegisteredAppIDs() const = 0; 109 virtual std::vector<std::string> GetRegisteredAppIDs() const = 0;
109 virtual std::vector<int64> GetAllTrackerIDs() const = 0; 110 virtual std::vector<int64> GetAllTrackerIDs() const = 0;
110 virtual std::vector<std::string> GetAllMetadataIDs() const = 0; 111 virtual std::vector<std::string> GetAllMetadataIDs() const = 0;
111 112
112 private: 113 private:
113 DISALLOW_COPY_AND_ASSIGN(MetadataDatabaseIndexInterface); 114 DISALLOW_COPY_AND_ASSIGN(MetadataDatabaseIndexInterface);
114 }; 115 };
115 116
116 } // namespace drive_backend 117 } // namespace drive_backend
117 } // namespace sync_file_system 118 } // namespace sync_file_system
118 119
119 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX _INTERFACE_H_ 120 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX _INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698