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

Side by Side Diff: sync/internal_api/syncapi_internal.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
« no previous file with comments | « sync/internal_api/syncapi_internal.h ('k') | sync/internal_api/test/test_entry_factory.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 (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/syncapi_internal.h" 5 #include "sync/internal_api/syncapi_internal.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "sync/protocol/attachments.pb.h"
8 #include "sync/protocol/password_specifics.pb.h" 9 #include "sync/protocol/password_specifics.pb.h"
9 #include "sync/protocol/sync.pb.h" 10 #include "sync/protocol/sync.pb.h"
10 #include "sync/util/cryptographer.h" 11 #include "sync/util/cryptographer.h"
11 12
12 namespace syncer { 13 namespace syncer {
13 14
14 namespace { 15 namespace {
15 16
16 bool EndsWithSpace(const std::string& string) { 17 bool EndsWithSpace(const std::string& string) {
17 return !string.empty() && *string.rbegin() == ' '; 18 return !string.empty() && *string.rbegin() == ' ';
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 right_plaintext = cryptographer->DecryptToString(right.encrypted()); 98 right_plaintext = cryptographer->DecryptToString(right.encrypted());
98 } else { 99 } else {
99 right_plaintext = right.SerializeAsString(); 100 right_plaintext = right.SerializeAsString();
100 } 101 }
101 if (left_plaintext == right_plaintext) { 102 if (left_plaintext == right_plaintext) {
102 return true; 103 return true;
103 } 104 }
104 return false; 105 return false;
105 } 106 }
106 107
108 bool AreAttachmentMetadataEqual(const sync_pb::AttachmentMetadata& left,
109 const sync_pb::AttachmentMetadata& right) {
110 if (left.SerializeAsString() == right.SerializeAsString()) {
111 return true;
112 }
113 return false;
114 }
115
107 } // namespace syncer 116 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/syncapi_internal.h ('k') | sync/internal_api/test/test_entry_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698