| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/sync/engine_impl/commit_util.h" | 5 #include "components/sync/engine_impl/commit_util.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 void AddClientConfigParamsToMessage(ModelTypeSet enabled_types, | 63 void AddClientConfigParamsToMessage(ModelTypeSet enabled_types, |
| 64 bool cookie_jar_mismatch, | 64 bool cookie_jar_mismatch, |
| 65 sync_pb::CommitMessage* message) { | 65 sync_pb::CommitMessage* message) { |
| 66 sync_pb::ClientConfigParams* config_params = message->mutable_config_params(); | 66 sync_pb::ClientConfigParams* config_params = message->mutable_config_params(); |
| 67 for (ModelTypeSet::Iterator it = enabled_types.First(); it.Good(); it.Inc()) { | 67 for (ModelTypeSet::Iterator it = enabled_types.First(); it.Good(); it.Inc()) { |
| 68 if (ProxyTypes().Has(it.Get())) | 68 if (ProxyTypes().Has(it.Get())) |
| 69 continue; | 69 continue; |
| 70 int field_number = GetSpecificsFieldNumberFromModelType(it.Get()); | 70 int field_number = GetSpecificsFieldNumberFromModelType(it.Get()); |
| 71 config_params->mutable_enabled_type_ids()->Add(field_number); | 71 config_params->mutable_enabled_type_ids()->Add(field_number); |
| 72 } | 72 } |
| 73 config_params->set_tabs_datatype_enabled( | 73 config_params->set_tabs_datatype_enabled(enabled_types.Has(PROXY_TABS)); |
| 74 enabled_types.Has(syncer::PROXY_TABS)); | |
| 75 config_params->set_cookie_jar_mismatch(cookie_jar_mismatch); | 74 config_params->set_cookie_jar_mismatch(cookie_jar_mismatch); |
| 76 } | 75 } |
| 77 | 76 |
| 78 namespace { | 77 namespace { |
| 79 | 78 |
| 80 void SetEntrySpecifics(const Entry& meta_entry, | 79 void SetEntrySpecifics(const Entry& meta_entry, |
| 81 sync_pb::SyncEntity* sync_entry) { | 80 sync_pb::SyncEntity* sync_entry) { |
| 82 // Add the new style extension and the folder bit. | 81 // Add the new style extension and the folder bit. |
| 83 sync_entry->mutable_specifics()->CopyFrom(meta_entry.GetSpecifics()); | 82 sync_entry->mutable_specifics()->CopyFrom(meta_entry.GetSpecifics()); |
| 84 sync_entry->set_folder(meta_entry.GetIsDir()); | 83 sync_entry->set_folder(meta_entry.GetIsDir()); |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 446 |
| 448 ProcessSuccessfulCommitResponse(commit_request_entry, server_entry, | 447 ProcessSuccessfulCommitResponse(commit_request_entry, server_entry, |
| 449 local_entry.GetId(), &local_entry, | 448 local_entry.GetId(), &local_entry, |
| 450 dirty_sync_was_set, deleted_folders); | 449 dirty_sync_was_set, deleted_folders); |
| 451 return response; | 450 return response; |
| 452 } | 451 } |
| 453 | 452 |
| 454 } // namespace commit_util | 453 } // namespace commit_util |
| 455 | 454 |
| 456 } // namespace syncer | 455 } // namespace syncer |
| OLD | NEW |