| 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_SYNCABLE_ENTRY_KERNEL_H_ | 5 #ifndef SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
| 6 #define SYNC_SYNCABLE_ENTRY_KERNEL_H_ | 6 #define SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 inline std::string& mutable_ref(StringField field) { | 284 inline std::string& mutable_ref(StringField field) { |
| 285 return string_fields[field - STRING_FIELDS_BEGIN]; | 285 return string_fields[field - STRING_FIELDS_BEGIN]; |
| 286 } | 286 } |
| 287 inline sync_pb::EntitySpecifics& mutable_ref(ProtoField field) { | 287 inline sync_pb::EntitySpecifics& mutable_ref(ProtoField field) { |
| 288 return specifics_fields[field - PROTO_FIELDS_BEGIN]; | 288 return specifics_fields[field - PROTO_FIELDS_BEGIN]; |
| 289 } | 289 } |
| 290 inline Id& mutable_ref(IdField field) { | 290 inline Id& mutable_ref(IdField field) { |
| 291 return id_fields[field - ID_FIELDS_BEGIN]; | 291 return id_fields[field - ID_FIELDS_BEGIN]; |
| 292 } | 292 } |
| 293 | 293 |
| 294 syncable::ModelType GetServerModelType() const; | 294 syncer::ModelType GetServerModelType() const; |
| 295 | 295 |
| 296 // Dumps all kernel info into a DictionaryValue and returns it. | 296 // Dumps all kernel info into a DictionaryValue and returns it. |
| 297 // Transfers ownership of the DictionaryValue to the caller. | 297 // Transfers ownership of the DictionaryValue to the caller. |
| 298 base::DictionaryValue* ToValue() const; | 298 base::DictionaryValue* ToValue() const; |
| 299 | 299 |
| 300 private: | 300 private: |
| 301 // Tracks whether this entry needs to be saved to the database. | 301 // Tracks whether this entry needs to be saved to the database. |
| 302 bool dirty_; | 302 bool dirty_; |
| 303 }; | 303 }; |
| 304 | 304 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 316 const EntryKernelMutation& mutation); | 316 const EntryKernelMutation& mutation); |
| 317 | 317 |
| 318 // Caller owns the return value. | 318 // Caller owns the return value. |
| 319 base::ListValue* EntryKernelMutationMapToValue( | 319 base::ListValue* EntryKernelMutationMapToValue( |
| 320 const EntryKernelMutationMap& mutations); | 320 const EntryKernelMutationMap& mutations); |
| 321 | 321 |
| 322 } // namespace syncable | 322 } // namespace syncable |
| 323 } // namespace syncer | 323 } // namespace syncer |
| 324 | 324 |
| 325 #endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_ | 325 #endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
| OLD | NEW |