| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 SYNC_SYNCABLE_SYNCABLE_BASE_TRANSACTION_H_ | 5 #ifndef SYNC_SYNCABLE_SYNCABLE_BASE_TRANSACTION_H_ |
| 6 #define SYNC_SYNCABLE_SYNCABLE_BASE_TRANSACTION_H_ | 6 #define SYNC_SYNCABLE_SYNCABLE_BASE_TRANSACTION_H_ |
| 7 | 7 |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "sync/base/sync_export.h" | 9 #include "sync/base/sync_export.h" |
| 10 #include "sync/syncable/syncable_id.h" | 10 #include "sync/syncable/syncable_id.h" |
| 11 | 11 |
| 12 namespace syncer { | 12 namespace syncer { |
| 13 namespace syncable { | 13 namespace syncable { |
| 14 | 14 |
| 15 class Directory; | 15 class Directory; |
| 16 | 16 |
| 17 // A WriteTransaction has a writer tag describing which body of code is doing | 17 // A WriteTransaction has a writer tag describing which body of code is doing |
| 18 // the write. This is defined up here since WriteTransactionInfo also contains | 18 // the write. This is defined up here since WriteTransactionInfo also contains |
| 19 // one. | 19 // one. |
| 20 enum WriterTag { | 20 enum WriterTag { |
| 21 INVALID, | 21 INVALID, |
| 22 SYNCER, | 22 SYNCER, |
| 23 AUTHWATCHER, | 23 AUTHWATCHER, |
| 24 UNITTEST, | 24 UNITTEST, |
| 25 VACUUM_AFTER_SAVE, | 25 VACUUM_AFTER_SAVE, |
| 26 HANDLE_SAVE_FAILURE, |
| 26 PURGE_ENTRIES, | 27 PURGE_ENTRIES, |
| 27 SYNCAPI | 28 SYNCAPI, |
| 28 }; | 29 }; |
| 29 | 30 |
| 30 // Make sure to update this if you update WriterTag. | 31 // Make sure to update this if you update WriterTag. |
| 31 std::string WriterTagToString(WriterTag writer_tag); | 32 std::string WriterTagToString(WriterTag writer_tag); |
| 32 | 33 |
| 33 class SYNC_EXPORT_PRIVATE BaseTransaction { | 34 class SYNC_EXPORT_PRIVATE BaseTransaction { |
| 34 public: | 35 public: |
| 35 inline Directory* directory() const { return directory_; } | 36 inline Directory* directory() const { return directory_; } |
| 36 inline Id root_id() const { return Id(); } | 37 inline Id root_id() const { return Id(); } |
| 37 | 38 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 75 |
| 75 private: | 76 private: |
| 76 friend class Entry; | 77 friend class Entry; |
| 77 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); | 78 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace syncable | 81 } // namespace syncable |
| 81 } // namespace syncer | 82 } // namespace syncer |
| 82 | 83 |
| 83 #endif // SYNC_SYNCABLE_SYNCABLE_BASE_TRANSACTION_H_ | 84 #endif // SYNC_SYNCABLE_SYNCABLE_BASE_TRANSACTION_H_ |
| OLD | NEW |