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

Side by Side Diff: components/sync/syncable/base_transaction.h

Issue 2427803002: [Sync] Replacing NULL with nullptr in code and null in comments for components/sync/ (Closed)
Patch Set: Fixing start of sentence capitlization. Created 4 years, 2 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
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 COMPONENTS_SYNC_SYNCABLE_BASE_TRANSACTION_H_ 5 #ifndef COMPONENTS_SYNC_SYNCABLE_BASE_TRANSACTION_H_
6 #define COMPONENTS_SYNC_SYNCABLE_BASE_TRANSACTION_H_ 6 #define COMPONENTS_SYNC_SYNCABLE_BASE_TRANSACTION_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/sync/base/cryptographer.h" 9 #include "components/sync/base/cryptographer.h"
10 #include "components/sync/base/model_type.h" 10 #include "components/sync/base/model_type.h"
(...skipping 18 matching lines...) Expand all
29 // fail. There is no built-in rollback or undo mechanism. 29 // fail. There is no built-in rollback or undo mechanism.
30 class BaseTransaction { 30 class BaseTransaction {
31 public: 31 public:
32 // Provide access to the underlying syncable objects from BaseNode. 32 // Provide access to the underlying syncable objects from BaseNode.
33 virtual syncable::BaseTransaction* GetWrappedTrans() const = 0; 33 virtual syncable::BaseTransaction* GetWrappedTrans() const = 0;
34 Cryptographer* GetCryptographer() const; 34 Cryptographer* GetCryptographer() const;
35 ModelTypeSet GetEncryptedTypes() const; 35 ModelTypeSet GetEncryptedTypes() const;
36 36
37 syncable::Directory* GetDirectory() const { 37 syncable::Directory* GetDirectory() const {
38 if (!user_share_) { 38 if (!user_share_) {
39 return NULL; 39 return nullptr;
40 } else { 40 } else {
41 return user_share_->directory.get(); 41 return user_share_->directory.get();
42 } 42 }
43 } 43 }
44 44
45 UserShare* GetUserShare() const { return user_share_; } 45 UserShare* GetUserShare() const { return user_share_; }
46 46
47 protected: 47 protected:
48 explicit BaseTransaction(UserShare* share); 48 explicit BaseTransaction(UserShare* share);
49 virtual ~BaseTransaction(); 49 virtual ~BaseTransaction();
50 50
51 BaseTransaction() : user_share_(NULL) {} 51 BaseTransaction() : user_share_(nullptr) {}
52 52
53 private: 53 private:
54 UserShare* user_share_; 54 UserShare* user_share_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); 56 DISALLOW_COPY_AND_ASSIGN(BaseTransaction);
57 }; 57 };
58 58
59 } // namespace syncer 59 } // namespace syncer
60 60
61 #endif // COMPONENTS_SYNC_SYNCABLE_BASE_TRANSACTION_H_ 61 #endif // COMPONENTS_SYNC_SYNCABLE_BASE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « components/sync/protocol/proto_value_conversions_unittest.cc ('k') | components/sync/syncable/change_record_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698