| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DOWNLOAD_H_ | 5 #ifndef SYNC_ENGINE_DOWNLOAD_H_ |
| 6 #define SYNC_ENGINE_DOWNLOAD_H_ | 6 #define SYNC_ENGINE_DOWNLOAD_H_ |
| 7 | 7 |
| 8 #include "sync/base/sync_export.h" | 8 #include "sync/base/sync_export.h" |
| 9 #include "sync/engine/sync_directory_update_handler.h" | 9 #include "sync/engine/sync_directory_update_handler.h" |
| 10 #include "sync/internal_api/public/base/model_type.h" | 10 #include "sync/internal_api/public/base/model_type.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 bool create_mobile_bookmarks_folder, | 68 bool create_mobile_bookmarks_folder, |
| 69 ModelTypeSet request_types, | 69 ModelTypeSet request_types, |
| 70 sync_pb::ClientToServerMessage* client_to_server_message); | 70 sync_pb::ClientToServerMessage* client_to_server_message); |
| 71 | 71 |
| 72 // Helper function. Defined here for testing. | 72 // Helper function. Defined here for testing. |
| 73 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForPollImpl( | 73 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForPollImpl( |
| 74 ModelTypeSet proto_request_types, | 74 ModelTypeSet proto_request_types, |
| 75 UpdateHandlerMap* update_handler_map, | 75 UpdateHandlerMap* update_handler_map, |
| 76 sync_pb::GetUpdatesMessage* get_updates); | 76 sync_pb::GetUpdatesMessage* get_updates); |
| 77 | 77 |
| 78 // Same as BuildDownloadUpdatesForPoll() except the update origin/source is | |
| 79 // RETRY. | |
| 80 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForRetry( | |
| 81 sessions::SyncSession* session, | |
| 82 bool create_mobile_bookmarks_folder, | |
| 83 ModelTypeSet request_types, | |
| 84 sync_pb::ClientToServerMessage* client_to_server_message); | |
| 85 | |
| 86 // Same as BuildDownloadUpdatesForPollImpl() except the update origin/source is | |
| 87 // RETRY. | |
| 88 SYNC_EXPORT_PRIVATE void BuildDownloadUpdatesForRetryImpl( | |
| 89 ModelTypeSet proto_request_types, | |
| 90 UpdateHandlerMap* update_handler_map, | |
| 91 sync_pb::GetUpdatesMessage* get_updates); | |
| 92 | |
| 93 // Sends the specified message to the server and stores the response in a member | 78 // Sends the specified message to the server and stores the response in a member |
| 94 // of the |session|'s StatusController. | 79 // of the |session|'s StatusController. |
| 95 SYNC_EXPORT_PRIVATE SyncerError | 80 SYNC_EXPORT_PRIVATE SyncerError |
| 96 ExecuteDownloadUpdates(ModelTypeSet request_types, | 81 ExecuteDownloadUpdates(ModelTypeSet request_types, |
| 97 sessions::SyncSession* session, | 82 sessions::SyncSession* session, |
| 98 sync_pb::ClientToServerMessage* msg); | 83 sync_pb::ClientToServerMessage* msg); |
| 99 | 84 |
| 100 // Helper function for processing responses from the server. | 85 // Helper function for processing responses from the server. |
| 101 // Defined here for testing. | 86 // Defined here for testing. |
| 102 SYNC_EXPORT_PRIVATE SyncerError ProcessResponse( | 87 SYNC_EXPORT_PRIVATE SyncerError ProcessResponse( |
| 103 const sync_pb::GetUpdatesResponse& gu_response, | 88 const sync_pb::GetUpdatesResponse& gu_response, |
| 104 ModelTypeSet proto_request_types, | 89 ModelTypeSet proto_request_types, |
| 105 UpdateHandlerMap* handler_map, | 90 UpdateHandlerMap* handler_map, |
| 106 sessions::StatusController* status); | 91 sessions::StatusController* status); |
| 107 | 92 |
| 108 // Helper function to copy client debug info from debug_info_getter to | 93 // Helper function to copy client debug info from debug_info_getter to |
| 109 // debug_info. Defined here for testing. | 94 // debug_info. Defined here for testing. |
| 110 SYNC_EXPORT_PRIVATE void CopyClientDebugInfo( | 95 SYNC_EXPORT_PRIVATE void CopyClientDebugInfo( |
| 111 sessions::DebugInfoGetter* debug_info_getter, | 96 sessions::DebugInfoGetter* debug_info_getter, |
| 112 sync_pb::DebugInfo* debug_info); | 97 sync_pb::DebugInfo* debug_info); |
| 113 | 98 |
| 114 } // namespace download | 99 } // namespace download |
| 115 | 100 |
| 116 } // namespace syncer | 101 } // namespace syncer |
| 117 | 102 |
| 118 #endif // SYNC_ENGINE_DOWNLOAD_H_ | 103 #endif // SYNC_ENGINE_DOWNLOAD_H_ |
| OLD | NEW |