OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/sync/syncable/model_type.h" |
| 10 #include "chrome/browser/sync/syncable/syncable.h" |
| 11 |
| 12 namespace tracked_objects { |
| 13 class Location; |
| 14 } // namespace tracked_objects |
| 15 |
| 16 namespace syncable { |
| 17 |
| 18 class TransactionObserver { |
| 19 public: |
| 20 virtual void OnTransactionStart( |
| 21 const tracked_objects::Location& location, |
| 22 const WriterTag& writer) = 0; |
| 23 virtual void OnTransactionMutate( |
| 24 const tracked_objects::Location& location, |
| 25 const WriterTag& writer, |
| 26 // TODO(akalin): Have pairs of old/new entries instead of just |
| 27 // the originals. |
| 28 const OriginalEntries& originals, |
| 29 const ModelTypeBitSet& models_with_changes) = 0; |
| 30 virtual void OnTransactionEnd( |
| 31 const tracked_objects::Location& location, |
| 32 const WriterTag& writer) = 0; |
| 33 protected: |
| 34 virtual ~TransactionObserver() {} |
| 35 }; |
| 36 |
| 37 } // namespace syncable |
| 38 |
| 39 #endif // CHROME_BROWSER_SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_ |
OLD | NEW |