OLD | NEW |
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 // Returns a FileTracker whose |dirty| is set and which isn't demoted. | 84 // Returns a FileTracker whose |dirty| is set and which isn't demoted. |
85 // Returns 0 if not found. | 85 // Returns 0 if not found. |
86 virtual int64 PickDirtyTracker() const = 0; | 86 virtual int64 PickDirtyTracker() const = 0; |
87 | 87 |
88 // Demotes a dirty tracker. | 88 // Demotes a dirty tracker. |
89 virtual void DemoteDirtyTracker(int64 tracker_id) = 0; | 89 virtual void DemoteDirtyTracker(int64 tracker_id) = 0; |
90 | 90 |
91 virtual bool HasDemotedDirtyTracker() const = 0; | 91 virtual bool HasDemotedDirtyTracker() const = 0; |
92 | 92 |
| 93 // Promotes single demoted dirty tracker to a normal dirty tracker. |
| 94 virtual void PromoteDemotedDirtyTracker(int64 tracker_id) = 0; |
| 95 |
93 // Promotes all demoted dirty trackers to normal dirty trackers. | 96 // Promotes all demoted dirty trackers to normal dirty trackers. |
94 virtual void PromoteDemotedDirtyTrackers() = 0; | 97 // Returns true if any tracker was promoted. |
| 98 virtual bool PromoteDemotedDirtyTrackers() = 0; |
95 | 99 |
96 virtual size_t CountDirtyTracker() const = 0; | 100 virtual size_t CountDirtyTracker() const = 0; |
97 virtual size_t CountFileMetadata() const = 0; | 101 virtual size_t CountFileMetadata() const = 0; |
98 virtual size_t CountFileTracker() const = 0; | 102 virtual size_t CountFileTracker() const = 0; |
99 | 103 |
100 virtual void SetSyncRootTrackerID(int64 sync_root_id) const = 0; | 104 virtual void SetSyncRootTrackerID(int64 sync_root_id) const = 0; |
101 virtual void SetLargestChangeID(int64 largest_change_id) const = 0; | 105 virtual void SetLargestChangeID(int64 largest_change_id) const = 0; |
102 virtual void SetNextTrackerID(int64 next_tracker_id) const = 0; | 106 virtual void SetNextTrackerID(int64 next_tracker_id) const = 0; |
103 virtual int64 GetSyncRootTrackerID() const = 0; | 107 virtual int64 GetSyncRootTrackerID() const = 0; |
104 virtual int64 GetLargestChangeID() const = 0; | 108 virtual int64 GetLargestChangeID() const = 0; |
105 virtual int64 GetNextTrackerID() const = 0; | 109 virtual int64 GetNextTrackerID() const = 0; |
106 virtual std::vector<std::string> GetRegisteredAppIDs() const = 0; | 110 virtual std::vector<std::string> GetRegisteredAppIDs() const = 0; |
107 virtual std::vector<int64> GetAllTrackerIDs() const = 0; | 111 virtual std::vector<int64> GetAllTrackerIDs() const = 0; |
108 virtual std::vector<std::string> GetAllMetadataIDs() const = 0; | 112 virtual std::vector<std::string> GetAllMetadataIDs() const = 0; |
109 | 113 |
110 private: | 114 private: |
111 DISALLOW_COPY_AND_ASSIGN(MetadataDatabaseIndexInterface); | 115 DISALLOW_COPY_AND_ASSIGN(MetadataDatabaseIndexInterface); |
112 }; | 116 }; |
113 | 117 |
114 } // namespace drive_backend | 118 } // namespace drive_backend |
115 } // namespace sync_file_system | 119 } // namespace sync_file_system |
116 | 120 |
117 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX
_INTERFACE_H_ | 121 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_INDEX
_INTERFACE_H_ |
OLD | NEW |