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

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

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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 #pragma once 7 #pragma once
8 8
9 #include "sync/internal_api/public/user_share.h" 9 #include "sync/internal_api/public/user_share.h"
10 10
11 #include "sync/util/cryptographer.h" 11 #include "sync/util/cryptographer.h"
12 12
13 namespace syncable { 13 namespace syncable {
14 class BaseTransaction; 14 class BaseTransaction;
15 class Directory; 15 class Directory;
16 } 16 }
17 17
18 namespace csync { 18 namespace syncer {
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 class BaseTransaction { 27 class BaseTransaction {
28 public: 28 public:
29 // Provide access to the underlying syncable objects from BaseNode. 29 // Provide access to the underlying syncable objects from BaseNode.
30 virtual syncable::BaseTransaction* GetWrappedTrans() const = 0; 30 virtual syncable::BaseTransaction* GetWrappedTrans() const = 0;
31 csync::Cryptographer* GetCryptographer() const; 31 syncer::Cryptographer* GetCryptographer() const;
32 32
33 syncable::Directory* GetDirectory() const { 33 syncable::Directory* GetDirectory() const {
34 return directory_; 34 return directory_;
35 } 35 }
36 36
37 protected: 37 protected:
38 explicit BaseTransaction(UserShare* share); 38 explicit BaseTransaction(UserShare* share);
39 virtual ~BaseTransaction(); 39 virtual ~BaseTransaction();
40 40
41 BaseTransaction() : directory_(NULL) { } 41 BaseTransaction() : directory_(NULL) { }
42 42
43 private: 43 private:
44 syncable::Directory* directory_; 44 syncable::Directory* directory_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); 46 DISALLOW_COPY_AND_ASSIGN(BaseTransaction);
47 }; 47 };
48 48
49 syncable::ModelTypeSet GetEncryptedTypes( 49 syncable::ModelTypeSet GetEncryptedTypes(
50 const csync::BaseTransaction* trans); 50 const syncer::BaseTransaction* trans);
51 51
52 } // namespace csync 52 } // namespace syncer
53 53
54 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_ 54 #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