| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 enum { | 170 enum { |
| 171 STRING_FIELDS_COUNT = STRING_FIELDS_END - STRING_FIELDS_BEGIN, | 171 STRING_FIELDS_COUNT = STRING_FIELDS_END - STRING_FIELDS_BEGIN, |
| 172 PROTO_FIELDS_BEGIN = STRING_FIELDS_END | 172 PROTO_FIELDS_BEGIN = STRING_FIELDS_END |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 // From looking at the sqlite3 docs, it's not directly stated, but it | 175 // From looking at the sqlite3 docs, it's not directly stated, but it |
| 176 // seems the overhead for storing a NULL blob is very small. | 176 // seems the overhead for storing a NULL blob is very small. |
| 177 enum ProtoField { | 177 enum ProtoField { |
| 178 SPECIFICS = PROTO_FIELDS_BEGIN, | 178 SPECIFICS = PROTO_FIELDS_BEGIN, |
| 179 SERVER_SPECIFICS, | 179 SERVER_SPECIFICS, |
| 180 BASE_SERVER_SPECIFICS, |
| 180 PROTO_FIELDS_END, | 181 PROTO_FIELDS_END, |
| 181 }; | 182 }; |
| 182 | 183 |
| 183 enum { | 184 enum { |
| 184 PROTO_FIELDS_COUNT = PROTO_FIELDS_END - PROTO_FIELDS_BEGIN | 185 PROTO_FIELDS_COUNT = PROTO_FIELDS_END - PROTO_FIELDS_BEGIN |
| 185 }; | 186 }; |
| 186 | 187 |
| 187 enum { | 188 enum { |
| 188 FIELD_COUNT = PROTO_FIELDS_END, | 189 FIELD_COUNT = PROTO_FIELDS_END, |
| 189 // Past this point we have temporaries, stored in memory only. | 190 // Past this point we have temporaries, stored in memory only. |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 // are protected and only called from friends in a transaction | 732 // are protected and only called from friends in a transaction |
| 732 // or are public and take a Transaction* argument. | 733 // or are public and take a Transaction* argument. |
| 733 // | 734 // |
| 734 // All methods which require the kernel lock to be already held take a | 735 // All methods which require the kernel lock to be already held take a |
| 735 // ScopeKernelLock* argument. | 736 // ScopeKernelLock* argument. |
| 736 // | 737 // |
| 737 // To prevent deadlock, the reader writer transaction lock must always | 738 // To prevent deadlock, the reader writer transaction lock must always |
| 738 // be held before acquiring the kernel lock. | 739 // be held before acquiring the kernel lock. |
| 739 class ScopedKernelLock; | 740 class ScopedKernelLock; |
| 740 class IdFilter; | 741 class IdFilter; |
| 741 class DirectoryManager; | |
| 742 | 742 |
| 743 class Directory { | 743 class Directory { |
| 744 friend class BaseTransaction; | 744 friend class BaseTransaction; |
| 745 friend class Entry; | 745 friend class Entry; |
| 746 friend class MutableEntry; | 746 friend class MutableEntry; |
| 747 friend class ReadTransaction; | 747 friend class ReadTransaction; |
| 748 friend class ReadTransactionWithoutDB; | 748 friend class ReadTransactionWithoutDB; |
| 749 friend class ScopedKernelLock; | 749 friend class ScopedKernelLock; |
| 750 friend class ScopedKernelUnlock; | 750 friend class ScopedKernelUnlock; |
| 751 friend class WriteTransaction; | 751 friend class WriteTransaction; |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid); | 1280 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid); |
| 1281 | 1281 |
| 1282 // This function sets only the flags needed to get this entry to sync. | 1282 // This function sets only the flags needed to get this entry to sync. |
| 1283 void MarkForSyncing(syncable::MutableEntry* e); | 1283 void MarkForSyncing(syncable::MutableEntry* e); |
| 1284 | 1284 |
| 1285 } // namespace syncable | 1285 } // namespace syncable |
| 1286 | 1286 |
| 1287 std::ostream& operator <<(std::ostream&, const syncable::Blob&); | 1287 std::ostream& operator <<(std::ostream&, const syncable::Blob&); |
| 1288 | 1288 |
| 1289 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ | 1289 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_ |
| OLD | NEW |