| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BASE_PROTO_VALUE_PTR_H_ | 5 #ifndef COMPONENTS_SYNC_BASE_PROTO_VALUE_PTR_H_ |
| 6 #define COMPONENTS_SYNC_BASE_PROTO_VALUE_PTR_H_ | 6 #define COMPONENTS_SYNC_BASE_PROTO_VALUE_PTR_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 | 10 |
| 11 namespace syncer { | 11 namespace syncer { |
| 12 |
| 13 class ProcessorEntityTracker; |
| 12 struct EntityData; | 14 struct EntityData; |
| 13 class ProcessorEntityTracker; | |
| 14 } // namespace syncer | |
| 15 | |
| 16 namespace syncer { | |
| 17 | 15 |
| 18 namespace syncable { | 16 namespace syncable { |
| 19 struct EntryKernel; | 17 struct EntryKernel; |
| 20 } // namespace syncable | 18 } // namespace syncable |
| 21 | 19 |
| 22 // Default traits struct for ProtoValuePtr - adapts a | 20 // Default traits struct for ProtoValuePtr - adapts a |
| 23 // ::google::protobuf::MessageLite derived type to be used with ProtoValuePtr. | 21 // ::google::protobuf::MessageLite derived type to be used with ProtoValuePtr. |
| 24 template <typename T> | 22 template <typename T> |
| 25 struct DefaultProtoValuePtrTraits { | 23 struct DefaultProtoValuePtrTraits { |
| 26 // Deep copy the value from |src| to |dest|. | 24 // Deep copy the value from |src| to |dest|. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 void load(const void* blob, int length) { | 121 void load(const void* blob, int length) { |
| 124 wrapper_ = Wrapper::ParseFromBlob(blob, length); | 122 wrapper_ = Wrapper::ParseFromBlob(blob, length); |
| 125 } | 123 } |
| 126 | 124 |
| 127 scoped_refptr<Wrapper> wrapper_; | 125 scoped_refptr<Wrapper> wrapper_; |
| 128 }; | 126 }; |
| 129 | 127 |
| 130 } // namespace syncer | 128 } // namespace syncer |
| 131 | 129 |
| 132 #endif // COMPONENTS_SYNC_BASE_PROTO_VALUE_PTR_H_ | 130 #endif // COMPONENTS_SYNC_BASE_PROTO_VALUE_PTR_H_ |
| OLD | NEW |