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

Side by Side Diff: sync/engine/syncer_proto_util.h

Issue 10911341: sync: add comment to SyncerProtoUtil (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « no previous file | no next file » | 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 #ifndef SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ 5 #ifndef SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
6 #define SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ 6 #define SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 24 matching lines...) Expand all
35 namespace syncable { 35 namespace syncable {
36 class Directory; 36 class Directory;
37 class Entry; 37 class Entry;
38 } 38 }
39 39
40 class SyncerProtoUtil { 40 class SyncerProtoUtil {
41 public: 41 public:
42 // Posts the given message and fills the buffer with the returned value. 42 // Posts the given message and fills the buffer with the returned value.
43 // Returns true on success. Also handles store birthday verification: will 43 // Returns true on success. Also handles store birthday verification: will
44 // produce a SyncError if the birthday is incorrect. 44 // produce a SyncError if the birthday is incorrect.
45 // NOTE: This will add all fields that must be sent on every request, which
46 // includes store birthday, protocol version, client chips, api keys, etc.
45 static SyncerError PostClientToServerMessage( 47 static SyncerError PostClientToServerMessage(
46 sync_pb::ClientToServerMessage* msg, 48 sync_pb::ClientToServerMessage* msg,
47 sync_pb::ClientToServerResponse* response, 49 sync_pb::ClientToServerResponse* response,
48 sessions::SyncSession* session); 50 sessions::SyncSession* session);
49 51
50 // Compares a syncable Entry to SyncEntity, returns true iff the data is 52 // Compares a syncable Entry to SyncEntity, returns true iff the data is
51 // identical. 53 // identical.
52 // 54 //
53 // TODO(sync): The places where this function is used are arguable big causes 55 // TODO(sync): The places where this function is used are arguable big causes
54 // of the fragility, because there's a tendency to freak out the moment the 56 // of the fragility, because there's a tendency to freak out the moment the
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, VerifyResponseBirthday); 145 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, VerifyResponseBirthday);
144 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, HandleThrottlingNoDatatypes); 146 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, HandleThrottlingNoDatatypes);
145 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, HandleThrottlingWithDatatypes); 147 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, HandleThrottlingWithDatatypes);
146 148
147 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); 149 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil);
148 }; 150 };
149 151
150 } // namespace syncer 152 } // namespace syncer
151 153
152 #endif // SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ 154 #endif // SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698