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
3 // found in the LICENSE file.
5 #include "sync/internal_api/public/read_transaction.h"
7 #include "sync/syncable/read_transaction.h"
11 //////////////////////////////////////////////////////////////////////////
12 // ReadTransaction member definitions
13 ReadTransaction::ReadTransaction(const tracked_objects::Location
& from_here
,
15 : BaseTransaction(share
),
17 close_transaction_(true) {
18 transaction_
= new syncable::ReadTransaction(from_here
,
19 share
->directory
.get());
22 ReadTransaction::ReadTransaction(UserShare
* share
,
23 syncable::BaseTransaction
* trans
)
24 : BaseTransaction(share
),
26 close_transaction_(false) {}
28 ReadTransaction::~ReadTransaction() {
29 if (close_transaction_
) {
34 syncable::BaseTransaction
* ReadTransaction::GetWrappedTrans() const {