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

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

Issue 124083002: Client-side changes to support retry GU. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 #ifndef SYNC_ENGINE_SYNCER_H_ 5 #ifndef SYNC_ENGINE_SYNCER_H_
6 #define SYNC_ENGINE_SYNCER_H_ 6 #define SYNC_ENGINE_SYNCER_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ModelTypeSet request_types, 58 ModelTypeSet request_types,
59 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source, 59 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
60 sessions::SyncSession* session); 60 sessions::SyncSession* session);
61 61
62 // Requests to download updates for the |request_types|. For a well-behaved 62 // Requests to download updates for the |request_types|. For a well-behaved
63 // client with a working connection to the invalidations server, this should 63 // client with a working connection to the invalidations server, this should
64 // be unnecessary. It may be invoked periodically to try to keep the client 64 // be unnecessary. It may be invoked periodically to try to keep the client
65 // in sync despite bugs or transient failures. 65 // in sync despite bugs or transient failures.
66 virtual bool PollSyncShare(ModelTypeSet request_types, 66 virtual bool PollSyncShare(ModelTypeSet request_types,
67 sessions::SyncSession* session); 67 sessions::SyncSession* session);
68 virtual bool RetrySyncShare(ModelTypeSet request_types,
69 sessions::SyncSession* session);
68 70
69 private: 71 private:
70 void ApplyUpdates(sessions::SyncSession* session); 72 void ApplyUpdates(sessions::SyncSession* session);
71 bool DownloadAndApplyUpdates( 73 bool DownloadAndApplyUpdates(
72 ModelTypeSet request_types, 74 ModelTypeSet request_types,
73 sessions::SyncSession* session, 75 sessions::SyncSession* session,
74 base::Callback<void(sync_pb::ClientToServerMessage*)> build_fn); 76 base::Callback<void(sync_pb::ClientToServerMessage*)> build_fn);
75 77
76 // This function will commit batches of unsynced items to the server until the 78 // This function will commit batches of unsynced items to the server until the
77 // number of unsynced and ready to commit items reaches zero or an error is 79 // number of unsynced and ready to commit items reaches zero or an error is
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 FRIEND_TEST_ALL_PREFIXES(SyncerTest, DeletingEntryWithLocalEdits); 111 FRIEND_TEST_ALL_PREFIXES(SyncerTest, DeletingEntryWithLocalEdits);
110 FRIEND_TEST_ALL_PREFIXES(EntryCreatedInNewFolderTest, 112 FRIEND_TEST_ALL_PREFIXES(EntryCreatedInNewFolderTest,
111 EntryCreatedInNewFolderMidSync); 113 EntryCreatedInNewFolderMidSync);
112 114
113 DISALLOW_COPY_AND_ASSIGN(Syncer); 115 DISALLOW_COPY_AND_ASSIGN(Syncer);
114 }; 116 };
115 117
116 } // namespace syncer 118 } // namespace syncer
117 119
118 #endif // SYNC_ENGINE_SYNCER_H_ 120 #endif // SYNC_ENGINE_SYNCER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698