| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_DIRECTORY_CHANGE_DELEGATE_H_ | 5 #ifndef SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ |
| 6 #define SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ | 6 #define SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "sync/internal_api/public/syncable/model_type.h" | 9 #include "sync/internal_api/public/syncable/model_type.h" |
| 10 #include "sync/syncable/write_transaction_info.h" | 10 #include "sync/syncable/write_transaction_info.h" |
| 11 | 11 |
| 12 namespace syncer { |
| 12 namespace syncable { | 13 namespace syncable { |
| 13 | 14 |
| 14 // This is an interface for listening to directory change events, triggered by | 15 // This is an interface for listening to directory change events, triggered by |
| 15 // the releasing of the syncable transaction. The delegate performs work to | 16 // the releasing of the syncable transaction. The delegate performs work to |
| 16 // 1. Calculate changes, depending on the source of the transaction | 17 // 1. Calculate changes, depending on the source of the transaction |
| 17 // (HandleCalculateChangesChangeEventFromSyncer/Syncapi). | 18 // (HandleCalculateChangesChangeEventFromSyncer/Syncapi). |
| 18 // 2. Perform final work while the transaction is held | 19 // 2. Perform final work while the transaction is held |
| 19 // (HandleTransactionEndingChangeEvent). | 20 // (HandleTransactionEndingChangeEvent). |
| 20 // 3. Perform any work that should be done after the transaction is released. | 21 // 3. Perform any work that should be done after the transaction is released. |
| 21 // (HandleTransactionCompleteChangeEvent). | 22 // (HandleTransactionCompleteChangeEvent). |
| (...skipping 12 matching lines...) Expand all Loading... |
| 34 virtual ModelTypeSet HandleTransactionEndingChangeEvent( | 35 virtual ModelTypeSet HandleTransactionEndingChangeEvent( |
| 35 const ImmutableWriteTransactionInfo& write_transaction_info, | 36 const ImmutableWriteTransactionInfo& write_transaction_info, |
| 36 BaseTransaction* trans) = 0; | 37 BaseTransaction* trans) = 0; |
| 37 virtual void HandleTransactionCompleteChangeEvent( | 38 virtual void HandleTransactionCompleteChangeEvent( |
| 38 ModelTypeSet models_with_changes) = 0; | 39 ModelTypeSet models_with_changes) = 0; |
| 39 protected: | 40 protected: |
| 40 virtual ~DirectoryChangeDelegate() {} | 41 virtual ~DirectoryChangeDelegate() {} |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 } // namespace syncable | 44 } // namespace syncable |
| 45 } // namespace syncer |
| 44 | 46 |
| 45 #endif // SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ | 47 #endif // SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ |
| OLD | NEW |