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

Side by Side Diff: sync/internal_api/public/write_transaction.h

Issue 11515009: [sync] Componentize sync: Part 2: Add SYNC_EXPORTs to files in src/sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR Feedback Created 8 years 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/public/write_node.h ('k') | sync/js/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 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/base/sync_export.h"
10 #include "sync/internal_api/public/base_transaction.h" 11 #include "sync/internal_api/public/base_transaction.h"
11 12
12 namespace tracked_objects { 13 namespace tracked_objects {
13 class Location; 14 class Location;
14 } // namespace tracked_objects 15 } // namespace tracked_objects
15 16
16 namespace syncer { 17 namespace syncer {
17 18
18 namespace syncable { 19 namespace syncable {
19 class BaseTransaction; 20 class BaseTransaction;
20 class WriteTransaction; 21 class WriteTransaction;
21 } // namespace syncable 22 } // namespace syncable
22 23
23 // Sync API's WriteTransaction is a read/write BaseTransaction. It wraps 24 // Sync API's WriteTransaction is a read/write BaseTransaction. It wraps
24 // a syncable::WriteTransaction. 25 // a syncable::WriteTransaction.
25 // 26 //
26 // NOTE: Only a single model type can be mutated for a given 27 // NOTE: Only a single model type can be mutated for a given
27 // WriteTransaction. 28 // WriteTransaction.
28 class WriteTransaction : public BaseTransaction { 29 class SYNC_EXPORT WriteTransaction : public BaseTransaction {
29 public: 30 public:
30 // Start a new read/write transaction. 31 // Start a new read/write transaction.
31 WriteTransaction(const tracked_objects::Location& from_here, 32 WriteTransaction(const tracked_objects::Location& from_here,
32 UserShare* share); 33 UserShare* share);
33 // |transaction_version| stores updated model and nodes version if model 34 // |transaction_version| stores updated model and nodes version if model
34 // is changed by the transaction, or syncer::syncable::kInvalidTransaction 35 // is changed by the transaction, or syncer::syncable::kInvalidTransaction
35 // if not after transaction is closed. This constructor is used for model 36 // if not after transaction is closed. This constructor is used for model
36 // types that support embassy data. 37 // types that support embassy data.
37 WriteTransaction(const tracked_objects::Location& from_here, 38 WriteTransaction(const tracked_objects::Location& from_here,
38 UserShare* share, int64* transaction_version); 39 UserShare* share, int64* transaction_version);
(...skipping 15 matching lines...) Expand all
54 55
55 // The underlying syncable object which this class wraps. 56 // The underlying syncable object which this class wraps.
56 syncable::WriteTransaction* transaction_; 57 syncable::WriteTransaction* transaction_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(WriteTransaction); 59 DISALLOW_COPY_AND_ASSIGN(WriteTransaction);
59 }; 60 };
60 61
61 } // namespace syncer 62 } // namespace syncer
62 63
63 #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ 64 #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/write_node.h ('k') | sync/js/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698