Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(626)

Side by Side Diff: sync/internal_api/read_transaction.h

Issue 10534080: sync: move internal_api components used by chrome/browser into internal_api/public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/read_node.cc ('k') | sync/internal_api/read_transaction.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef SYNC_INTERNAL_API_READ_TRANSACTION_H_
6 #define SYNC_INTERNAL_API_READ_TRANSACTION_H_
7
8 #include "base/compiler_specific.h"
9 #include "sync/internal_api/base_transaction.h"
10
11 namespace tracked_objects {
12 class Location;
13 } // namespace tracked_objects
14
15 namespace sync_api {
16
17 struct UserShare;
18
19 // Sync API's ReadTransaction is a read-only BaseTransaction. It wraps
20 // a syncable::ReadTransaction.
21 class ReadTransaction : public BaseTransaction {
22 public:
23 // Start a new read-only transaction on the specified repository.
24 ReadTransaction(const tracked_objects::Location& from_here,
25 UserShare* share);
26
27 // Resume the middle of a transaction. Will not close transaction.
28 ReadTransaction(UserShare* share, syncable::BaseTransaction* trans);
29
30 virtual ~ReadTransaction();
31
32 // BaseTransaction override.
33 virtual syncable::BaseTransaction* GetWrappedTrans() const OVERRIDE;
34 private:
35 void* operator new(size_t size); // Transaction is meant for stack use only.
36
37 // The underlying syncable object which this class wraps.
38 syncable::BaseTransaction* transaction_;
39 bool close_transaction_;
40
41 DISALLOW_COPY_AND_ASSIGN(ReadTransaction);
42 };
43
44 } // namespace sync_api
45
46 #endif // SYNC_INTERNAL_API_READ_TRANSACTION_H_
OLDNEW
« no previous file with comments | « sync/internal_api/read_node.cc ('k') | sync/internal_api/read_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698