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 #include "sync/engine/build_commit_command.h" | 5 #include "sync/engine/build_commit_command.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } | 96 } |
97 } | 97 } |
98 } | 98 } |
99 | 99 |
100 void BuildCommitCommand::AddClientConfigParamsToMessage( | 100 void BuildCommitCommand::AddClientConfigParamsToMessage( |
101 SyncSession* session, sync_pb::CommitMessage* message) { | 101 SyncSession* session, sync_pb::CommitMessage* message) { |
102 const ModelSafeRoutingInfo& routing_info = session->routing_info(); | 102 const ModelSafeRoutingInfo& routing_info = session->routing_info(); |
103 sync_pb::ClientConfigParams* config_params = message->mutable_config_params(); | 103 sync_pb::ClientConfigParams* config_params = message->mutable_config_params(); |
104 for (std::map<ModelType, ModelSafeGroup>::const_iterator iter = | 104 for (std::map<ModelType, ModelSafeGroup>::const_iterator iter = |
105 routing_info.begin(); iter != routing_info.end(); ++iter) { | 105 routing_info.begin(); iter != routing_info.end(); ++iter) { |
| 106 if (ProxyTypes().Has(iter->first)) |
| 107 continue; |
106 int field_number = GetSpecificsFieldNumberFromModelType(iter->first); | 108 int field_number = GetSpecificsFieldNumberFromModelType(iter->first); |
107 config_params->mutable_enabled_type_ids()->Add(field_number); | 109 config_params->mutable_enabled_type_ids()->Add(field_number); |
108 } | 110 } |
109 } | 111 } |
110 | 112 |
111 namespace { | 113 namespace { |
112 void SetEntrySpecifics(MutableEntry* meta_entry, | 114 void SetEntrySpecifics(MutableEntry* meta_entry, |
113 sync_pb::SyncEntity* sync_entry) { | 115 sync_pb::SyncEntity* sync_entry) { |
114 // Add the new style extension and the folder bit. | 116 // Add the new style extension and the folder bit. |
115 sync_entry->mutable_specifics()->CopyFrom(meta_entry->Get(SPECIFICS)); | 117 sync_entry->mutable_specifics()->CopyFrom(meta_entry->Get(SPECIFICS)); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 if (delta <= static_cast<uint64>(GetGap()*2)) | 274 if (delta <= static_cast<uint64>(GetGap()*2)) |
273 return lo + (static_cast<int64>(delta) + 7) / 8; // Interpolate. | 275 return lo + (static_cast<int64>(delta) + 7) / 8; // Interpolate. |
274 else if (lo == GetFirstPosition()) | 276 else if (lo == GetFirstPosition()) |
275 return hi - GetGap(); // Extend range just before successor. | 277 return hi - GetGap(); // Extend range just before successor. |
276 else | 278 else |
277 return lo + GetGap(); // Use or extend range just after predecessor. | 279 return lo + GetGap(); // Use or extend range just after predecessor. |
278 } | 280 } |
279 | 281 |
280 | 282 |
281 } // namespace syncer | 283 } // namespace syncer |
OLD | NEW |