| 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 #include "chrome/browser/sync/internal_api/write_transaction.h" | 5 #include "chrome/browser/sync/internal_api/write_transaction.h" |
| 6 | 6 |
| 7 #include "chrome/browser/sync/syncable/syncable.h" | 7 #include "sync/syncable/syncable.h" |
| 8 | 8 |
| 9 namespace sync_api { | 9 namespace sync_api { |
| 10 | 10 |
| 11 ////////////////////////////////////////////////////////////////////////// | 11 ////////////////////////////////////////////////////////////////////////// |
| 12 // WriteTransaction member definitions | 12 // WriteTransaction member definitions |
| 13 WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here, | 13 WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here, |
| 14 UserShare* share) | 14 UserShare* share) |
| 15 : BaseTransaction(share), | 15 : BaseTransaction(share), |
| 16 transaction_(NULL) { | 16 transaction_(NULL) { |
| 17 transaction_ = new syncable::WriteTransaction(from_here, syncable::SYNCAPI, | 17 transaction_ = new syncable::WriteTransaction(from_here, syncable::SYNCAPI, |
| 18 share->directory.get()); | 18 share->directory.get()); |
| 19 } | 19 } |
| 20 | 20 |
| 21 WriteTransaction::~WriteTransaction() { | 21 WriteTransaction::~WriteTransaction() { |
| 22 delete transaction_; | 22 delete transaction_; |
| 23 } | 23 } |
| 24 | 24 |
| 25 syncable::BaseTransaction* WriteTransaction::GetWrappedTrans() const { | 25 syncable::BaseTransaction* WriteTransaction::GetWrappedTrans() const { |
| 26 return transaction_; | 26 return transaction_; |
| 27 } | 27 } |
| 28 | 28 |
| 29 } // namespace sync_api | 29 } // namespace sync_api |
| OLD | NEW |