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

Unified Diff: sync/internal_api/public/base_transaction.h

Issue 11360259: Sync: Add DeviceInfo's ChangeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698