Chromium Code Reviews| Index: sync/internal_api/public/base_transaction.h |
| diff --git a/sync/internal_api/public/base_transaction.h b/sync/internal_api/public/base_transaction.h |
| index 242a6b93545780d0cd96d4ced7d9ef64e5d2af67..7a2ba37e3a2414a208519919515454da3217ed51 100644 |
| --- a/sync/internal_api/public/base_transaction.h |
| +++ b/sync/internal_api/public/base_transaction.h |
| @@ -32,17 +32,25 @@ class BaseTransaction { |
| ModelTypeSet GetEncryptedTypes() const; |
| syncable::Directory* GetDirectory() const { |
| - return directory_; |
| + if (!user_share_) { |
|
Nicolas Zea
2012/11/16 19:42:27
remove curly braces?
rlarocque
2012/11/17 00:07:21
I'd prefer not to. I believe the style guide does
|
| + return NULL; |
| + } else { |
| + return user_share_->directory.get(); |
| + } |
| + } |
| + |
| + UserShare* GetUserShare() const { |
| + return user_share_; |
| } |
| protected: |
| explicit BaseTransaction(UserShare* share); |
| virtual ~BaseTransaction(); |
| - BaseTransaction() : directory_(NULL) { } |
| + BaseTransaction() : user_share_(NULL) { } |
| private: |
| - syncable::Directory* directory_; |
| + UserShare* user_share_; |
| DISALLOW_COPY_AND_ASSIGN(BaseTransaction); |
| }; |