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

Side by Side Diff: sync/syncable/syncable_write_transaction.h

Issue 11412211: [sync] Componentize sync: Part Final: Target 'sync' is now its own component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address more CR feedback Created 7 years, 11 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
OLDNEW
1 // Copyright 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_SYNCABLE_SYNCABLE_WRITE_TRANSACTION_H_ 5 #ifndef SYNC_SYNCABLE_SYNCABLE_WRITE_TRANSACTION_H_
6 #define SYNC_SYNCABLE_SYNCABLE_WRITE_TRANSACTION_H_ 6 #define SYNC_SYNCABLE_SYNCABLE_WRITE_TRANSACTION_H_
7 7
8 #include "base/compiler_specific.h"
8 #include "sync/base/sync_export.h" 9 #include "sync/base/sync_export.h"
9 #include "sync/syncable/entry_kernel.h" 10 #include "sync/syncable/entry_kernel.h"
10 #include "sync/syncable/syncable_base_transaction.h" 11 #include "sync/syncable/syncable_base_transaction.h"
11 12
12 namespace syncer { 13 namespace syncer {
13 namespace syncable { 14 namespace syncable {
14 15
15 SYNC_EXPORT extern const int64 kInvalidTransactionVersion; 16 SYNC_EXPORT extern const int64 kInvalidTransactionVersion;
16 17
17 // Locks db in constructor, unlocks in destructor. 18 // Locks db in constructor, unlocks in destructor.
18 class SYNC_EXPORT_PRIVATE WriteTransaction : public BaseTransaction { 19 class SYNC_EXPORT_PRIVATE WriteTransaction
20 : public NON_EXPORTED_BASE(BaseTransaction) {
19 public: 21 public:
20 WriteTransaction(const tracked_objects::Location& from_here, 22 WriteTransaction(const tracked_objects::Location& from_here,
21 WriterTag writer, Directory* directory); 23 WriterTag writer, Directory* directory);
22 24
23 // Constructor used for getting back transaction version after making sync 25 // Constructor used for getting back transaction version after making sync
24 // API changes to one model. If model is changed by the transaction, 26 // API changes to one model. If model is changed by the transaction,
25 // the new transaction version of the model and modified nodes will be saved 27 // the new transaction version of the model and modified nodes will be saved
26 // in |transaction_version| upon destruction of the transaction. If model is 28 // in |transaction_version| upon destruction of the transaction. If model is
27 // not changed, |transaction_version| will be kInvalidTransactionVersion. 29 // not changed, |transaction_version| will be kInvalidTransactionVersion.
28 WriteTransaction(const tracked_objects::Location& from_here, 30 WriteTransaction(const tracked_objects::Location& from_here,
(...skipping 30 matching lines...) Expand all
59 // indeed changed. kInvalidTransactionVersion otherwise. Not owned. 61 // indeed changed. kInvalidTransactionVersion otherwise. Not owned.
60 int64* transaction_version_; 62 int64* transaction_version_;
61 63
62 DISALLOW_COPY_AND_ASSIGN(WriteTransaction); 64 DISALLOW_COPY_AND_ASSIGN(WriteTransaction);
63 }; 65 };
64 66
65 } // namespace syncable 67 } // namespace syncable
66 } // namespace syncer 68 } // namespace syncer
67 69
68 #endif // SYNC_SYNCABLE_SYNCABLE_WRITE_TRANSACTION_H_ 70 #endif // SYNC_SYNCABLE_SYNCABLE_WRITE_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698