| OLD | NEW |
| 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/api/sync_data.h" |
| 8 #include "sync/internal_api/public/user_share.h" | 9 #include "sync/internal_api/public/user_share.h" |
| 9 | |
| 10 #include "sync/internal_api/public/base/model_type.h" | 10 #include "sync/internal_api/public/base/model_type.h" |
| 11 #include "sync/util/cryptographer.h" | 11 #include "sync/util/cryptographer.h" |
| 12 | 12 |
| 13 namespace syncer { | 13 namespace syncer { |
| 14 | 14 |
| 15 namespace syncable { | 15 namespace syncable { |
| 16 class BaseTransaction; | 16 class BaseTransaction; |
| 17 class Directory; | 17 class Directory; |
| 18 } | 18 } |
| 19 | 19 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 36 return NULL; | 36 return NULL; |
| 37 } else { | 37 } else { |
| 38 return user_share_->directory.get(); | 38 return user_share_->directory.get(); |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 | 41 |
| 42 UserShare* GetUserShare() const { | 42 UserShare* GetUserShare() const { |
| 43 return user_share_; | 43 return user_share_; |
| 44 } | 44 } |
| 45 | 45 |
| 46 // Query directory for delete journals of |type|. Covert to SyncData and |
| 47 // return. |
| 48 void GetDeletedSyncData(ModelType type, SyncDataList *deleted) const; |
| 49 |
| 50 // Purge delete journals with given IDs from directory. |
| 51 void PurgeDeletedSyncData(const std::set<int64>& ids); |
| 52 |
| 46 protected: | 53 protected: |
| 47 explicit BaseTransaction(UserShare* share); | 54 explicit BaseTransaction(UserShare* share); |
| 48 virtual ~BaseTransaction(); | 55 virtual ~BaseTransaction(); |
| 49 | 56 |
| 50 BaseTransaction() : user_share_(NULL) { } | 57 BaseTransaction() : user_share_(NULL) { } |
| 51 | 58 |
| 52 private: | 59 private: |
| 53 UserShare* user_share_; | 60 UserShare* user_share_; |
| 54 | 61 |
| 55 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); | 62 DISALLOW_COPY_AND_ASSIGN(BaseTransaction); |
| 56 }; | 63 }; |
| 57 | 64 |
| 58 } // namespace syncer | 65 } // namespace syncer |
| 59 | 66 |
| 60 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_ | 67 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_ |
| OLD | NEW |