Fix import error in mac_platform_backend.py
[chromium-blink-merge.git] / sync / internal_api / write_transaction.cc
blobd33093dac32c01384314f0a7ed07ed14e755419f
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
3 // found in the LICENSE file.
5 #include "sync/internal_api/public/write_transaction.h"
7 #include "sync/syncable/syncable_write_transaction.h"
9 namespace syncer {
11 //////////////////////////////////////////////////////////////////////////
12 // WriteTransaction member definitions
13 WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here,
14 UserShare* share)
15 : BaseTransaction(share),
16 transaction_(NULL) {
17 transaction_ = new syncable::WriteTransaction(from_here, syncable::SYNCAPI,
18 share->directory.get());
21 WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here,
22 UserShare* share,
23 int64* new_model_version)
24 : BaseTransaction(share),
25 transaction_(NULL) {
26 transaction_ = new syncable::WriteTransaction(from_here,
27 share->directory.get(),
28 new_model_version);
31 WriteTransaction::~WriteTransaction() {
32 delete transaction_;
35 syncable::BaseTransaction* WriteTransaction::GetWrappedTrans() const {
36 return transaction_;
39 } // namespace syncer