Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SYNCABLE_SYNCABLE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ |
| 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ | 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <bitset> | 10 #include <bitset> |
| (...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1122 // unique server IDs. No need to lock, only written at init time. | 1122 // unique server IDs. No need to lock, only written at init time. |
| 1123 const std::string cache_guid; | 1123 const std::string cache_guid; |
| 1124 | 1124 |
| 1125 // It doesn't make sense for two threads to run SaveChanges at the same | 1125 // It doesn't make sense for two threads to run SaveChanges at the same |
| 1126 // time; this mutex protects that activity. | 1126 // time; this mutex protects that activity. |
| 1127 base::Lock save_changes_mutex; | 1127 base::Lock save_changes_mutex; |
| 1128 | 1128 |
| 1129 // The next metahandle is protected by kernel mutex. | 1129 // The next metahandle is protected by kernel mutex. |
| 1130 int64 next_metahandle; | 1130 int64 next_metahandle; |
| 1131 | 1131 |
| 1132 // Keep a history of recently flushed metahandles for debugging | |
| 1133 // purposes. Protected by the save_changes_mutex. | |
| 1134 DebugQueue<int64, 1000> flushed_metahandles; | |
|
rlarocque
2011/11/15 01:08:56
I think this is the last use of DebugQueue. Can w
| |
| 1135 | |
| 1136 // The delegate for directory change events. Can be NULL. | 1132 // The delegate for directory change events. Can be NULL. |
| 1137 DirectoryChangeDelegate* const delegate; | 1133 DirectoryChangeDelegate* const delegate; |
| 1138 | 1134 |
| 1139 // The transaction observers. | 1135 // The transaction observers. |
| 1140 scoped_refptr<ObserverListThreadSafe<TransactionObserver> > observers; | 1136 scoped_refptr<ObserverListThreadSafe<TransactionObserver> > observers; |
| 1141 }; | 1137 }; |
| 1142 | 1138 |
| 1143 // Helper method used to do searches on |parent_id_child_index|. | 1139 // Helper method used to do searches on |parent_id_child_index|. |
| 1144 ParentIdChildIndex::iterator LocateInParentChildIndex( | 1140 ParentIdChildIndex::iterator LocateInParentChildIndex( |
| 1145 const ScopedKernelLock& lock, | 1141 const ScopedKernelLock& lock, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1274 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid); | 1270 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid); |
| 1275 | 1271 |
| 1276 // This function sets only the flags needed to get this entry to sync. | 1272 // This function sets only the flags needed to get this entry to sync. |
| 1277 void MarkForSyncing(syncable::MutableEntry* e); | 1273 void MarkForSyncing(syncable::MutableEntry* e); |
| 1278 | 1274 |
| 1279 } // namespace syncable | 1275 } // namespace syncable |
| 1280 | 1276 |
| 1281 std::ostream& operator <<(std::ostream&, const syncable::Blob&); | 1277 std::ostream& operator <<(std::ostream&, const syncable::Blob&); |
| 1282 | 1278 |
| 1283 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ | 1279 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ |
| OLD | NEW |