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

Side by Side Diff: sync/internal_api/sync_manager_impl.cc

Issue 393083004: Update Commit and GetUpdatesResponse messages to include attachment ids. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update SyncManagerImpl to detect attachment metadata changes. Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/internal_api/sync_manager_impl.h" 5 #include "sync/internal_api/sync_manager_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 !a.ref(syncable::UNIQUE_SERVER_TAG).empty()) { 219 !a.ref(syncable::UNIQUE_SERVER_TAG).empty()) {
220 return false; 220 return false;
221 } 221 }
222 if (a.ref(syncable::IS_DIR) != b.ref(syncable::IS_DIR)) 222 if (a.ref(syncable::IS_DIR) != b.ref(syncable::IS_DIR))
223 return true; 223 return true;
224 if (!AreSpecificsEqual(cryptographer, 224 if (!AreSpecificsEqual(cryptographer,
225 a.ref(syncable::SPECIFICS), 225 a.ref(syncable::SPECIFICS),
226 b.ref(syncable::SPECIFICS))) { 226 b.ref(syncable::SPECIFICS))) {
227 return true; 227 return true;
228 } 228 }
229 if (!AreAttachmentMetadataEqual(a.ref(syncable::ATTACHMENT_METADATA),
230 b.ref(syncable::ATTACHMENT_METADATA))) {
231 return true;
232 }
229 // We only care if the name has changed if neither specifics is encrypted 233 // We only care if the name has changed if neither specifics is encrypted
230 // (encrypted nodes blow away the NON_UNIQUE_NAME). 234 // (encrypted nodes blow away the NON_UNIQUE_NAME).
231 if (!a_specifics.has_encrypted() && !b_specifics.has_encrypted() && 235 if (!a_specifics.has_encrypted() && !b_specifics.has_encrypted() &&
232 a.ref(syncable::NON_UNIQUE_NAME) != b.ref(syncable::NON_UNIQUE_NAME)) 236 a.ref(syncable::NON_UNIQUE_NAME) != b.ref(syncable::NON_UNIQUE_NAME))
233 return true; 237 return true;
234 if (VisiblePositionsDiffer(mutation)) 238 if (VisiblePositionsDiffer(mutation))
235 return true; 239 return true;
236 return false; 240 return false;
237 } 241 }
238 242
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 int SyncManagerImpl::GetDefaultNudgeDelay() { 1148 int SyncManagerImpl::GetDefaultNudgeDelay() {
1145 return kDefaultNudgeDelayMilliseconds; 1149 return kDefaultNudgeDelayMilliseconds;
1146 } 1150 }
1147 1151
1148 // static. 1152 // static.
1149 int SyncManagerImpl::GetPreferencesNudgeDelay() { 1153 int SyncManagerImpl::GetPreferencesNudgeDelay() {
1150 return kPreferencesNudgeDelayMilliseconds; 1154 return kPreferencesNudgeDelayMilliseconds;
1151 } 1155 }
1152 1156
1153 } // namespace syncer 1157 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/public/test/test_entry_factory.h ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698