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

Side by Side Diff: components/sync/protocol/proto_memory_estimations.cc

Issue 2781863004: [Sync] Implement EstimateMemoryUsage for SharedModelTypeProcessor and ModelTypeWorker (Closed)
Patch Set: Address comments Created 3 years, 8 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 // Keep this file in sync with the .proto files in this directory. 5 // Keep this file in sync with the .proto files in this directory.
6 6
7 #include "components/sync/protocol/proto_memory_estimations.h" 7 #include "components/sync/protocol/proto_memory_estimations.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 MemoryUsageVisitor visitor; 114 MemoryUsageVisitor visitor;
115 syncer::VisitProtoFields(visitor, proto); 115 syncer::VisitProtoFields(visitor, proto);
116 return visitor.memory_usage(); 116 return visitor.memory_usage();
117 } 117 }
118 118
119 // Explicit instantiations 119 // Explicit instantiations
120 120
121 #define INSTANTIATE(Proto) \ 121 #define INSTANTIATE(Proto) \
122 template size_t EstimateMemoryUsage<Proto>(const Proto&); 122 template size_t EstimateMemoryUsage<Proto>(const Proto&);
123 123
124 INSTANTIATE(EntitySpecifics)
125 INSTANTIATE(AttachmentMetadata) 124 INSTANTIATE(AttachmentMetadata)
126 INSTANTIATE(DataTypeContext) 125 INSTANTIATE(DataTypeContext)
126 INSTANTIATE(EntityMetadata)
127 INSTANTIATE(EntitySpecifics)
128 INSTANTIATE(ModelTypeState)
129 INSTANTIATE(UniquePosition)
127 130
128 } // namespace sync_pb 131 } // namespace sync_pb
OLDNEW
« no previous file with comments | « components/sync/model_impl/shared_model_type_processor.cc ('k') | components/sync/protocol/proto_visitors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698