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

Side by Side Diff: sync/engine/commit_util.cc

Issue 1849563005: [Sync] Add cookie jar mismatch logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests again Created 4 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
« no previous file with comments | « sync/engine/commit_util.h ('k') | sync/engine/syncer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "sync/engine/commit_util.h" 5 #include "sync/engine/commit_util.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 sync_pb::ChromiumExtensionsActivity* activity_message = 61 sync_pb::ChromiumExtensionsActivity* activity_message =
62 message->add_extensions_activity(); 62 message->add_extensions_activity();
63 activity_message->set_extension_id(it->second.extension_id); 63 activity_message->set_extension_id(it->second.extension_id);
64 activity_message->set_bookmark_writes_since_last_commit( 64 activity_message->set_bookmark_writes_since_last_commit(
65 it->second.bookmark_write_count); 65 it->second.bookmark_write_count);
66 } 66 }
67 } 67 }
68 68
69 void AddClientConfigParamsToMessage( 69 void AddClientConfigParamsToMessage(
70 ModelTypeSet enabled_types, 70 ModelTypeSet enabled_types,
71 bool cookie_jar_mismatch,
71 sync_pb::CommitMessage* message) { 72 sync_pb::CommitMessage* message) {
72 sync_pb::ClientConfigParams* config_params = message->mutable_config_params(); 73 sync_pb::ClientConfigParams* config_params = message->mutable_config_params();
73 for (ModelTypeSet::Iterator it = enabled_types.First(); it.Good(); it.Inc()) { 74 for (ModelTypeSet::Iterator it = enabled_types.First(); it.Good(); it.Inc()) {
74 if (ProxyTypes().Has(it.Get())) 75 if (ProxyTypes().Has(it.Get()))
75 continue; 76 continue;
76 int field_number = GetSpecificsFieldNumberFromModelType(it.Get()); 77 int field_number = GetSpecificsFieldNumberFromModelType(it.Get());
77 config_params->mutable_enabled_type_ids()->Add(field_number); 78 config_params->mutable_enabled_type_ids()->Add(field_number);
78 } 79 }
79 config_params->set_tabs_datatype_enabled( 80 config_params->set_tabs_datatype_enabled(
80 enabled_types.Has(syncer::PROXY_TABS)); 81 enabled_types.Has(syncer::PROXY_TABS));
82 config_params->set_cookie_jar_mismatch(cookie_jar_mismatch);
81 } 83 }
82 84
83 namespace { 85 namespace {
84 86
85 void SetEntrySpecifics(const Entry& meta_entry, 87 void SetEntrySpecifics(const Entry& meta_entry,
86 sync_pb::SyncEntity* sync_entry) { 88 sync_pb::SyncEntity* sync_entry) {
87 // Add the new style extension and the folder bit. 89 // Add the new style extension and the folder bit.
88 sync_entry->mutable_specifics()->CopyFrom(meta_entry.GetSpecifics()); 90 sync_entry->mutable_specifics()->CopyFrom(meta_entry.GetSpecifics());
89 sync_entry->set_folder(meta_entry.GetIsDir()); 91 sync_entry->set_folder(meta_entry.GetIsDir());
90 92
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 465 }
464 466
465 ProcessSuccessfulCommitResponse(commit_request_entry, server_entry, 467 ProcessSuccessfulCommitResponse(commit_request_entry, server_entry,
466 local_entry.GetId(), &local_entry, dirty_sync_was_set, deleted_folders); 468 local_entry.GetId(), &local_entry, dirty_sync_was_set, deleted_folders);
467 return response; 469 return response;
468 } 470 }
469 471
470 } // namespace commit_util 472 } // namespace commit_util
471 473
472 } // namespace syncer 474 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/commit_util.h ('k') | sync/engine/syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698