| OLD | NEW |
| 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_ENTRY_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ |
| 6 #define COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 const EntryKernel GetKernelCopy() const { return *kernel_; } | 256 const EntryKernel GetKernelCopy() const { return *kernel_; } |
| 257 | 257 |
| 258 // Dumps all entry info into a DictionaryValue and returns it. | 258 // Dumps all entry info into a DictionaryValue and returns it. |
| 259 // Transfers ownership of the DictionaryValue to the caller. | 259 // Transfers ownership of the DictionaryValue to the caller. |
| 260 base::DictionaryValue* ToValue(Cryptographer* cryptographer) const; | 260 base::DictionaryValue* ToValue(Cryptographer* cryptographer) const; |
| 261 | 261 |
| 262 protected: // Don't allow creation on heap, except by sync API wrappers. | 262 protected: // Don't allow creation on heap, except by sync API wrappers. |
| 263 void* operator new(size_t size) { return (::operator new)(size); } | 263 void* operator new(size_t size) { return (::operator new)(size); } |
| 264 | 264 |
| 265 inline explicit Entry(BaseTransaction* trans) | 265 inline explicit Entry(BaseTransaction* trans) |
| 266 : basetrans_(trans), kernel_(NULL) {} | 266 : basetrans_(trans), kernel_(nullptr) {} |
| 267 | 267 |
| 268 protected: | 268 protected: |
| 269 BaseTransaction* const basetrans_; | 269 BaseTransaction* const basetrans_; |
| 270 | 270 |
| 271 EntryKernel* kernel_; | 271 EntryKernel* kernel_; |
| 272 | 272 |
| 273 private: | 273 private: |
| 274 friend class syncer::syncable::Directory; | 274 friend class syncer::syncable::Directory; |
| 275 friend class syncer::ReadNode; | 275 friend class syncer::ReadNode; |
| 276 friend std::ostream& operator<<(std::ostream& s, const Entry& e); | 276 friend std::ostream& operator<<(std::ostream& s, const Entry& e); |
| 277 | 277 |
| 278 DISALLOW_COPY_AND_ASSIGN(Entry); | 278 DISALLOW_COPY_AND_ASSIGN(Entry); |
| 279 }; | 279 }; |
| 280 | 280 |
| 281 std::ostream& operator<<(std::ostream& os, const Entry& entry); | 281 std::ostream& operator<<(std::ostream& os, const Entry& entry); |
| 282 | 282 |
| 283 } // namespace syncable | 283 } // namespace syncable |
| 284 } // namespace syncer | 284 } // namespace syncer |
| 285 | 285 |
| 286 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ | 286 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ |
| OLD | NEW |