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

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

Issue 265853004: Revert of Keep track of which attachments are referenced by which sync entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_
6 #define SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_
7 7
8 #include "sync/base/sync_export.h" 8 #include "sync/base/sync_export.h"
9 #include "sync/internal_api/public/base/model_type.h" 9 #include "sync/internal_api/public/base/model_type.h"
10 #include "sync/internal_api/public/user_share.h" 10 #include "sync/internal_api/public/user_share.h"
11 #include "sync/util/cryptographer.h" 11 #include "sync/util/cryptographer.h"
12 12
13 namespace syncer { 13 namespace syncer {
14 14
15 namespace syncable { 15 namespace syncable {
16 class BaseTransaction; 16 class BaseTransaction;
17 class Directory; 17 class Directory;
18 } 18 }
19 19
20 // Sync API's BaseTransaction, ReadTransaction, and WriteTransaction allow for 20 // Sync API's BaseTransaction, ReadTransaction, and WriteTransaction allow for
21 // batching of several read and/or write operations. The read and write 21 // batching of several read and/or write operations. The read and write
22 // operations are performed by creating ReadNode and WriteNode instances using 22 // operations are performed by creating ReadNode and WriteNode instances using
23 // the transaction. These transaction classes wrap identically named classes in 23 // the transaction. These transaction classes wrap identically named classes in
24 // syncable, and are used in a similar way. Unlike syncable::BaseTransaction, 24 // syncable, and are used in a similar way. Unlike syncable::BaseTransaction,
25 // whose construction requires an explicit syncable::Directory, a sync 25 // whose construction requires an explicit syncable::Directory, a sync
26 // API BaseTransaction is created from a UserShare object. 26 // API BaseTransaction is created from a UserShare object.
27 //
28 // Note, these transactions are not atomic. Individual operations can
29 // fail. There is no built-in rollback or undo mechanism.
30 class SYNC_EXPORT BaseTransaction { 27 class SYNC_EXPORT BaseTransaction {
31 public: 28 public:
32 // Provide access to the underlying syncable objects from BaseNode. 29 // Provide access to the underlying syncable objects from BaseNode.
33 virtual syncable::BaseTransaction* GetWrappedTrans() const = 0; 30 virtual syncable::BaseTransaction* GetWrappedTrans() const = 0;
34 Cryptographer* GetCryptographer() const; 31 Cryptographer* GetCryptographer() const;
35 ModelTypeSet GetEncryptedTypes() const; 32 ModelTypeSet GetEncryptedTypes() const;
36 33
37 syncable::Directory* GetDirectory() const { 34 syncable::Directory* GetDirectory() const {
38 if (!user_share_) { 35 if (!user_share_) {
39 return NULL; 36 return NULL;
(...skipping 14 matching lines...) Expand all
54 51
55 private: 52 private:
56 UserShare* user_share_; 53 UserShare* user_share_;
57 54
58 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); 55 DISALLOW_COPY_AND_ASSIGN(BaseTransaction);
59 }; 56 };
60 57
61 } // namespace syncer 58 } // namespace syncer
62 59
63 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_ 60 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/base/attachment_id_proto.cc ('k') | sync/internal_api/public/write_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698