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

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

Issue 10795018: [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fiix indent Created 8 years, 5 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/public/base_node.h ('k') | sync/internal_api/public/change_record.h » ('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 (c) 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/internal_api/public/user_share.h" 8 #include "sync/internal_api/public/user_share.h"
9 9
10 #include "sync/util/cryptographer.h" 10 #include "sync/util/cryptographer.h"
11 11
12 namespace syncer { 12 namespace syncer {
13 13
14 namespace syncable { 14 namespace syncable {
15 class BaseTransaction; 15 class BaseTransaction;
16 class Directory; 16 class Directory;
17 } 17 }
18 18
19 // Sync API's BaseTransaction, ReadTransaction, and WriteTransaction allow for 19 // Sync API's BaseTransaction, ReadTransaction, and WriteTransaction allow for
20 // batching of several read and/or write operations. The read and write 20 // batching of several read and/or write operations. The read and write
21 // operations are performed by creating ReadNode and WriteNode instances using 21 // operations are performed by creating ReadNode and WriteNode instances using
22 // the transaction. These transaction classes wrap identically named classes in 22 // the transaction. These transaction classes wrap identically named classes in
23 // syncable, and are used in a similar way. Unlike syncable::BaseTransaction, 23 // syncable, and are used in a similar way. Unlike syncable::BaseTransaction,
24 // whose construction requires an explicit syncable::Directory, a sync 24 // whose construction requires an explicit syncable::Directory, a sync
25 // API BaseTransaction is created from a UserShare object. 25 // API BaseTransaction is created from a UserShare object.
26 class BaseTransaction { 26 class BaseTransaction {
27 public: 27 public:
28 // Provide access to the underlying syncable objects from BaseNode. 28 // Provide access to the underlying syncable objects from BaseNode.
29 virtual syncable::BaseTransaction* GetWrappedTrans() const = 0; 29 virtual syncable::BaseTransaction* GetWrappedTrans() const = 0;
30 syncer::Cryptographer* GetCryptographer() const; 30 Cryptographer* GetCryptographer() const;
31 31
32 syncable::Directory* GetDirectory() const { 32 syncable::Directory* GetDirectory() const {
33 return directory_; 33 return directory_;
34 } 34 }
35 35
36 protected: 36 protected:
37 explicit BaseTransaction(UserShare* share); 37 explicit BaseTransaction(UserShare* share);
38 virtual ~BaseTransaction(); 38 virtual ~BaseTransaction();
39 39
40 BaseTransaction() : directory_(NULL) { } 40 BaseTransaction() : directory_(NULL) { }
41 41
42 private: 42 private:
43 syncable::Directory* directory_; 43 syncable::Directory* directory_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); 45 DISALLOW_COPY_AND_ASSIGN(BaseTransaction);
46 }; 46 };
47 47
48 syncer::ModelTypeSet GetEncryptedTypes(const syncer::BaseTransaction* trans); 48 ModelTypeSet GetEncryptedTypes(const BaseTransaction* trans);
49 49
50 } // namespace syncer 50 } // namespace syncer
51 51
52 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_ 52 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/base_node.h ('k') | sync/internal_api/public/change_record.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698