Chromium Code Reviews| Index: sync/engine/process_commit_response_command.h |
| diff --git a/sync/engine/process_commit_response_command.h b/sync/engine/process_commit_response_command.h |
| index 7176da1692d8e94162decd578548f1db1bd29262..86a119d3788a2b64cf20b618571251ef615f55d3 100644 |
| --- a/sync/engine/process_commit_response_command.h |
| +++ b/sync/engine/process_commit_response_command.h |
| @@ -16,10 +16,6 @@ |
| namespace syncer { |
| -namespace sessions { |
| -class OrderedCommitSet; |
| -} |
| - |
| namespace syncable { |
| class Id; |
| class ModelNeutralWriteTransaction; |
| @@ -39,37 +35,17 @@ class Directory; |
| // trouble processing the request. |
| // |
| // See SyncerCommand documentation for more info. |
| -class SYNC_EXPORT_PRIVATE ProcessCommitResponseCommand : public SyncerCommand { |
| +class SYNC_EXPORT_PRIVATE ProcessCommitResponseCommand { |
| public: |
| - |
| - // The commit_set parameter contains references to all the items which were |
| - // to be committed in this batch. |
| - // |
| - // The commmit_message parameter contains the message that was sent to the |
| - // server. |
| - // |
| - // The commit_response parameter contains the response received from the |
| - // server. This may be uninitialized if we were unable to contact the server |
| - // or a serious error was encountered. |
| - ProcessCommitResponseCommand( |
| - const sessions::OrderedCommitSet& commit_set, |
| - const sync_pb::ClientToServerMessage& commit_message, |
| - const sync_pb::ClientToServerResponse& commit_response); |
| - virtual ~ProcessCommitResponseCommand(); |
| - |
| - protected: |
| - // SyncerCommand implementation. |
| - virtual SyncerError ExecuteImpl(sessions::SyncSession* session) OVERRIDE; |
| - |
| - private: |
| - sync_pb::CommitResponse::ResponseType ProcessSingleCommitResponse( |
| + static sync_pb::CommitResponse::ResponseType ProcessSingleCommitResponse( |
|
Nicolas Zea
2013/10/10 21:34:45
Same comment about possibly renaming the file to *
rlarocque
2013/10/11 23:03:30
Done. (Merged into commit_util.cc/h)
|
| syncable::ModelNeutralWriteTransaction* trans, |
| const sync_pb::CommitResponse_EntryResponse& pb_commit_response, |
| const sync_pb::SyncEntity& pb_committed_entry, |
| int64 metahandle, |
| std::set<syncable::Id>* deleted_folders); |
| - void ProcessSuccessfulCommitResponse( |
| + private: |
| + static void ProcessSuccessfulCommitResponse( |
|
Nicolas Zea
2013/10/10 21:34:45
move all of these to cc file?
rlarocque
2013/10/11 23:03:30
These have been moved to an anonymous namespace in
|
| const sync_pb::SyncEntity& committed_entry, |
| const sync_pb::CommitResponse_EntryResponse& entry_response, |
| const syncable::Id& pre_commit_id, |
| @@ -78,7 +54,7 @@ class SYNC_EXPORT_PRIVATE ProcessCommitResponseCommand : public SyncerCommand { |
| // Update the BASE_VERSION and SERVER_VERSION, post-commit. |
| // Helper for ProcessSuccessfulCommitResponse. |
| - bool UpdateVersionAfterCommit( |
| + static bool UpdateVersionAfterCommit( |
| const sync_pb::SyncEntity& committed_entry, |
| const sync_pb::CommitResponse_EntryResponse& entry_response, |
| const syncable::Id& pre_commit_id, |
| @@ -86,33 +62,24 @@ class SYNC_EXPORT_PRIVATE ProcessCommitResponseCommand : public SyncerCommand { |
| // If the server generated an ID for us during a commit, apply the new ID. |
| // Helper for ProcessSuccessfulCommitResponse. |
| - bool ChangeIdAfterCommit( |
| + static bool ChangeIdAfterCommit( |
| const sync_pb::CommitResponse_EntryResponse& entry_response, |
| const syncable::Id& pre_commit_id, |
| syncable::ModelNeutralMutableEntry* local_entry); |
| // Update the SERVER_ fields to reflect the server state after committing. |
| // Helper for ProcessSuccessfulCommitResponse. |
| - void UpdateServerFieldsAfterCommit( |
| + static void UpdateServerFieldsAfterCommit( |
| const sync_pb::SyncEntity& committed_entry, |
| const sync_pb::CommitResponse_EntryResponse& entry_response, |
| syncable::ModelNeutralMutableEntry* local_entry); |
| // Helper to extract the final name from the protobufs. |
| - const std::string& GetResultingPostCommitName( |
| + static const std::string& GetResultingPostCommitName( |
| const sync_pb::SyncEntity& committed_entry, |
| const sync_pb::CommitResponse_EntryResponse& entry_response); |
| - // Helper to clean up in case of failure. |
| - void ClearSyncingBits( |
| - syncable::Directory *dir, |
| - const std::vector<syncable::Id>& commit_ids); |
| - |
| - const sessions::OrderedCommitSet& commit_set_; |
| - const sync_pb::ClientToServerMessage& commit_message_; |
| - const sync_pb::ClientToServerResponse& commit_response_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand); |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(ProcessCommitResponseCommand); |
| }; |
| } // namespace syncer |