| 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_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ | 
| 6 #define SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ | 
| 7 | 7 | 
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" | 
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" | 
| 10 #include "sync/api/sync_change_processor.h" | 10 #include "sync/api/sync_change_processor.h" | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 34                    UserShare* share); | 34                    UserShare* share); | 
| 35   // |transaction_version| stores updated model and nodes version if model | 35   // |transaction_version| stores updated model and nodes version if model | 
| 36   // is changed by the transaction, or syncer::syncable::kInvalidTransaction | 36   // is changed by the transaction, or syncer::syncable::kInvalidTransaction | 
| 37   // if not after transaction is closed. This constructor is used for model | 37   // if not after transaction is closed. This constructor is used for model | 
| 38   // types that support embassy data. | 38   // types that support embassy data. | 
| 39   WriteTransaction(const tracked_objects::Location& from_here, | 39   WriteTransaction(const tracked_objects::Location& from_here, | 
| 40                    UserShare* share, int64* transaction_version); | 40                    UserShare* share, int64* transaction_version); | 
| 41   virtual ~WriteTransaction(); | 41   virtual ~WriteTransaction(); | 
| 42 | 42 | 
| 43   // Provide access to the syncable transaction from the API WriteNode. | 43   // Provide access to the syncable transaction from the API WriteNode. | 
| 44   virtual syncable::BaseTransaction* GetWrappedTrans() const OVERRIDE; | 44   virtual syncable::BaseTransaction* GetWrappedTrans() const override; | 
| 45   syncable::WriteTransaction* GetWrappedWriteTrans() { return transaction_; } | 45   syncable::WriteTransaction* GetWrappedWriteTrans() { return transaction_; } | 
| 46 | 46 | 
| 47   // Set's a |type|'s local context. |refresh_status| controls whether | 47   // Set's a |type|'s local context. |refresh_status| controls whether | 
| 48   // a datatype refresh is performed (clearing the progress marker token and | 48   // a datatype refresh is performed (clearing the progress marker token and | 
| 49   // setting the version of all synced entities to 1). | 49   // setting the version of all synced entities to 1). | 
| 50   void SetDataTypeContext( | 50   void SetDataTypeContext( | 
| 51       ModelType type, | 51       ModelType type, | 
| 52       syncer::SyncChangeProcessor::ContextRefreshStatus refresh_status, | 52       syncer::SyncChangeProcessor::ContextRefreshStatus refresh_status, | 
| 53       const std::string& context); | 53       const std::string& context); | 
| 54 | 54 | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 68 | 68 | 
| 69   // The underlying syncable object which this class wraps. | 69   // The underlying syncable object which this class wraps. | 
| 70   syncable::WriteTransaction* transaction_; | 70   syncable::WriteTransaction* transaction_; | 
| 71 | 71 | 
| 72   DISALLOW_COPY_AND_ASSIGN(WriteTransaction); | 72   DISALLOW_COPY_AND_ASSIGN(WriteTransaction); | 
| 73 }; | 73 }; | 
| 74 | 74 | 
| 75 }  // namespace syncer | 75 }  // namespace syncer | 
| 76 | 76 | 
| 77 #endif  // SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ | 77 #endif  // SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ | 
| OLD | NEW | 
|---|