| 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_DIRECTORY_CHANGE_DELEGATE_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ |
| 6 #define SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "sync/base/sync_export.h" | 12 #include "components/sync/base/model_type.h" |
| 13 #include "sync/internal_api/public/base/model_type.h" | 13 #include "components/sync/base/sync_export.h" |
| 14 #include "sync/syncable/write_transaction_info.h" | 14 #include "components/sync/syncable/write_transaction_info.h" |
| 15 | 15 |
| 16 namespace syncer { | 16 namespace syncer { |
| 17 namespace syncable { | 17 namespace syncable { |
| 18 | 18 |
| 19 // This is an interface for listening to directory change events, triggered by | 19 // This is an interface for listening to directory change events, triggered by |
| 20 // the releasing of the syncable transaction. The delegate performs work to | 20 // the releasing of the syncable transaction. The delegate performs work to |
| 21 // 1. Calculate changes, depending on the source of the transaction | 21 // 1. Calculate changes, depending on the source of the transaction |
| 22 // (HandleCalculateChangesChangeEventFromSyncer/Syncapi). | 22 // (HandleCalculateChangesChangeEventFromSyncer/Syncapi). |
| 23 // 2. Perform final work while the transaction is held | 23 // 2. Perform final work while the transaction is held |
| 24 // (HandleTransactionEndingChangeEvent). | 24 // (HandleTransactionEndingChangeEvent). |
| (...skipping 13 matching lines...) Expand all Loading... |
| 38 const ImmutableWriteTransactionInfo& write_transaction_info, | 38 const ImmutableWriteTransactionInfo& write_transaction_info, |
| 39 BaseTransaction* trans, | 39 BaseTransaction* trans, |
| 40 std::vector<int64_t>* entries_changed) = 0; | 40 std::vector<int64_t>* entries_changed) = 0; |
| 41 // Must return the set of all ModelTypes that were modified in the | 41 // Must return the set of all ModelTypes that were modified in the |
| 42 // transaction. | 42 // transaction. |
| 43 virtual ModelTypeSet HandleTransactionEndingChangeEvent( | 43 virtual ModelTypeSet HandleTransactionEndingChangeEvent( |
| 44 const ImmutableWriteTransactionInfo& write_transaction_info, | 44 const ImmutableWriteTransactionInfo& write_transaction_info, |
| 45 BaseTransaction* trans) = 0; | 45 BaseTransaction* trans) = 0; |
| 46 virtual void HandleTransactionCompleteChangeEvent( | 46 virtual void HandleTransactionCompleteChangeEvent( |
| 47 ModelTypeSet models_with_changes) = 0; | 47 ModelTypeSet models_with_changes) = 0; |
| 48 |
| 48 protected: | 49 protected: |
| 49 virtual ~DirectoryChangeDelegate() {} | 50 virtual ~DirectoryChangeDelegate() {} |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 } // namespace syncable | 53 } // namespace syncable |
| 53 } // namespace syncer | 54 } // namespace syncer |
| 54 | 55 |
| 55 #endif // SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ | 56 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_ |
| OLD | NEW |