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

Side by Side Diff: components/sync/engine_impl/commit_util.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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 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
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(enabled_types.Has(PROXY_TABS)); 73 config_params->set_tabs_datatype_enabled(
74 enabled_types.Has(syncer::PROXY_TABS));
74 config_params->set_cookie_jar_mismatch(cookie_jar_mismatch); 75 config_params->set_cookie_jar_mismatch(cookie_jar_mismatch);
75 } 76 }
76 77
77 namespace { 78 namespace {
78 79
79 void SetEntrySpecifics(const Entry& meta_entry, 80 void SetEntrySpecifics(const Entry& meta_entry,
80 sync_pb::SyncEntity* sync_entry) { 81 sync_pb::SyncEntity* sync_entry) {
81 // Add the new style extension and the folder bit. 82 // Add the new style extension and the folder bit.
82 sync_entry->mutable_specifics()->CopyFrom(meta_entry.GetSpecifics()); 83 sync_entry->mutable_specifics()->CopyFrom(meta_entry.GetSpecifics());
83 sync_entry->set_folder(meta_entry.GetIsDir()); 84 sync_entry->set_folder(meta_entry.GetIsDir());
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 447
447 ProcessSuccessfulCommitResponse(commit_request_entry, server_entry, 448 ProcessSuccessfulCommitResponse(commit_request_entry, server_entry,
448 local_entry.GetId(), &local_entry, 449 local_entry.GetId(), &local_entry,
449 dirty_sync_was_set, deleted_folders); 450 dirty_sync_was_set, deleted_folders);
450 return response; 451 return response;
451 } 452 }
452 453
453 } // namespace commit_util 454 } // namespace commit_util
454 455
455 } // namespace syncer 456 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/commit.cc ('k') | components/sync/engine_impl/cycle/directory_type_debug_info_emitter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698